text
stringlengths 107
2.17M
|
---|
Require Export GeoCoq.Elements.OriginalProofs.proposition_19.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_20 :
forall A B C,
Triangle A B C ->
TG B A A C B C.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @Triangle Ax0 A B C), @TG Ax0 B A A C B C *)
intros.
(* Goal: @TG Ax0 B A A C B C *)
assert (nCol A B C) by (conclude_def Triangle ).
(* Goal: @TG Ax0 B A A C B C *)
assert (~ eq B A).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@eq Ax0 B A) *)
{
(* Goal: not (@eq Ax0 B A) *)
intro.
(* Goal: False *)
assert (Col B A C) by (conclude_def Col ).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (~ eq B C).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@eq Ax0 B C) *)
{
(* Goal: not (@eq Ax0 B C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: @TG Ax0 B A A C B C *)
assert (~ eq C A).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@eq Ax0 C A) *)
{
(* Goal: not (@eq Ax0 C A) *)
intro.
(* Goal: False *)
assert (Col B C A) by (conclude_def Col ).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
let Tf:=fresh in assert (Tf:exists D, (BetS B A D /\ Cong A D C A)) by (conclude lemma_extension);destruct Tf as [D];spliter.
(* Goal: @TG Ax0 B A A C B C *)
assert (neq A D) by (forward_using lemma_betweennotequal).
(* Goal: @TG Ax0 B A A C B C *)
assert (neq D A) by (conclude lemma_inequalitysymmetric).
(* Goal: @TG Ax0 B A A C B C *)
assert (neq B D) by (forward_using lemma_betweennotequal).
(* Goal: @TG Ax0 B A A C B C *)
assert (neq D B) by (conclude lemma_inequalitysymmetric).
(* Goal: @TG Ax0 B A A C B C *)
assert (Cong A D A C) by (forward_using lemma_congruenceflip).
(* Goal: @TG Ax0 B A A C B C *)
assert (~ Col A D C).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@Col Ax0 A D C) *)
{
(* Goal: not (@Col Ax0 A D C) *)
intro.
(* Goal: False *)
assert (Col B A D) by (conclude_def Col ).
(* Goal: False *)
assert (Col D A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col D A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq D A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A B C) by (conclude lemma_collinear4).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (~ eq D C).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@eq Ax0 D C) *)
{
(* Goal: not (@eq Ax0 D C) *)
intro.
(* Goal: False *)
assert (Col A D C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (Triangle A D C) by (conclude_def Triangle ).
(* Goal: @TG Ax0 B A A C B C *)
assert (isosceles A D C) by (conclude_def isosceles ).
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA A D C A C D) by (conclude proposition_05).
(* Goal: @TG Ax0 B A A C B C *)
assert (~ Col A C D).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@Col Ax0 A C D) *)
{
(* Goal: not (@Col Ax0 A C D) *)
intro.
(* Goal: False *)
assert (Col A D C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA A C D D C A) by (conclude lemma_ABCequalsCBA).
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA A D C D C A) by (conclude lemma_equalanglestransitive).
(* Goal: @TG Ax0 B A A C B C *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: @TG Ax0 B A A C B C *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @TG Ax0 B A A C B C *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @TG Ax0 B A A C B C *)
assert (~ eq C D).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@eq Ax0 C D) *)
{
(* Goal: not (@eq Ax0 C D) *)
intro.
(* Goal: False *)
assert (Col A C D) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (Out C D D) by (conclude lemma_ray4).
(* Goal: @TG Ax0 B A A C B C *)
assert (Out C B B) by (conclude lemma_ray4).
(* Goal: @TG Ax0 B A A C B C *)
assert (BetS D A B) by (conclude axiom_betweennesssymmetry).
(* Goal: @TG Ax0 B A A C B C *)
assert (LtA A D C D C B) by (conclude_def LtA ).
(* Goal: @TG Ax0 B A A C B C *)
assert (Out D A B) by (conclude lemma_ray4).
(* Goal: @TG Ax0 B A A C B C *)
assert (Out D C C) by (conclude lemma_ray4).
(* Goal: @TG Ax0 B A A C B C *)
assert (Out D B B) by (conclude lemma_ray4).
(* Goal: @TG Ax0 B A A C B C *)
assert (Cong D B D B) by (conclude cn_congruencereflexive).
(* Goal: @TG Ax0 B A A C B C *)
assert (Cong D C D C) by (conclude cn_congruencereflexive).
(* Goal: @TG Ax0 B A A C B C *)
assert (Cong B C B C) by (conclude cn_congruencereflexive).
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA A D C B D C) by (conclude_def CongA ).
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA B D C A D C) by (conclude lemma_equalanglessymmetric).
(* Goal: @TG Ax0 B A A C B C *)
assert (LtA B D C D C B) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: @TG Ax0 B A A C B C *)
assert (~ Col B C D).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@Col Ax0 B C D) *)
{
(* Goal: not (@Col Ax0 B C D) *)
intro.
(* Goal: False *)
assert (Col B A D) by (conclude_def Col ).
(* Goal: False *)
assert (Col D B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col D B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq D B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B A C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (~ Col C D B).
(* Goal: @TG Ax0 B A A C B C *)
(* Goal: not (@Col Ax0 C D B) *)
{
(* Goal: not (@Col Ax0 C D B) *)
intro.
(* Goal: False *)
assert (Col B C D) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TG Ax0 B A A C B C *)
}
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA C D B B D C) by (conclude lemma_ABCequalsCBA).
(* Goal: @TG Ax0 B A A C B C *)
assert (CongA B C D D C B) by (conclude lemma_ABCequalsCBA).
(* Goal: @TG Ax0 B A A C B C *)
assert (LtA C D B D C B) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: @TG Ax0 B A A C B C *)
assert (LtA C D B B C D) by (conclude lemma_angleorderrespectscongruence).
(* Goal: @TG Ax0 B A A C B C *)
assert (Triangle B C D) by (conclude_def Triangle ).
(* Goal: @TG Ax0 B A A C B C *)
assert (Lt B C B D) by (conclude proposition_19).
(* Goal: @TG Ax0 B A A C B C *)
assert (TG B A A C B C) by (conclude_def TG ).
(* Goal: @TG Ax0 B A A C B C *)
close.
Qed.
End Euclid.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat fintype bigop finset.
From mathcomp
Require Import binomial fingroup morphism automorphism quotient gfunctor.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Definition derived_at_rec n (gT : finGroupType) (A : {set gT}) :=
iter n (fun B => [~: B, B]) A.
Definition derived_at := nosimpl derived_at_rec.
Lemma derg1 A : A^`(1) = [~: A, A]. Proof. by []. Qed.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@derived_at (S O) gT A) (@commutator gT A A) *)
by [].
Qed.
Lemma der_group_set G n : group_set G^`(n).
Proof.
(* Goal: is_true (@group_set gT (@derived_at n gT (@gval gT G))) *)
by case: n => [|n]; apply: groupP.
Qed.
Canonical derived_at_group G n := Group (der_group_set G n).
End DerivedBasics.
Notation "G ^` ( n )" := (derived_at_group G n) : Group_scope.
Section Basic_commutator_properties.
Variable gT : finGroupType.
Implicit Types x y z : gT.
Lemma conjg_mulR x y : x ^ y = x * [~ x, y].
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@conjg gT x y) (@mulg (FinGroup.base gT) x (@commg gT x y)) *)
by rewrite mulKVg.
Qed.
Lemma conjg_Rmul x y : x ^ y = [~ y, x^-1] * x.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@conjg gT x y) (@mulg (FinGroup.base gT) (@commg gT y (@invg (FinGroup.base gT) x)) x) *)
by rewrite commgEr invgK mulgKV.
Qed.
Lemma commMgJ x y z : [~ x * y, z] = [~ x, z] ^ y * [~ y, z].
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@mulg (FinGroup.base gT) x y) z) (@mulg (FinGroup.base gT) (@conjg gT (@commg gT x z) y) (@commg gT y z)) *)
by rewrite !commgEr conjgM mulgA -conjMg mulgK.
Qed.
Lemma commgMJ x y z : [~ x, y * z] = [~ x, z] * [~ x, y] ^ z.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT x (@mulg (FinGroup.base gT) y z)) (@mulg (FinGroup.base gT) (@commg gT x z) (@conjg gT (@commg gT x y) z)) *)
by rewrite !commgEl conjgM -mulgA -conjMg mulKVg.
Qed.
Lemma commMgR x y z : [~ x * y, z] = [~ x, z] * [~ x, z, y] * [~ y, z].
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@mulg (FinGroup.base gT) x y) z) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@commg gT x z) (@commg gT (@commg gT x z) y)) (@commg gT y z)) *)
by rewrite commMgJ conjg_mulR.
Qed.
Lemma commgMR x y z : [~ x, y * z] = [~ x, z] * [~ x, y] * [~ x, y, z].
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT x (@mulg (FinGroup.base gT) y z)) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@commg gT x z) (@commg gT x y)) (@commg gT (@commg gT x y) z)) *)
by rewrite commgMJ conjg_mulR mulgA.
Qed.
Lemma Hall_Witt_identity x y z :
[~ x, y^-1, z] ^ y * [~ y, z^-1, x] ^ z * [~ z, x^-1, y] ^ x = 1.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@conjg gT (@commg gT (@commg gT x (@invg (FinGroup.base gT) y)) z) y) (@conjg gT (@commg gT (@commg gT y (@invg (FinGroup.base gT) z)) x) z)) (@conjg gT (@commg gT (@commg gT z (@invg (FinGroup.base gT) x)) y) x)) (oneg (FinGroup.base gT)) *)
pose a x y z : gT := x * z * y ^ x.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@conjg gT (@commg gT (@commg gT x (@invg (FinGroup.base gT) y)) z) y) (@conjg gT (@commg gT (@commg gT y (@invg (FinGroup.base gT) z)) x) z)) (@conjg gT (@commg gT (@commg gT z (@invg (FinGroup.base gT) x)) y) x)) (oneg (FinGroup.base gT)) *)
suffices{x y z} hw_aux x y z: [~ x, y^-1, z] ^ y = (a x y z)^-1 * (a y z x).
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@conjg gT (@commg gT (@commg gT x (@invg (FinGroup.base gT) y)) z) y) (@mulg (FinGroup.base gT) (@invg (FinGroup.base gT) (a x y z)) (a y z x)) *)
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@conjg gT (@commg gT (@commg gT x (@invg (FinGroup.base gT) y)) z) y) (@conjg gT (@commg gT (@commg gT y (@invg (FinGroup.base gT) z)) x) z)) (@conjg gT (@commg gT (@commg gT z (@invg (FinGroup.base gT) x)) y) x)) (oneg (FinGroup.base gT)) *)
by rewrite !hw_aux 2!mulgA !mulgK mulVg.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@conjg gT (@commg gT (@commg gT x (@invg (FinGroup.base gT) y)) z) y) (@mulg (FinGroup.base gT) (@invg (FinGroup.base gT) (a x y z)) (a y z x)) *)
by rewrite commgEr conjMg -conjgM -conjg_Rmul 2!invMg conjgE !mulgA.
Qed.
Section LeftComm.
Variables (i : nat) (x y : gT).
Hypothesis cxz : commute x [~ x, y].
Lemma commVg : [~ x^-1, y] = [~ x, y]^-1.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@invg (FinGroup.base gT) x) y) (@invg (FinGroup.base gT) (@commg gT x y)) *)
apply/eqP; rewrite commgEl eq_sym eq_invg_mul invgK mulgA -cxz.
(* Goal: is_true (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) x (@commg gT x y)) (@conjg gT (@invg (FinGroup.base gT) x) y)) (oneg (FinGroup.base gT))) *)
by rewrite -conjg_mulR -conjMg mulgV conj1g.
Qed.
Lemma commXg : [~ x ^+ i, y] = [~ x, y] ^+ i.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@expgn (FinGroup.base gT) x i) y) (@expgn (FinGroup.base gT) (@commg gT x y) i) *)
elim: i => [|i' IHi]; first exact: comm1g.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@expgn (FinGroup.base gT) x (S i')) y) (@expgn (FinGroup.base gT) (@commg gT x y) (S i')) *)
by rewrite !expgS commMgJ /conjg commuteX // mulKg IHi.
Qed.
End LeftComm.
Section RightComm.
Variables (i : nat) (x y : gT).
Hypothesis cyz : commute y [~ x, y].
Let cyz' := commuteV cyz.
Lemma commgV : [~ x, y^-1] = [~ x, y]^-1.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT x (@invg (FinGroup.base gT) y)) (@invg (FinGroup.base gT) (@commg gT x y)) *)
by rewrite -invg_comm commVg -(invg_comm x y) ?invgK.
Qed.
Lemma commgX : [~ x, y ^+ i] = [~ x, y] ^+ i.
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT x (@expgn (FinGroup.base gT) y i)) (@expgn (FinGroup.base gT) (@commg gT x y) i) *)
by rewrite -invg_comm commXg -(invg_comm x y) ?expgVn ?invgK.
Qed.
End RightComm.
Section LeftRightComm.
Variables (i j : nat) (x y : gT).
Hypotheses (cxz : commute x [~ x, y]) (cyz : commute y [~ x, y]).
Lemma commXXg : [~ x ^+ i, y ^+ j] = [~ x, y] ^+ (i * j).
Proof.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@expgn (FinGroup.base gT) x i) (@expgn (FinGroup.base gT) y j)) (@expgn (FinGroup.base gT) (@commg gT x y) (muln i j)) *)
by rewrite expgM commgX commXg //; apply: commuteX.
Qed.
Lemma expMg_Rmul : (y * x) ^+ i = y ^+ i * x ^+ i * [~ x, y] ^+ 'C(i, 2).
End LeftRightComm.
End Basic_commutator_properties.
Section Commutator_properties.
Variable gT : finGroupType.
Implicit Type (rT : finGroupType) (A B C : {set gT}) (D G H K : {group gT}).
Lemma commG1 A : [~: A, 1] = 1.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT A (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply/commG1P; rewrite centsC sub1G.
Qed.
Lemma comm1G A : [~: 1, A] = 1.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))) A) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by rewrite commGC commG1.
Qed.
Lemma commg_sub A B : [~: A, B] \subset A <*> B.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT A B)))) *)
by rewrite comm_subG // (joing_subl, joing_subr).
Qed.
Lemma commg_norml G A : G \subset 'N([~: G, A]).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT (@gval gT G) A))))) *)
apply/subsetP=> x Gx; rewrite inE -genJ gen_subG.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@commg_set gT (@gval gT G) A) x))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@commutator_group gT (@gval gT G) A))))) *)
apply/subsetP=> _ /imsetP[_ /imset2P[y z Gy Az ->] ->].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@conjg gT (@commg gT y z) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@commutator_group gT (@gval gT G) A))))) *)
by rewrite -(mulgK [~ x, z] (_ ^ x)) -commMgJ !(mem_commg, groupMl, groupV).
Qed.
Lemma commg_normr G A : G \subset 'N([~: A, G]).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT A (@gval gT G)))))) *)
by rewrite commGC commg_norml.
Qed.
Lemma commg_norm G H : G <*> H \subset 'N([~: G, H]).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT (@gval gT G) (@gval gT H)))))) *)
by rewrite join_subG ?commg_norml ?commg_normr.
Qed.
Lemma commg_normal G H : [~: G, H] <| G <*> H.
Proof.
(* Goal: is_true (@normal gT (@commutator gT (@gval gT G) (@gval gT H)) (@joing gT (@gval gT G) (@gval gT H))) *)
by rewrite /(_ <| _) commg_sub commg_norm.
Qed.
Lemma normsRl A G B : A \subset G -> A \subset 'N([~: G, B]).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT (@gval gT G) B))))) *)
by move=> sAG; apply: subset_trans (commg_norml G B).
Qed.
Lemma normsRr A G B : A \subset G -> A \subset 'N([~: B, G]).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT B (@gval gT G)))))) *)
by move=> sAG; apply: subset_trans (commg_normr G B).
Qed.
Lemma commg_subr G H : ([~: G, H] \subset H) = (G \subset 'N(H)).
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) *)
rewrite gen_subG; apply/subsetP/subsetP=> [sRH x Gx | nGH xy].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@gval gT G) (@gval gT H))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) *)
rewrite inE; apply/subsetP=> _ /imsetP[y Ky ->].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@gval gT G) (@gval gT H))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (@conjg gT y x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
by rewrite conjg_Rmul groupMr // sRH // mem_imset2 ?groupV.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@gval gT G) (@gval gT H))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
case/imset2P=> x y Gx Hy ->{xy}.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@commg gT x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
by rewrite commgEr groupMr // memJ_norm (groupV, nGH).
Qed.
Lemma commg_subl G H : ([~: G, H] \subset G) = (H \subset 'N(G)).
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT G))))) *)
by rewrite commGC commg_subr.
Qed.
Lemma commg_subI A B G H :
A \subset 'N_G(H) -> B \subset 'N_H(G) -> [~: A, B] \subset G :&: H.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@gval gT H))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@normaliser gT (@gval gT G))))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) *)
rewrite !subsetI -(gen_subG _ 'N(G)) -(gen_subG _ 'N(H)).
(* Goal: forall (_ : is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@generated gT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@normaliser_group gT (@gval gT H)))))))) (_ : is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@generated gT B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@normaliser_group gT (@gval gT G)))))))), is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
rewrite -commg_subr -commg_subl; case/andP=> sAG sRH; case/andP=> sBH sRG.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
by rewrite (subset_trans _ sRG) ?(subset_trans _ sRH) ?commgSS ?subset_gen.
Qed.
Lemma quotient_cents2 A B K :
A \subset 'N(K) -> B \subset 'N(K) ->
(A / K \subset 'C(B / K)) = ([~: A, B] \subset K).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT K)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT K)))))), @eq bool (@subset (@coset_finType gT (@gval gT K)) (@mem (Finite.sort (@coset_finType gT (@gval gT K))) (predPredType (Finite.sort (@coset_finType gT (@gval gT K)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT K)) (@quotient gT A (@gval gT K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))) (@centraliser (@coset_groupType gT (@gval gT K)) (@quotient gT B (@gval gT K)))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) *)
move=> nKA nKB.
(* Goal: @eq bool (@subset (@coset_finType gT (@gval gT K)) (@mem (Finite.sort (@coset_finType gT (@gval gT K))) (predPredType (Finite.sort (@coset_finType gT (@gval gT K)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT K)) (@quotient gT A (@gval gT K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))) (@centraliser (@coset_groupType gT (@gval gT K)) (@quotient gT B (@gval gT K)))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) *)
by rewrite (sameP commG1P trivgP) /= -quotientR // quotient_sub1 // comm_subG.
Qed.
Lemma quotient_cents2r A B K :
[~: A, B] \subset K -> (A / K) \subset 'C(B / K).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))), is_true (@subset (@coset_finType gT (@gval gT K)) (@mem (Finite.sort (@coset_finType gT (@gval gT K))) (predPredType (Finite.sort (@coset_finType gT (@gval gT K)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT K)) (@quotient gT A (@gval gT K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))) (@centraliser (@coset_groupType gT (@gval gT K)) (@quotient gT B (@gval gT K)))))) *)
move=> sABK; rewrite -2![_ / _]morphimIdom -!quotientE.
(* Goal: is_true (@subset (@coset_finType gT (@gval gT K)) (@mem (Finite.sort (@coset_finType gT (@gval gT K))) (predPredType (Finite.sort (@coset_finType gT (@gval gT K)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT K)) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@normaliser_group gT (@gval gT K))) A) (@gval gT K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT K)))) (@centraliser (@coset_groupType gT (@gval gT K)) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@normaliser_group gT (@gval gT K))) B) (@gval gT K)))))) *)
by rewrite quotient_cents2 ?subsetIl ?(subset_trans _ sABK) ?commgSS ?subsetIr.
Qed.
Lemma sub_der1_norm G H : G^`(1) \subset H -> H \subset G -> G \subset 'N(H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) *)
by move=> sG'H sHG; rewrite -commg_subr (subset_trans _ sG'H) ?commgS.
Qed.
Lemma sub_der1_normal G H : G^`(1) \subset H -> H \subset G -> H <| G.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (@normal gT (@gval gT H) (@gval gT G)) *)
by move=> sG'H sHG; rewrite /(H <| G) sHG sub_der1_norm.
Qed.
Lemma sub_der1_abelian G H : G^`(1) \subset H -> abelian (G / H).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))), is_true (@abelian (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) *)
by move=> sG'H; apply: quotient_cents2r.
Qed.
Lemma der1_min G H : G \subset 'N(H) -> abelian (G / H) -> G^`(1) \subset H.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))))) (_ : is_true (@abelian (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
by move=> nHG abGH; rewrite -quotient_cents2.
Qed.
Lemma der_abelian n G : abelian (G^`(n) / G^`(n.+1)).
Proof.
(* Goal: is_true (@abelian (@coset_groupType gT (@derived_at (S n) gT (@gval gT G))) (@quotient gT (@derived_at n gT (@gval gT G)) (@derived_at (S n) gT (@gval gT G)))) *)
by rewrite sub_der1_abelian // der_subS.
Qed.
Lemma commg_normSl G H K : G \subset 'N(H) -> [~: G, H] \subset 'N([~: K, H]).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT (@gval gT K) (@gval gT H)))))) *)
by move=> nHG; rewrite normsRr // commg_subr.
Qed.
Lemma commg_normSr G H K : G \subset 'N(H) -> [~: H, G] \subset 'N([~: H, K]).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@gval gT H) (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT (@gval gT H) (@gval gT K)))))) *)
by move=> nHG; rewrite !(commGC H) commg_normSl.
Qed.
Lemma commMGr G H K : [~: G, K] * [~: H, K] \subset [~: G * H , K].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT K)) (@commutator gT (@gval gT H) (@gval gT K))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H)) (@gval gT K))))) *)
by rewrite mul_subG ?commSg ?(mulG_subl, mulG_subr).
Qed.
Lemma commMG G H K :
H \subset 'N([~: G, K]) -> [~: G * H , K] = [~: G, K] * [~: H, K].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@commutator gT (@gval gT G) (@gval gT K)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H)) (@gval gT K)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT K)) (@commutator gT (@gval gT H) (@gval gT K))) *)
move=> nRH; apply/eqP; rewrite eqEsubset commMGr andbT.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H)) (@gval gT K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT K)) (@commutator gT (@gval gT H) (@gval gT K)))))) *)
have nRHK: [~: H, K] \subset 'N([~: G, K]) by rewrite comm_subG ?commg_normr.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H)) (@gval gT K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@commutator gT (@gval gT G) (@gval gT K)) (@commutator gT (@gval gT H) (@gval gT K)))))) *)
have defM := norm_joinEr nRHK; rewrite -defM gen_subG /=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@gval gT H)) (@gval gT K)))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT (@commutator gT (@gval gT G) (@gval gT K)) (@commutator gT (@gval gT H) (@gval gT K)))))) *)
apply/subsetP=> _ /imset2P[_ z /imset2P[x y Gx Hy ->] Kz ->].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@commg gT (@mulg (FinGroup.base gT) x y) z) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@joing gT (@commutator gT (@gval gT G) (@gval gT K)) (@commutator gT (@gval gT H) (@gval gT K)))))) *)
by rewrite commMgJ {}defM mem_mulg ?memJ_norm ?mem_commg // (subsetP nRH).
Qed.
Lemma comm3G1P A B C :
reflect {in A & B & C, forall h k l, [~ h, k, l] = 1} ([~: A, B, C] :==: 1).
Proof.
(* Goal: Bool.reflect (@prop_in111 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) C)) (fun h k l : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT h k) l) (oneg (FinGroup.base gT))) (inPhantom (forall h k l : FinGroup.arg_sort (FinGroup.base gT), @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT h k) l) (oneg (FinGroup.base gT))))) (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@commutator gT (@commutator gT A B) C : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) *)
have R_C := sameP trivgP commG1P.
(* Goal: Bool.reflect (@prop_in111 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) C)) (fun h k l : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT h k) l) (oneg (FinGroup.base gT))) (inPhantom (forall h k l : FinGroup.arg_sort (FinGroup.base gT), @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT h k) l) (oneg (FinGroup.base gT))))) (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@commutator gT (@commutator gT A B) C) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *)
rewrite -subG1 R_C gen_subG -{}R_C gen_subG.
(* Goal: Bool.reflect (@prop_in111 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) C)) (fun h k l : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT h k) l) (oneg (FinGroup.base gT))) (inPhantom (forall h k l : FinGroup.arg_sort (FinGroup.base gT), @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT h k) l) (oneg (FinGroup.base gT))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@commg_set gT A B) C))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (one_group gT))))) *)
apply: (iffP subsetP) => [cABC x y z Ax By Cz | cABC xyz].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xyz (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@commg_set gT A B) C)))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xyz (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (one_group gT))))) *)
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (oneg (FinGroup.base gT)) *)
by apply/set1P; rewrite cABC // !mem_imset2.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xyz (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@commg_set gT A B) C)))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) xyz (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (one_group gT))))) *)
by case/imset2P=> _ z /imset2P[x y Ax By ->] Cz ->; rewrite cABC.
Qed.
Lemma three_subgroup G H K :
[~: G, H, K] :=: 1 -> [~: H, K, G] :=: 1-> [~: K, G, H] :=: 1.
Proof.
(* Goal: forall (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@commutator gT (@gval gT G) (@gval gT H)) (@gval gT K)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@commutator gT (@gval gT H) (@gval gT K)) (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@commutator gT (@gval gT K) (@gval gT G)) (@gval gT H)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
move/eqP/comm3G1P=> cGHK /eqP/comm3G1P cHKG.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@commutator gT (@commutator gT (@gval gT K) (@gval gT G)) (@gval gT H)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
apply/eqP/comm3G1P=> x y z Kx Gy Hz; symmetry.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@commg gT (@commg gT x y) z) *)
rewrite -(conj1g y) -(Hall_Witt_identity y^-1 z x) invgK.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@conjg gT (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@conjg gT (@commg gT (@commg gT (@invg (FinGroup.base gT) y) (@invg (FinGroup.base gT) z)) x) z) (@conjg gT (@commg gT (@commg gT z (@invg (FinGroup.base gT) x)) (@invg (FinGroup.base gT) y)) x)) (@conjg gT (@commg gT (@commg gT x y) z) (@invg (FinGroup.base gT) y))) y) (@commg gT (@commg gT x y) z) *)
by rewrite cGHK ?groupV // cHKG ?groupV // !conj1g !mul1g conjgKV.
Qed.
Lemma der1_joing_cycles (x y : gT) :
let XY := <[x]> <*> <[y]> in let xy := [~ x, y] in
xy \in 'C(XY) -> XY^`(1) = <[xy]>.
Proof.
(* Goal: let XY := @joing gT (@cycle gT x) (@cycle gT y) in let xy := @commg gT x y in forall _ : is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) xy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT XY)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@derived_at (S O) gT XY) (@cycle gT xy) *)
rewrite joing_idl joing_idr /= -sub_cent1 => /norms_gen nRxy.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@derived_at (S O) gT (@joing gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y))) (@cycle gT (@commg gT x y)) *)
apply/eqP; rewrite eqEsubset cycle_subG mem_commg ?mem_gen ?set21 ?set22 //.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@joing gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT (@commg gT x y))))) true) *)
rewrite der1_min // quotient_gen -1?gen_subG // quotientU abelian_gen.
(* Goal: is_true (@abelian (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))) (@setU (@coset_finType gT (@gval gT (@cycle_group gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT (@cycle_group gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y) (@gval gT (@cycle_group gT (@commg gT x y)))))) *)
rewrite /abelian subUset centU !subsetI andbC centsC -andbA -!abelianE.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT (@cycle_group gT (@commg gT x y)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))) (@centraliser (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y) (@gval gT (@cycle_group gT (@commg gT x y)))))))) (andb (@abelian (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y) (@gval gT (@cycle_group gT (@commg gT x y))))) (andb (@abelian (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT (@cycle_group gT (@commg gT x y))))) (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT (@cycle_group gT (@commg gT x y)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))))) (@centraliser (@coset_groupType gT (@gval gT (@cycle_group gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y) (@gval gT (@cycle_group gT (@commg gT x y))))))))))) *)
rewrite !quotient_abelian ?(abelianS (subset_gen _) (cycle_abelian _)) //=.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (@coset_baseGroupType gT (@cycle gT (@commg gT x y)))) (@mem (@coset_of gT (@cycle gT (@commg gT x y))) (predPredType (@coset_of gT (@cycle gT (@commg gT x y)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@cycle gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@cycle gT (@commg gT x y))))) (@mem (@coset_of gT (@cycle gT (@commg gT x y))) (predPredType (@coset_of gT (@cycle gT (@commg gT x y)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@cycle gT (@commg gT x y)))) (@centraliser (@coset_groupType gT (@cycle gT (@commg gT x y))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y) (@cycle gT (@commg gT x y))))))) (@subset (FinGroup.arg_finType (@coset_baseGroupType gT (@cycle gT (@commg gT x y)))) (@mem (@coset_of gT (@cycle gT (@commg gT x y))) (predPredType (@coset_of gT (@cycle gT (@commg gT x y)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@cycle gT (@commg gT x y)))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@cycle gT (@commg gT x y))))) (@mem (@coset_of gT (@cycle gT (@commg gT x y))) (predPredType (@coset_of gT (@cycle gT (@commg gT x y)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@cycle gT (@commg gT x y)))) (@centraliser (@coset_groupType gT (@cycle gT (@commg gT x y))) (@quotient gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y) (@cycle gT (@commg gT x y)))))))) *)
by rewrite andbb quotient_cents2r ?genS // /commg_set imset2_set1l imset_set1.
Qed.
Lemma commgAC G x y z : x \in G -> y \in G -> z \in G ->
commute y z -> abelian [~: [set x], G] -> [~ x, y, z] = [~ x, z, y].
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : @commute (FinGroup.base gT) y z) (_ : is_true (@abelian gT (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G)))), @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (@commg gT (@commg gT x z) y) *)
move=> Gx Gy Gz cyz /centsP cRxG; pose cx' u := [~ x^-1, u].
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (@commg gT (@commg gT x z) y) *)
have xR3 u v: [~ x, u, v] = x^-1 * (cx' u * cx' v) * x ^ (u * v).
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (@commg gT (@commg gT x z) y) *)
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x u) v) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@invg (FinGroup.base gT) x) (@mulg (FinGroup.base gT) (cx' u) (cx' v))) (@conjg gT x (@mulg (FinGroup.base gT) u v))) *)
rewrite mulgA -conjg_mulR conjVg [cx' v]commgEl mulgA -invMg.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (@commg gT (@commg gT x z) y) *)
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x u) v) (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@invg (FinGroup.base gT) (@mulg (FinGroup.base gT) (@invg (FinGroup.base gT) x) (@conjg gT x u))) (@conjg gT (@invg (FinGroup.base gT) x) v)) (@conjg gT x (@mulg (FinGroup.base gT) u v))) *)
by rewrite -mulgA conjgM -conjMg -!commgEl.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (@commg gT (@commg gT x z) y) *)
suffices RxGcx' u: u \in G -> cx' u \in [~: [set x], G].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) u (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (cx' u) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G))))) *)
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@commg gT (@commg gT x y) z) (@commg gT (@commg gT x z) y) *)
by rewrite !xR3 {}cyz; congr (_ * _ * _); rewrite cRxG ?RxGcx'.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) u (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (cx' u) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G))))) *)
move=> Gu; suffices/groupMl <-: [~ x, u] ^ x^-1 \in [~: [set x], G].
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT (@commg gT x u) (@invg (FinGroup.base gT) x)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G))))) *)
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@conjg gT (@commg gT x u) (@invg (FinGroup.base gT) x)) (cx' u)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@commutator_group gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G)))))) *)
by rewrite -commMgJ mulgV comm1g group1.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT (@commg gT x u) (@invg (FinGroup.base gT) x)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G))))) *)
by rewrite memJ_norm ?mem_commg ?set11 // groupV (subsetP (commg_normr _ _)).
Qed.
Lemma comm_norm_cent_cent H G K :
H \subset 'N(G) -> H \subset 'C(K) -> G \subset 'N(K) ->
[~: G, H] \subset 'C(K).
Lemma charR H K G : H \char G -> K \char G -> [~: H, K] \char G.
Lemma der_char n G : G^`(n) \char G.
Proof.
(* Goal: is_true (@characteristic gT (@derived_at n gT (@gval gT G)) (@gval gT G)) *)
by elim: n => [|n IHn]; rewrite ?char_refl // dergSn charR.
Qed.
Lemma der_sub n G : G^`(n) \subset G.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at n gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite char_sub ?der_char.
Qed.
Lemma der_norm n G : G \subset 'N(G^`(n)).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@derived_at n gT (@gval gT G)))))) *)
by rewrite char_norm ?der_char.
Qed.
Lemma der_normal n G : G^`(n) <| G.
Proof.
(* Goal: is_true (@normal gT (@derived_at n gT (@gval gT G)) (@gval gT G)) *)
by rewrite char_normal ?der_char.
Qed.
Lemma der_subS n G : G^`(n.+1) \subset G^`(n).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S n) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at n gT (@gval gT G))))) *)
by rewrite comm_subG.
Qed.
Lemma der_normalS n G : G^`(n.+1) <| G^`(n).
Proof.
(* Goal: is_true (@normal gT (@derived_at (S n) gT (@gval gT G)) (@derived_at n gT (@gval gT G))) *)
by rewrite sub_der1_normal // der_subS.
Qed.
Lemma morphim_der rT D (f : {morphism D >-> rT}) n G :
G \subset D -> f @* G^`(n) = (f @* G)^`(n).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@derived_at n gT (@gval gT G))) (@derived_at n rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
move=> sGD; elim: n => // n IHn.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@derived_at (S n) gT (@gval gT G))) (@derived_at (S n) rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
by rewrite !dergSn -IHn morphimR ?(subset_trans (der_sub n G)).
Qed.
Lemma dergS n G H : G \subset H -> G^`(n) \subset H^`(n).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at n gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at n gT (@gval gT H))))) *)
by move=> sGH; elim: n => // n IHn; apply: commgSS.
Qed.
Lemma quotient_der n G H : G \subset 'N(H) -> G^`(n) / H = (G / H)^`(n).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))), @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@derived_at n gT (@gval gT G)) (@gval gT H)) (@derived_at n (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) *)
exact: morphim_der.
Qed.
Lemma derJ G n x : (G :^ x)^`(n) = G^`(n) :^ x.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@derived_at n gT (@conjugate gT (@gval gT G) x)) (@conjugate gT (@derived_at n gT (@gval gT G)) x) *)
by elim: n => //= n IHn; rewrite !dergSn IHn -conjsRg.
Qed.
Lemma derG1P G : reflect (G^`(1) = 1) (abelian G).
Proof.
(* Goal: Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@derived_at (S O) gT (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@abelian gT (@gval gT G)) *)
exact: commG1P.
Qed.
End Commutator_properties.
Arguments derG1P {gT G}.
Lemma der_cont n : GFunctor.continuous (@derived_at n).
Proof.
(* Goal: GFunctor.continuous (@derived_at n) *)
by move=> aT rT G f; rewrite morphim_der.
Qed.
Canonical der_igFun n := [igFun by der_sub^~ n & der_cont n].
Canonical der_gFun n := [gFun by der_cont n].
Canonical der_mgFun n := [mgFun by dergS^~ n].
Lemma isog_der (aT rT : finGroupType) n (G : {group aT}) (H : {group rT}) :
G \isog H -> G^`(n) \isog H^`(n).
Proof.
(* Goal: forall _ : is_true (@isog aT rT (@gval aT G) (@gval rT H)), is_true (@isog aT rT (@derived_at n aT (@gval aT G)) (@derived_at n rT (@gval rT H))) *)
exact: gFisog.
Qed.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear4.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_collinearparallel :
forall A B C c d,
Par A B c d -> Col c d C -> neq C d ->
Par A B C d.
Proof.
(* Goal: forall (A B C c d : @Point Ax0) (_ : @Par Ax0 A B c d) (_ : @Col Ax0 c d C) (_ : @neq Ax0 C d), @Par Ax0 A B C d *)
intros.
(* Goal: @Par Ax0 A B C d *)
let Tf:=fresh in assert (Tf:exists R a b p q, (neq A B /\ neq c d /\ Col A B a /\ Col A B b /\ neq a b /\ Col c d p /\ Col c d q /\ neq p q /\ ~ Meet A B c d /\ BetS a R q /\ BetS p R b)) by (conclude_def Par );destruct Tf as [R[a[b[p[q]]]]];spliter.
(* Goal: @Par Ax0 A B C d *)
assert (neq d C) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A B C d *)
assert (Col d C p) by (conclude lemma_collinear4).
(* Goal: @Par Ax0 A B C d *)
assert (Col C d p) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C d *)
assert (Col d C q) by (conclude lemma_collinear4).
(* Goal: @Par Ax0 A B C d *)
assert (Col C d q) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C d *)
assert (~ Meet A B C d).
(* Goal: @Par Ax0 A B C d *)
(* Goal: not (@Meet Ax0 A B C d) *)
{
(* Goal: not (@Meet Ax0 A B C d) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists E, (neq A B /\ neq C d /\ Col A B E /\ Col C d E)) by (conclude_def Meet );destruct Tf as [E];spliter.
(* Goal: False *)
assert (Col C d c) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col d E c) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col c d E) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B c d) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @Par Ax0 A B C d *)
}
(* Goal: @Par Ax0 A B C d *)
assert (Par A B C d) by (conclude_def Par ).
(* Goal: @Par Ax0 A B C d *)
close.
Qed.
End Euclid.
|
From mathcomp
Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq fintype.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Module Ordered.
Section RawMixin.
Structure mixin_of (T : eqType) :=
Mixin {ordering : rel T;
_ : irreflexive ordering;
_ : transitive ordering;
_ : forall x y, [|| ordering x y, x == y | ordering y x]}.
End RawMixin.
Section ClassDef.
Record class_of (T : Type) := Class {
base : Equality.class_of T;
mixin : mixin_of (EqType T base)}.
Local Coercion base : class_of >-> Equality.class_of.
Structure type : Type := Pack {sort : Type; _ : class_of sort; _ : Type}.
Local Coercion sort : type >-> Sortclass.
Variables (T : Type) (cT : type).
Definition class := let: Pack _ c _ as cT' := cT return class_of cT' in c.
Definition clone c of phant_id class c := @Pack T c T.
Definition pack b (m0 : mixin_of (EqType T b)) :=
fun m & phant_id m0 m => Pack (@Class T b m) T.
Definition eqType := Eval hnf in EqType cT class.
End ClassDef.
Module Exports.
Coercion sort : type >-> Sortclass.
Coercion eqType : type >-> Equality.type.
Canonical Structure eqType.
Notation ordType := Ordered.type.
Notation OrdMixin := Mixin.
Notation OrdType T m := (@pack T _ m _ id).
Definition ord T : rel (sort T) := (ordering (mixin (class T))).
Notation "[ 'ordType' 'of' T 'for' cT ]" := (@clone T cT _ id)
(at level 0, format "[ 'ordType' 'of' T 'for' cT ]") : form_scope.
Notation "[ 'ordType' 'of' T ]" := (@clone T _ _ id)
(at level 0, format "[ 'ordType' 'of' T ]") : form_scope.
End Exports.
End Ordered.
Export Ordered.Exports.
Prenex Implicits ord.
Section Lemmas.
Variable T : ordType.
Lemma irr : irreflexive (@ord T).
Proof.
(* Goal: @irreflexive (Ordered.sort T) (@ord T) *)
by case: T=>s [b [m]].
Qed.
Lemma trans : transitive (@ord T).
Proof.
(* Goal: @transitive (Ordered.sort T) (@ord T) *)
by case: T=>s [b [m]].
Qed.
Lemma total (x y : T) : [|| ord x y, x == y | ord y x].
Proof.
(* Goal: is_true (orb (@ord T x y) (orb (@eq_op (Ordered.eqType T) x y) (@ord T y x))) *)
by case: T x y=>s [b [m]].
Qed.
Lemma nsym (x y : T) : ord x y -> ord y x -> False.
Proof.
(* Goal: forall (_ : is_true (@ord T x y)) (_ : is_true (@ord T y x)), False *)
by move=>E1 E2; move: (trans E1 E2); rewrite irr.
Qed.
End Lemmas.
Section Totality.
Variable K : ordType.
CoInductive total_spec (x y : K) : bool -> bool -> bool -> Type :=
| total_spec_lt of ord x y : total_spec x y true false false
| total_spec_eq of x == y : total_spec x y false true false
| total_spec_gt of ord y x : total_spec x y false false true.
Lemma totalP x y : total_spec x y (ord x y) (x == y) (ord y x).
Proof.
(* Goal: total_spec x y (@ord K x y) (@eq_op (Ordered.eqType K) x y) (@ord K y x) *)
case H1: (x == y).
(* Goal: total_spec x y (@ord K x y) false (@ord K y x) *)
(* Goal: total_spec x y (@ord K x y) true (@ord K y x) *)
-
(* Goal: total_spec x y (@ord K x y) false (@ord K y x) *)
(* Goal: total_spec x y (@ord K x y) true (@ord K y x) *)
by rewrite (eqP H1) irr; apply: total_spec_eq.
(* Goal: total_spec x y (@ord K x y) false (@ord K y x) *)
case H2: (ord x y); case H3: (ord y x).
(* Goal: total_spec x y false false false *)
(* Goal: total_spec x y false false true *)
(* Goal: total_spec x y true false false *)
(* Goal: total_spec x y true false true *)
-
(* Goal: total_spec x y false false false *)
(* Goal: total_spec x y false false true *)
(* Goal: total_spec x y true false false *)
(* Goal: total_spec x y true false true *)
by case: (nsym H2 H3).
(* Goal: total_spec x y false false false *)
(* Goal: total_spec x y false false true *)
(* Goal: total_spec x y true false false *)
-
(* Goal: total_spec x y false false false *)
(* Goal: total_spec x y false false true *)
(* Goal: total_spec x y true false false *)
by apply: total_spec_lt H2.
(* Goal: total_spec x y false false false *)
(* Goal: total_spec x y false false true *)
-
(* Goal: total_spec x y false false false *)
(* Goal: total_spec x y false false true *)
by apply: total_spec_gt H3.
(* Goal: total_spec x y false false false *)
by move: (total x y); rewrite H1 H2 H3.
Qed.
End Totality.
Section NatOrd.
Lemma irr_ltn_nat : irreflexive ltn. Proof. by move=>x; rewrite /= ltnn. Qed.
Proof.
(* Goal: @irreflexive nat (@rel_of_simpl_rel nat ltn) *)
by move=>x; rewrite /= ltnn.
Qed.
Lemma total_ltn_nat : forall x y, [|| x < y, x == y | y < x].
Proof.
(* Goal: forall x y : nat, is_true (orb (leq (S x) y) (orb (@eq_op nat_eqType x y) (leq (S y) x))) *)
by move=>*; case: ltngtP.
Qed.
Definition nat_ordMixin := OrdMixin irr_ltn_nat trans_ltn_nat total_ltn_nat.
Canonical Structure nat_ordType := OrdType nat nat_ordMixin.
End NatOrd.
Section ProdOrd.
Variables K T : ordType.
Definition lex : rel (K * T) :=
fun x y => if x.1 == y.1 then ord x.2 y.2 else ord x.1 y.1.
Lemma irr_lex : irreflexive lex.
Proof.
(* Goal: @irreflexive (prod (Ordered.sort K) (Ordered.sort T)) lex *)
by move=>x; rewrite /lex eq_refl irr.
Qed.
Lemma trans_lex : transitive lex.
Proof.
(* Goal: @transitive (prod (Ordered.sort K) (Ordered.sort T)) lex *)
move=>[x1 x2][y1 y2][z1 z2]; rewrite /lex /=.
(* Goal: forall (_ : is_true (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1)) (_ : is_true (if @eq_op (Ordered.eqType K) x1 z1 then @ord T x2 z2 else @ord K x1 z1)), is_true (if @eq_op (Ordered.eqType K) y1 z1 then @ord T y2 z2 else @ord K y1 z1) *)
case: ifP=>H1; first by rewrite (eqP H1); case: eqP=>// _; apply: trans.
(* Goal: forall (_ : is_true (@ord K y1 x1)) (_ : is_true (if @eq_op (Ordered.eqType K) x1 z1 then @ord T x2 z2 else @ord K x1 z1)), is_true (if @eq_op (Ordered.eqType K) y1 z1 then @ord T y2 z2 else @ord K y1 z1) *)
case: ifP=>H2; first by rewrite (eqP H2) in H1 *; rewrite H1.
(* Goal: forall (_ : is_true (@ord K y1 x1)) (_ : is_true (@ord K x1 z1)), is_true (if @eq_op (Ordered.eqType K) y1 z1 then @ord T y2 z2 else @ord K y1 z1) *)
case: ifP=>H3; last by apply: trans.
(* Goal: forall (_ : is_true (@ord K y1 x1)) (_ : is_true (@ord K x1 z1)), is_true (@ord T y2 z2) *)
by rewrite (eqP H3)=>R1; move/(nsym R1).
Qed.
Lemma total_lex : forall x y, [|| lex x y, x == y | lex y x].
Proof.
(* Goal: forall x y : prod (Ordered.sort K) (Ordered.sort T), is_true (orb (lex x y) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) x y) (lex y x))) *)
move=>[x1 x2][y1 y2]; rewrite /lex /=.
(* Goal: is_true (orb (if @eq_op (Ordered.eqType K) x1 y1 then @ord T x2 y2 else @ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *)
case: ifP=>H1.
(* Goal: is_true (orb (@ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *)
(* Goal: is_true (orb (@ord T x2 y2) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *)
-
(* Goal: is_true (orb (@ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *)
(* Goal: is_true (orb (@ord T x2 y2) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *)
rewrite (eqP H1) eq_refl -pair_eqE /= eq_refl /=; exact: total.
(* Goal: is_true (orb (@ord K x1 y1) (orb (@eq_op (prod_eqType (Ordered.eqType K) (Ordered.eqType T)) (@pair (Ordered.sort K) (Ordered.sort T) x1 x2) (@pair (Ordered.sort K) (Ordered.sort T) y1 y2)) (if @eq_op (Ordered.eqType K) y1 x1 then @ord T y2 x2 else @ord K y1 x1))) *)
rewrite (eq_sym y1) -pair_eqE /= H1 /=.
(* Goal: is_true (orb (@ord K x1 y1) (@ord K y1 x1)) *)
by move: (total x1 y1); rewrite H1.
Qed.
Definition prod_ordMixin := OrdMixin irr_lex trans_lex total_lex.
Canonical Structure prod_ordType := Eval hnf in OrdType (K * T) prod_ordMixin.
End ProdOrd.
Section FinTypeOrd.
Variable T : finType.
Definition ordf : rel T :=
fun x y => index x (enum T) < index y (enum T).
Lemma irr_ordf : irreflexive ordf.
Proof.
(* Goal: @irreflexive (Finite.sort T) ordf *)
by move=>x; rewrite /ordf ltnn.
Qed.
Lemma trans_ordf : transitive ordf.
Proof.
(* Goal: @transitive (Finite.sort T) ordf *)
by move=>x y z; rewrite /ordf; apply: ltn_trans.
Qed.
Lemma total_ordf : forall x y, [|| ordf x y, x == y | ordf y x].
Proof.
(* Goal: forall x y : Finite.sort T, is_true (orb (ordf x y) (orb (@eq_op (Finite.eqType T) x y) (ordf y x))) *)
move=>x y; rewrite /ordf; case: ltngtP=>//= H; rewrite ?orbT ?orbF //.
(* Goal: is_true (@eq_op (Finite.eqType T) x y) *)
have [H1 H2]: x \in enum T /\ y \in enum T by rewrite !mem_enum.
(* Goal: is_true (@eq_op (Finite.eqType T) x y) *)
by rewrite -(nth_index x H1) -(nth_index x H2) H eq_refl.
Qed.
Definition fin_ordMixin := OrdMixin irr_ordf trans_ordf total_ordf.
End FinTypeOrd.
Notation "[ 'fin_ordMixin' 'of' T ]" :=
(fin_ordMixin _ : Ordered.mixin_of [eqType of T]) (at level 0).
Definition ordinal_ordMixin n := [fin_ordMixin of 'I_n].
Canonical Structure ordinal_ordType n := OrdType 'I_n (ordinal_ordMixin n).
|
From mathcomp
Require Import ssreflect ssrfun ssrbool ssrnat seq eqtype.
From LemmaOverloading
Require Import prelude prefix heaps terms.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Obligation Tactic := idtac.
Set Printing Existential Instances.
Structure pack_heap := PackHeap { pack_h :> heap }.
Definition pack_found := PackHeap.
Definition pack_right := pack_found.
Canonical pack_left h := pack_right h.
Structure abs_pts x pts_A (pts_v : pts_A) pts_r :=
AbsPts {
pts_h :> pack_heap;
_ : pack_h pts_h = x :-> pts_v :+ pts_r }.
Arguments AbsPts x [pts_A].
Definition pts_inv x A (v :A) r (f : abs_pts x v r) :=
match f return (pack_h f = x:->v:+r) with (AbsPts p i) => i end.
Structure abs_heap h1 r :=
AbsHeap {
heap_h :> pack_heap;
_ : pack_h heap_h = h1 :+ r }.
Arguments AbsHeap : clear implicits.
Definition heap_inv h r (f : abs_heap h r) :=
match f return pack_h f = h :+ r with
AbsHeap h' i => i
end.
Structure trigger := Pack { unpack :> unit }.
Definition pack10 := Pack.
Definition pack09 := pack10.
Definition pack08 := pack09.
Definition pack07 := pack08.
Definition pack06 := pack07.
Definition pack05 := pack06.
Definition pack04 := pack05.
Definition pack03 := pack04.
Definition pack02 := pack03.
Definition pack01 := pack02.
Canonical insLast h1 h2 r (d : def h2) (i : h1 :+r = h2) :=
@HeapEq h1 h2 r d i (pack10 tt) (h1 :+ r = h2) i.
Lemma cancel1 :
forall h1 h2 : heap, def h1 -> h1 = h2 -> def h2.
Proof.
(* Goal: forall (h1 h2 : heap) (_ : is_true (def h1)) (_ : @eq heap h1 h2), is_true (def h2) *)
by move=>h1 h2 D <-.
Qed.
Lemma cancel2 :
forall h1 h2 : heap, h1 = h2 -> h1 :+ empty = h2.
Proof.
(* Goal: forall (h1 h2 : heap) (_ : @eq heap h1 h2), @eq heap (union2 h1 empty) h2 *)
by move=>h1 h2 ->; apply: unh0.
Qed.
Lemma cancel (h1 h2 : heap) (D : def h1) (H : h1 = h2)
(c : @heapeq h1 h2 empty (cancel1 D H) (cancel2 H)) :
tt = dummy c -> prop c.
Proof.
(* Goal: forall _ : @eq unit tt (unpack (@dummy h1 h2 empty (@cancel1 h1 h2 D H) (@cancel2 h1 h2 H) c)), @prop h1 h2 empty (@cancel1 h1 h2 D H) (@cancel2 h1 h2 H) c *)
move=>_.
(* Goal: @prop h1 h2 empty (@cancel1 h1 h2 D H) (@cancel2 h1 h2 H) c *)
apply c.
Qed.
Example stress
(h1 h2 h3 h4 h5 h6 h7 h8 h9 h10 : heap)
(x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 : ptr) :
def (x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10) ->
x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10 =
x6 :-> 6 :+ x7 :-> 7 :+ x8 :-> 8 :+ x9 :-> 9 :+ x10 :-> 10 ->
True.
move=>D H.
rewrite -!unA in D H.
Time move: (cancel D H (erefl _)).
Abort.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_3.
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_2.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_equaltorightisright :
forall A B C a b c,
Per A B C -> CongA a b c A B C ->
Per a b c.
Proof.
(* Goal: forall (A B C a b c : @Point Ax0) (_ : @Per Ax0 A B C) (_ : @CongA Ax0 a b c A B C), @Per Ax0 a b c *)
intros.
(* Goal: @Per Ax0 a b c *)
assert (CongA A B C a b c) by (conclude lemma_equalanglessymmetric).
(* Goal: @Per Ax0 a b c *)
let Tf:=fresh in assert (Tf:exists E F e f, (Out B A E /\ Out B C F /\ Out b a e /\ Out b c f /\ Cong B E b e /\ Cong B F b f /\ Cong E F e f /\ nCol A B C)) by (conclude_def CongA );destruct Tf as [E[F[e[f]]]];spliter.
(* Goal: @Per Ax0 a b c *)
assert (Per A B F) by (conclude lemma_8_3).
(* Goal: @Per Ax0 a b c *)
assert (Per F B A) by (conclude lemma_8_2).
(* Goal: @Per Ax0 a b c *)
assert (Per F B E) by (conclude lemma_8_3).
(* Goal: @Per Ax0 a b c *)
assert (Per E B F) by (conclude lemma_8_2).
(* Goal: @Per Ax0 a b c *)
assert (neq B E) by (conclude lemma_raystrict).
(* Goal: @Per Ax0 a b c *)
assert (neq E B) by (conclude lemma_inequalitysymmetric).
(* Goal: @Per Ax0 a b c *)
let Tf:=fresh in assert (Tf:exists W, (BetS E B W /\ Cong E B W B /\ Cong E F W F /\ neq B F)) by (conclude_def Per );destruct Tf as [W];spliter.
(* Goal: @Per Ax0 a b c *)
assert (neq b e) by (conclude axiom_nocollapse).
(* Goal: @Per Ax0 a b c *)
assert (neq e b) by (conclude lemma_inequalitysymmetric).
(* Goal: @Per Ax0 a b c *)
let Tf:=fresh in assert (Tf:exists w, (BetS e b w /\ Cong b w e b)) by (conclude lemma_extension);destruct Tf as [w];spliter.
(* Goal: @Per Ax0 a b c *)
assert (Cong e b E B) by (forward_using lemma_doublereverse).
(* Goal: @Per Ax0 a b c *)
assert (Cong b w E B) by (conclude lemma_congruencetransitive).
(* Goal: @Per Ax0 a b c *)
assert (Cong E B B W) by (forward_using lemma_congruenceflip).
(* Goal: @Per Ax0 a b c *)
assert (Cong b w B W) by (conclude lemma_congruencetransitive).
(* Goal: @Per Ax0 a b c *)
assert (Cong b f B F) by (conclude lemma_congruencesymmetric).
(* Goal: @Per Ax0 a b c *)
assert (Cong e f E F) by (conclude lemma_congruencesymmetric).
(* Goal: @Per Ax0 a b c *)
assert (Cong e w E W) by (conclude cn_sumofparts).
(* Goal: @Per Ax0 a b c *)
assert (Cong f w F W) by (conclude (axiom_5_line e b w f E B W F)).
(* Goal: @Per Ax0 a b c *)
assert (Cong e b B W) by (conclude lemma_congruencetransitive).
(* Goal: @Per Ax0 a b c *)
assert (Cong B W b w) by (conclude lemma_congruencesymmetric).
(* Goal: @Per Ax0 a b c *)
assert (Cong e b b w) by (conclude lemma_congruencetransitive).
(* Goal: @Per Ax0 a b c *)
assert (Cong e b w b) by (forward_using lemma_congruenceflip).
(* Goal: @Per Ax0 a b c *)
assert (Cong e f W F) by (conclude lemma_congruencetransitive).
(* Goal: @Per Ax0 a b c *)
assert (Cong W F w f) by (forward_using lemma_doublereverse).
(* Goal: @Per Ax0 a b c *)
assert (Cong e f w f) by (conclude lemma_congruencetransitive).
(* Goal: @Per Ax0 a b c *)
assert (neq b f) by (conclude lemma_raystrict).
(* Goal: @Per Ax0 a b c *)
assert (Per e b f) by (conclude_def Per ).
(* Goal: @Per Ax0 a b c *)
assert (Out b f c) by (conclude lemma_ray5).
(* Goal: @Per Ax0 a b c *)
assert (Per e b c) by (conclude lemma_8_3).
(* Goal: @Per Ax0 a b c *)
assert (Per c b e) by (conclude lemma_8_2).
(* Goal: @Per Ax0 a b c *)
assert (Out b e a) by (conclude lemma_ray5).
(* Goal: @Per Ax0 a b c *)
assert (Per c b a) by (conclude lemma_8_3).
(* Goal: @Per Ax0 a b c *)
assert (Per a b c) by (conclude lemma_8_2).
(* Goal: @Per Ax0 a b c *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.euclidean_tactics.
Section Euclid.
Context `{Ax1:euclidean_neutral}.
Lemma lemma_parallelsymmetric :
forall A B C D,
Par A B C D ->
Par C D A B.
Proof.
(* Goal: forall (A B C D : @Point Ax1) (_ : @Par Ax1 A B C D), @Par Ax1 C D A B *)
intros.
(* Goal: @Par Ax1 C D A B *)
let Tf:=fresh in assert (Tf:exists a b c d m, (neq A B /\ neq C D /\ Col A B a /\ Col A B b /\ neq a b /\ Col C D c /\ Col C D d /\ neq c d /\ ~ Meet A B C D /\ BetS a m d /\ BetS c m b)) by (conclude_def Par );destruct Tf as [a[b[c[d[m]]]]];spliter.
(* Goal: @Par Ax1 C D A B *)
assert (~ Meet C D A B).
(* Goal: @Par Ax1 C D A B *)
(* Goal: not (@Meet Ax1 C D A B) *)
{
(* Goal: not (@Meet Ax1 C D A B) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists P, (neq C D /\ neq A B /\ Col C D P /\ Col A B P)) by (conclude_def Meet );destruct Tf as [P];spliter.
(* Goal: False *)
assert (Meet A B C D) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @Par Ax1 C D A B *)
}
(* Goal: @Par Ax1 C D A B *)
assert (Par C D A B) by (conclude_def Par ).
(* Goal: @Par Ax1 C D A B *)
close.
Qed.
End Euclid.
|
Require Import Coq.FSets.FSetInterface.
Require Import Metalib.CoqFSetDecide.
Module Notin_fun
(E : DecidableType) (Import X : FSetInterface.WSfun E).
Module Import D := CoqFSetDecide.WDecide_fun E X.
Section Lemmas.
Variables x y : elt.
Variable s s' : X.t.
Lemma notin_empty_1 :
~ In x empty.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_add_1 :
~ In y (add x s) ->
~ E.eq x y.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_add_1' :
~ In y (add x s) ->
x <> y.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_add_2 :
~ In y (add x s) ->
~ In y s.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_add_3 :
~ E.eq x y ->
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_singleton_1 :
~ In y (singleton x) ->
~ E.eq x y.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_singleton_1' :
~ In y (singleton x) ->
x <> y.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_singleton_2 :
~ E.eq x y ->
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_remove_1 :
~ In y (remove x s) ->
E.eq x y \/ ~ In y s.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_remove_2 :
~ In y s ->
~ In y (remove x s).
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_remove_3 :
E.eq x y ->
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_remove_3' :
x = y ->
~ In y (remove x s).
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_union_1 :
~ In x (union s s') ->
~ In x s.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_union_2 :
~ In x (union s s') ->
~ In x s'.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_union_3 :
~ In x s ->
~ In x s' ->
~ In x (union s s').
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_inter_1 :
~ In x (inter s s') ->
~ In x s \/ ~ In x s'.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_inter_2 :
~ In x s ->
~ In x (inter s s').
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_inter_3 :
~ In x s' ->
~ In x (inter s s').
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_diff_1 :
~ In x (diff s s') ->
~ In x s \/ In x s'.
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_diff_2 :
~ In x s ->
~ In x (diff s s').
Proof.
(* Goal: None *)
fsetdec.
Qed.
Lemma notin_diff_3 :
In x s' ->
~ In x (diff s s').
Proof.
(* Goal: None *)
fsetdec.
Qed.
End Lemmas.
Hint Resolve
@notin_empty_1 @notin_add_3 @notin_singleton_2 @notin_remove_2
@notin_remove_3 @notin_remove_3' @notin_union_3 @notin_inter_2
@notin_inter_3 @notin_diff_2 @notin_diff_3.
Ltac destruct_notin :=
match goal with
| H : In ?x ?s -> False |- _ =>
change (~ In x s) in H;
destruct_notin
| |- In ?x ?s -> False =>
change (~ In x s);
destruct_notin
| H : ~ In _ empty |- _ =>
clear H;
destruct_notin
| H : ~ In ?y (add ?x ?s) |- _ =>
let J1 := fresh "NotInTac" in
let J2 := fresh "NotInTac" in
pose proof H as J1;
pose proof H as J2;
apply notin_add_1 in H;
apply notin_add_1' in J1;
apply notin_add_2 in J2;
destruct_notin
| H : ~ In ?y (singleton ?x) |- _ =>
let J := fresh "NotInTac" in
pose proof H as J;
apply notin_singleton_1 in H;
apply notin_singleton_1' in J;
destruct_notin
| H : ~ In ?y (remove ?x ?s) |- _ =>
let J := fresh "NotInTac" in
apply notin_remove_1 in H;
destruct H as [J | J];
destruct_notin
| H : ~ In ?x (union ?s ?s') |- _ =>
let J := fresh "NotInTac" in
pose proof H as J;
apply notin_union_1 in H;
apply notin_union_2 in J;
destruct_notin
| H : ~ In ?x (inter ?s ?s') |- _ =>
let J := fresh "NotInTac" in
apply notin_inter_1 in H;
destruct H as [J | J];
destruct_notin
| H : ~ In ?x (diff ?s ?s') |- _ =>
let J := fresh "NotInTac" in
apply notin_diff_1 in H;
destruct H as [J | J];
destruct_notin
| _ =>
idtac
end.
Ltac solve_notin :=
intros;
destruct_notin;
repeat first [ apply notin_union_3
| apply notin_add_3
| apply notin_singleton_2
| apply notin_empty_1
];
auto;
try tauto;
fail "Not solvable by [solve_notin]; try [destruct_notin]".
Lemma test_solve_notin_1 : forall x E F G,
~ In x (union E F) ->
~ In x G ->
~ In x (union E G).
Proof.
(* Goal: None *)
solve_notin.
Qed.
Lemma test_solve_notin_2 : forall x y E F G,
~ In x (union E (union (singleton y) F)) ->
~ In x G ->
~ In x (singleton y) /\ ~ In y (singleton x).
Proof.
(* Goal: None *)
split.
(* Goal: None *)
(* Goal: None *)
solve_notin.
(* Goal: None *)
solve_notin.
Qed.
Lemma test_solve_notin_3 : forall x y,
~ E.eq x y ->
Proof.
(* Goal: None *)
split.
(* Goal: None *)
(* Goal: None *)
solve_notin.
(* Goal: None *)
solve_notin.
Qed.
Lemma test_solve_notin_4 : forall x y E F G,
~ In x (union E (union (singleton x) F)) ->
~ In y G.
Proof.
(* Goal: None *)
solve_notin.
Qed.
Lemma test_solve_notin_5 : forall x y E F,
~ In x (union E (union (singleton y) F)) ->
~ In y E ->
~ E.eq y x /\ ~ E.eq x y.
Proof.
(* Goal: None *)
split.
(* Goal: None *)
(* Goal: None *)
solve_notin.
(* Goal: None *)
solve_notin.
Qed.
Lemma test_solve_notin_6 : forall x y E,
~ In x (add y E) ->
~ E.eq x y /\ ~ In x E.
Proof.
(* Goal: None *)
split.
(* Goal: None *)
(* Goal: None *)
solve_notin.
(* Goal: None *)
solve_notin.
Qed.
Lemma test_solve_notin_7 : forall x,
~ In x (singleton x) ->
False.
Proof.
(* Goal: None *)
solve_notin.
Qed.
End Notin_fun.
|
Require Export GeoCoq.Tarski_dev.Ch09_plane.
Require Export GeoCoq.Tarski_dev.Tactics.CoincR_for_cop.
Ltac CopR :=
let tpoint := constr:(Tpoint) in
let col := constr:(Col) in
let cop := constr:(Coplanar) in
assert_ncols; Cop_refl tpoint col cop.
Section T10.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma ex_sym : forall A B X, exists Y, (Perp A B X Y \/ X = Y) /\
(exists M, Col A B M /\ Midpoint M X Y).
Lemma is_image_is_image_spec : forall P P' A B, A<>B -> (Reflect P' P A B <-> ReflectL P' P A B).
Proof.
(* Goal: forall (P P' A B : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), iff (@Reflect Tn P' P A B) (@ReflectL Tn P' P A B) *)
intros.
(* Goal: iff (@Reflect Tn P' P A B) (@ReflectL Tn P' P A B) *)
unfold Reflect.
(* Goal: iff (or (and (not (@eq (@Tpoint Tn) A B)) (@ReflectL Tn P' P A B)) (and (@eq (@Tpoint Tn) A B) (@Midpoint Tn A P P'))) (@ReflectL Tn P' P A B) *)
tauto.
Qed.
Lemma ex_sym1 : forall A B X, A<>B -> exists Y, (Perp A B X Y \/ X = Y) /\
(exists M, Col A B M /\ Midpoint M X Y /\ Reflect X Y A B).
Lemma l10_2_uniqueness : forall A B P P1 P2,
Reflect P1 P A B -> Reflect P2 P A B -> P1=P2.
Lemma l10_2_uniqueness_spec : forall A B P P1 P2,
ReflectL P1 P A B -> ReflectL P2 P A B -> P1=P2.
Proof.
(* Goal: forall (A B P P1 P2 : @Tpoint Tn) (_ : @ReflectL Tn P1 P A B) (_ : @ReflectL Tn P2 P A B), @eq (@Tpoint Tn) P1 P2 *)
intros A B P P1 P2 HP1 HP2.
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert (HR1 := HP1).
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert (HR2 := HP2).
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
destruct HR1 as [HX1 [HPerp|Heq1]].
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert_diffs; apply (l10_2_uniqueness A B P); apply is_image_is_image_spec; assumption.
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
destruct HR2 as [HX2 [HPerp|Heq2]].
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert_diffs; apply (l10_2_uniqueness A B P); apply is_image_is_image_spec; assumption.
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
congruence.
Qed.
Lemma l10_2_existence_spec : forall A B P,
exists P', ReflectL P' P A B.
Lemma l10_2_existence : forall A B P,
exists P', Reflect P' P A B.
Proof.
(* Goal: forall A B P : @Tpoint Tn, @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
induction (eq_dec_points A B).
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
subst B.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A A) *)
unfold Reflect.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P'))) *)
elim (symmetric_point_construction P A).
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: forall (x : @Tpoint Tn) (_ : @Midpoint Tn A P x), @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P'))) *)
intros P'.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: forall _ : @Midpoint Tn A P P', @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P'))) *)
exists P'.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P')) *)
tauto.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
elim (l10_2_existence_spec A B P).
(* Goal: forall (x : @Tpoint Tn) (_ : @ReflectL Tn x P A B), @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
intros P'; intros.
(* Goal: @ex (@Tpoint Tn) (fun P' : @Tpoint Tn => @Reflect Tn P' P A B) *)
exists P'.
(* Goal: @Reflect Tn P' P A B *)
unfold Reflect.
(* Goal: or (and (not (@eq (@Tpoint Tn) A B)) (@ReflectL Tn P' P A B)) (and (@eq (@Tpoint Tn) A B) (@Midpoint Tn A P P')) *)
tauto.
Qed.
Lemma l10_4_spec : forall A B P P',
ReflectL P P' A B ->
ReflectL P' P A B.
Proof.
(* Goal: forall (A B P P' : @Tpoint Tn) (_ : @ReflectL Tn P P' A B), @ReflectL Tn P' P A B *)
intros.
(* Goal: @ReflectL Tn P' P A B *)
unfold ReflectL in *.
(* Goal: and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P P') (@Col Tn A B X))) (or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P')) *)
spliter.
(* Goal: and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P P') (@Col Tn A B X))) (or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P')) *)
ex_and H X.
(* Goal: and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P P') (@Col Tn A B X))) (or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P')) *)
split.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P P') (@Col Tn A B X)) *)
exists X.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: and (@Midpoint Tn X P P') (@Col Tn A B X) *)
split.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: @Col Tn A B X *)
(* Goal: @Midpoint Tn X P P' *)
apply l7_2.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: @Col Tn A B X *)
(* Goal: @Midpoint Tn X P' P *)
assumption.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: @Col Tn A B X *)
assumption.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
induction H0.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
left.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: @Perp Tn A B P P' *)
apply perp_right_comm.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
(* Goal: @Perp Tn A B P' P *)
assumption.
(* Goal: or (@Perp Tn A B P P') (@eq (@Tpoint Tn) P P') *)
auto.
Qed.
Lemma l10_4 : forall A B P P', Reflect P P' A B -> Reflect P' P A B.
Proof.
(* Goal: forall (A B P P' : @Tpoint Tn) (_ : @Reflect Tn P P' A B), @Reflect Tn P' P A B *)
intros.
(* Goal: @Reflect Tn P' P A B *)
induction (eq_dec_points A B).
(* Goal: @Reflect Tn P' P A B *)
(* Goal: @Reflect Tn P' P A B *)
subst B.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: @Reflect Tn P' P A A *)
unfold Reflect in *.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P')) *)
elim H;intros.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P')) *)
(* Goal: or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P')) *)
intuition.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: or (and (not (@eq (@Tpoint Tn) A A)) (@ReflectL Tn P' P A A)) (and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P')) *)
right.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P') *)
spliter.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: and (@eq (@Tpoint Tn) A A) (@Midpoint Tn A P P') *)
split.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: @Midpoint Tn A P P' *)
(* Goal: @eq (@Tpoint Tn) A A *)
assumption.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: @Midpoint Tn A P P' *)
apply l7_2.
(* Goal: @Reflect Tn P' P A B *)
(* Goal: @Midpoint Tn A P' P *)
assumption.
(* Goal: @Reflect Tn P' P A B *)
rewrite -> (is_image_is_image_spec) in * by apply H0.
(* Goal: @ReflectL Tn P' P A B *)
apply l10_4_spec;auto.
Qed.
Lemma l10_5 : forall A B P P' P'',
Reflect P' P A B ->
Reflect P'' P' A B -> P=P''.
Lemma l10_6_uniqueness : forall A B P P1 P2, Reflect P P1 A B -> Reflect P P2 A B -> P1 = P2.
Lemma l10_6_uniqueness_spec : forall A B P P1 P2, ReflectL P P1 A B -> ReflectL P P2 A B -> P1 = P2.
Proof.
(* Goal: forall (A B P P1 P2 : @Tpoint Tn) (_ : @ReflectL Tn P P1 A B) (_ : @ReflectL Tn P P2 A B), @eq (@Tpoint Tn) P1 P2 *)
intros A B P P1 P2 HP1 HP2.
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert (HR1 := HP1).
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert (HR2 := HP2).
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
destruct HR1 as [HX1 [HPerp|Heq1]].
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert_diffs; apply (l10_6_uniqueness A B P); apply is_image_is_image_spec; assumption.
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
destruct HR2 as [HX2 [HPerp|Heq2]].
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
assert_diffs; apply (l10_6_uniqueness A B P); apply is_image_is_image_spec; assumption.
(* Goal: @eq (@Tpoint Tn) P1 P2 *)
subst; reflexivity.
Qed.
Lemma l10_6_existence_spec : forall A B P', A<>B -> exists P, ReflectL P' P A B.
Proof.
(* Goal: forall (A B P' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ReflectL Tn P' P A B) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ReflectL Tn P' P A B) *)
assert (exists P, ReflectL P P' A B).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ReflectL Tn P' P A B) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ReflectL Tn P P' A B) *)
eapply l10_2_existence_spec.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ReflectL Tn P' P A B) *)
ex_and H0 P.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @ReflectL Tn P' P A B) *)
exists P.
(* Goal: @ReflectL Tn P' P A B *)
apply l10_4_spec.
(* Goal: @ReflectL Tn P P' A B *)
assumption.
Qed.
Lemma l10_6_existence : forall A B P', exists P, Reflect P' P A B.
Proof.
(* Goal: forall A B P' : @Tpoint Tn, @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Reflect Tn P' P A B) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Reflect Tn P' P A B) *)
assert (exists P, Reflect P P' A B).
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Reflect Tn P' P A B) *)
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Reflect Tn P P' A B) *)
eapply l10_2_existence.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Reflect Tn P' P A B) *)
ex_and H P.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => @Reflect Tn P' P A B) *)
exists P.
(* Goal: @Reflect Tn P' P A B *)
apply l10_4.
(* Goal: @Reflect Tn P P' A B *)
assumption.
Qed.
Lemma l10_7 : forall A B P P' Q Q',
Reflect P' P A B -> Reflect Q' Q A B ->
P'=Q' -> P = Q.
Lemma l10_8 : forall A B P, Reflect P P A B -> Col P A B.
Proof.
(* Goal: forall (A B P : @Tpoint Tn) (_ : @Reflect Tn P P A B), @Col Tn P A B *)
intros.
(* Goal: @Col Tn P A B *)
induction (eq_dec_points A B).
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
subst;Col.
(* Goal: @Col Tn P A B *)
unfold Reflect in H.
(* Goal: @Col Tn P A B *)
unfold ReflectL in H.
(* Goal: @Col Tn P A B *)
induction H.
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
spliter.
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
ex_and H1 X.
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
apply l7_3 in H1.
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
subst X.
(* Goal: @Col Tn P A B *)
(* Goal: @Col Tn P A B *)
Col.
(* Goal: @Col Tn P A B *)
spliter.
(* Goal: @Col Tn P A B *)
subst.
(* Goal: @Col Tn P B B *)
Col.
Qed.
Lemma col__refl : forall A B P, Col P A B -> ReflectL P P A B.
Proof.
(* Goal: forall (A B P : @Tpoint Tn) (_ : @Col Tn P A B), @ReflectL Tn P P A B *)
intros A B P HCol.
(* Goal: @ReflectL Tn P P A B *)
split.
(* Goal: or (@Perp Tn A B P P) (@eq (@Tpoint Tn) P P) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P P) (@Col Tn A B X)) *)
exists P; repeat split; finish; Between.
(* Goal: or (@Perp Tn A B P P) (@eq (@Tpoint Tn) P P) *)
right; reflexivity.
Qed.
Lemma is_image_col_cong : forall A B P P' X, A<>B ->
Reflect P P' A B -> Col A B X -> Cong P X P' X.
Lemma is_image_spec_col_cong : forall A B P P' X,
ReflectL P P' A B -> Col A B X -> Cong P X P' X.
Lemma image_id : forall A B T T',
A<>B ->
Col A B T ->
Reflect T T' A B ->
T = T'.
Lemma osym_not_col : forall A B P P',
Reflect P P' A B ->
~ Col A B P -> ~ Col A B P'.
Lemma midpoint_preserves_image : forall A B P P' Q Q' M,
A <> B -> Col A B M -> Reflect P P' A B ->
Midpoint M P Q -> Midpoint M P' Q' -> Reflect Q Q' A B.
Lemma image_in_is_image_spec :
forall M A B P P',
ReflectL_at M P P' A B -> ReflectL P P' A B.
Proof.
(* Goal: forall (M A B P P' : @Tpoint Tn) (_ : @ReflectL_at Tn M P P' A B), @ReflectL Tn P P' A B *)
intros.
(* Goal: @ReflectL Tn P P' A B *)
unfold ReflectL_at in H.
(* Goal: @ReflectL Tn P P' A B *)
spliter.
(* Goal: @ReflectL Tn P P' A B *)
unfold ReflectL.
(* Goal: and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn A B X))) (or (@Perp Tn A B P' P) (@eq (@Tpoint Tn) P' P)) *)
split.
(* Goal: or (@Perp Tn A B P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn A B X)) *)
exists M.
(* Goal: or (@Perp Tn A B P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: and (@Midpoint Tn M P' P) (@Col Tn A B M) *)
split; assumption.
(* Goal: or (@Perp Tn A B P' P) (@eq (@Tpoint Tn) P' P) *)
assumption.
Qed.
Lemma image_in_gen_is_image : forall M A B P P',
Reflect_at M P P' A B -> Reflect P P' A B.
Proof.
(* Goal: forall (M A B P P' : @Tpoint Tn) (_ : @Reflect_at Tn M P P' A B), @Reflect Tn P P' A B *)
intros.
(* Goal: @Reflect Tn P P' A B *)
unfold Reflect_at in H.
(* Goal: @Reflect Tn P P' A B *)
induction H.
(* Goal: @Reflect Tn P P' A B *)
(* Goal: @Reflect Tn P P' A B *)
spliter.
(* Goal: @Reflect Tn P P' A B *)
(* Goal: @Reflect Tn P P' A B *)
apply image_in_is_image_spec in H0.
(* Goal: @Reflect Tn P P' A B *)
(* Goal: @Reflect Tn P P' A B *)
unfold Reflect.
(* Goal: @Reflect Tn P P' A B *)
(* Goal: or (and (not (@eq (@Tpoint Tn) A B)) (@ReflectL Tn P P' A B)) (and (@eq (@Tpoint Tn) A B) (@Midpoint Tn A P' P)) *)
tauto.
(* Goal: @Reflect Tn P P' A B *)
spliter.
(* Goal: @Reflect Tn P P' A B *)
subst.
(* Goal: @Reflect Tn P P' M M *)
subst.
(* Goal: @Reflect Tn P P' M M *)
unfold Reflect.
(* Goal: or (and (not (@eq (@Tpoint Tn) M M)) (@ReflectL Tn P P' M M)) (and (@eq (@Tpoint Tn) M M) (@Midpoint Tn M P' P)) *)
right.
(* Goal: and (@eq (@Tpoint Tn) M M) (@Midpoint Tn M P' P) *)
auto.
Qed.
Lemma image_image_in : forall A B P P' M,
P <> P'-> ReflectL P P' A B -> Col A B M -> Col P M P' ->
ReflectL_at M P P' A B.
Lemma image_in_col0 : forall A B P P' Y : Tpoint,
ReflectL_at Y P P' A B -> Col P P' Y.
Proof.
(* Goal: forall (A B P P' Y : @Tpoint Tn) (_ : @ReflectL_at Tn Y P P' A B), @Col Tn P P' Y *)
intros.
(* Goal: @Col Tn P P' Y *)
unfold ReflectL_at in *.
(* Goal: @Col Tn P P' Y *)
spliter.
(* Goal: @Col Tn P P' Y *)
assert_cols.
(* Goal: @Col Tn P P' Y *)
Col.
Qed.
Lemma is_image_spec_rev : forall P P' A B, ReflectL P P' A B -> ReflectL P P' B A.
Proof.
(* Goal: forall (P P' A B : @Tpoint Tn) (_ : @ReflectL Tn P P' A B), @ReflectL Tn P P' B A *)
unfold ReflectL.
(* Goal: forall (P P' A B : @Tpoint Tn) (_ : and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn A B X))) (or (@Perp Tn A B P' P) (@eq (@Tpoint Tn) P' P))), and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn B A X))) (or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P)) *)
intros.
(* Goal: and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn B A X))) (or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P)) *)
spliter.
(* Goal: and (@ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn B A X))) (or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P)) *)
split.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn B A X)) *)
ex_and H M0.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @ex (@Tpoint Tn) (fun X : @Tpoint Tn => and (@Midpoint Tn X P' P) (@Col Tn B A X)) *)
exists M0.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: and (@Midpoint Tn M0 P' P) (@Col Tn B A M0) *)
split.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @Col Tn B A M0 *)
(* Goal: @Midpoint Tn M0 P' P *)
assumption.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @Col Tn B A M0 *)
apply col_permutation_4.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @Col Tn A B M0 *)
assumption.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
induction H0.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
left.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @Perp Tn B A P' P *)
apply perp_left_comm.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
(* Goal: @Perp Tn A B P' P *)
assumption.
(* Goal: or (@Perp Tn B A P' P) (@eq (@Tpoint Tn) P' P) *)
right.
(* Goal: @eq (@Tpoint Tn) P' P *)
assumption.
Qed.
Lemma is_image_rev : forall P P' A B,
Reflect P P' A B -> Reflect P P' B A.
Proof.
(* Goal: forall (P P' A B : @Tpoint Tn) (_ : @Reflect Tn P P' A B), @Reflect Tn P P' B A *)
intros.
(* Goal: @Reflect Tn P P' B A *)
unfold Reflect in *.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
induction H.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
spliter.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
left.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
(* Goal: and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A) *)
split.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
(* Goal: @ReflectL Tn P P' B A *)
(* Goal: not (@eq (@Tpoint Tn) B A) *)
auto.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
(* Goal: @ReflectL Tn P P' B A *)
apply is_image_spec_rev.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
(* Goal: @ReflectL Tn P P' A B *)
assumption.
(* Goal: or (and (not (@eq (@Tpoint Tn) B A)) (@ReflectL Tn P P' B A)) (and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P)) *)
right.
(* Goal: and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P) *)
spliter.
(* Goal: and (@eq (@Tpoint Tn) B A) (@Midpoint Tn B P' P) *)
subst.
(* Goal: and (@eq (@Tpoint Tn) B B) (@Midpoint Tn B P' P) *)
tauto.
Qed.
Lemma midpoint_preserves_per : forall A B C A1 B1 C1 M,
Per A B C ->
Midpoint M A A1 ->
Midpoint M B B1 ->
Midpoint M C C1 ->
Per A1 B1 C1.
Lemma col__image_spec : forall A B X, Col A B X -> ReflectL X X A B.
Proof.
(* Goal: forall (A B X : @Tpoint Tn) (_ : @Col Tn A B X), @ReflectL Tn X X A B *)
intros.
(* Goal: @ReflectL Tn X X A B *)
unfold ReflectL.
(* Goal: and (@ex (@Tpoint Tn) (fun X0 : @Tpoint Tn => and (@Midpoint Tn X0 X X) (@Col Tn A B X0))) (or (@Perp Tn A B X X) (@eq (@Tpoint Tn) X X)) *)
split.
(* Goal: or (@Perp Tn A B X X) (@eq (@Tpoint Tn) X X) *)
(* Goal: @ex (@Tpoint Tn) (fun X0 : @Tpoint Tn => and (@Midpoint Tn X0 X X) (@Col Tn A B X0)) *)
exists X.
(* Goal: or (@Perp Tn A B X X) (@eq (@Tpoint Tn) X X) *)
(* Goal: and (@Midpoint Tn X X X) (@Col Tn A B X) *)
split.
(* Goal: or (@Perp Tn A B X X) (@eq (@Tpoint Tn) X X) *)
(* Goal: @Col Tn A B X *)
(* Goal: @Midpoint Tn X X X *)
apply l7_3_2.
(* Goal: or (@Perp Tn A B X X) (@eq (@Tpoint Tn) X X) *)
(* Goal: @Col Tn A B X *)
assumption.
(* Goal: or (@Perp Tn A B X X) (@eq (@Tpoint Tn) X X) *)
right.
(* Goal: @eq (@Tpoint Tn) X X *)
reflexivity.
Qed.
Lemma image_triv : forall A B, Reflect A A A B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @Reflect Tn A A A B *)
intros.
(* Goal: @Reflect Tn A A A B *)
induction (eq_dec_points A B).
(* Goal: @Reflect Tn A A A B *)
(* Goal: @Reflect Tn A A A B *)
right; split; Midpoint.
(* Goal: @Reflect Tn A A A B *)
left; split.
(* Goal: @ReflectL Tn A A A B *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
auto.
(* Goal: @ReflectL Tn A A A B *)
apply col__image_spec; Col.
Qed.
Lemma cong_midpoint__image : forall A B X Y, Cong A X A Y -> Midpoint B X Y -> Reflect Y X A B.
Proof.
(* Goal: forall (A B X Y : @Tpoint Tn) (_ : @Cong Tn A X A Y) (_ : @Midpoint Tn B X Y), @Reflect Tn Y X A B *)
intros.
(* Goal: @Reflect Tn Y X A B *)
induction (eq_dec_points A B).
(* Goal: @Reflect Tn Y X A B *)
(* Goal: @Reflect Tn Y X A B *)
right; subst; split; auto.
(* Goal: @Reflect Tn Y X A B *)
left; repeat split; auto.
(* Goal: or (@Perp Tn A B X Y) (@eq (@Tpoint Tn) X Y) *)
(* Goal: @ex (@Tpoint Tn) (fun X0 : @Tpoint Tn => and (@Midpoint Tn X0 X Y) (@Col Tn A B X0)) *)
exists B; split; Col.
(* Goal: or (@Perp Tn A B X Y) (@eq (@Tpoint Tn) X Y) *)
induction(eq_dec_points X Y).
(* Goal: or (@Perp Tn A B X Y) (@eq (@Tpoint Tn) X Y) *)
(* Goal: or (@Perp Tn A B X Y) (@eq (@Tpoint Tn) X Y) *)
right.
(* Goal: or (@Perp Tn A B X Y) (@eq (@Tpoint Tn) X Y) *)
(* Goal: @eq (@Tpoint Tn) X Y *)
assumption.
(* Goal: or (@Perp Tn A B X Y) (@eq (@Tpoint Tn) X Y) *)
left.
(* Goal: @Perp Tn A B X Y *)
apply perp_sym.
(* Goal: @Perp Tn X Y A B *)
assert(B <> X /\ B <> Y).
(* Goal: @Perp Tn X Y A B *)
(* Goal: and (not (@eq (@Tpoint Tn) B X)) (not (@eq (@Tpoint Tn) B Y)) *)
apply midpoint_distinct_1.
(* Goal: @Perp Tn X Y A B *)
(* Goal: @Midpoint Tn B X Y *)
(* Goal: not (@eq (@Tpoint Tn) X Y) *)
assumption.
(* Goal: @Perp Tn X Y A B *)
(* Goal: @Midpoint Tn B X Y *)
assumption.
(* Goal: @Perp Tn X Y A B *)
spliter.
(* Goal: @Perp Tn X Y A B *)
apply col_per_perp; Col.
(* Goal: @Per Tn A B X *)
exists Y.
(* Goal: and (@Midpoint Tn B X Y) (@Cong Tn A X A Y) *)
split.
(* Goal: @Cong Tn A X A Y *)
(* Goal: @Midpoint Tn B X Y *)
assumption.
(* Goal: @Cong Tn A X A Y *)
assumption.
Qed.
Lemma col_image_spec__eq : forall A B P P', Col A B P -> ReflectL P P' A B -> P = P'.
Proof.
(* Goal: forall (A B P P' : @Tpoint Tn) (_ : @Col Tn A B P) (_ : @ReflectL Tn P P' A B), @eq (@Tpoint Tn) P P' *)
intros.
(* Goal: @eq (@Tpoint Tn) P P' *)
apply (l10_6_uniqueness_spec A B P).
(* Goal: @ReflectL Tn P P' A B *)
(* Goal: @ReflectL Tn P P A B *)
apply col__image_spec; assumption.
(* Goal: @ReflectL Tn P P' A B *)
assumption.
Qed.
Lemma image_spec_triv : forall A B, ReflectL A A B B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @ReflectL Tn A A B B *)
intros.
(* Goal: @ReflectL Tn A A B B *)
apply col__image_spec.
(* Goal: @Col Tn B B A *)
Col.
Qed.
Lemma image_spec__eq : forall A P P', ReflectL P P' A A -> P = P'.
Proof.
(* Goal: forall (A P P' : @Tpoint Tn) (_ : @ReflectL Tn P P' A A), @eq (@Tpoint Tn) P P' *)
intros A P P'; apply col_image_spec__eq; Col.
Qed.
Lemma image__midpoint : forall A P P', Reflect P P' A A -> Midpoint A P' P.
Proof.
(* Goal: forall (A P P' : @Tpoint Tn) (_ : @Reflect Tn P P' A A), @Midpoint Tn A P' P *)
induction 1; spliter.
(* Goal: @Midpoint Tn A P' P *)
(* Goal: @Midpoint Tn A P' P *)
contradiction.
(* Goal: @Midpoint Tn A P' P *)
assumption.
Qed.
Lemma is_image_spec_dec :
forall A B C D, ReflectL A B C D \/ ~ ReflectL A B C D.
Proof.
(* Goal: forall A B C D : @Tpoint Tn, or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
intros.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
elim (eq_dec_points C D); intro HCD.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
subst.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B D D) (not (@ReflectL Tn A B D D)) *)
elim (eq_dec_points A B); intro HAB.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B D D) (not (@ReflectL Tn A B D D)) *)
(* Goal: or (@ReflectL Tn A B D D) (not (@ReflectL Tn A B D D)) *)
subst.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B D D) (not (@ReflectL Tn A B D D)) *)
(* Goal: or (@ReflectL Tn B B D D) (not (@ReflectL Tn B B D D)) *)
left.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B D D) (not (@ReflectL Tn A B D D)) *)
(* Goal: @ReflectL Tn B B D D *)
apply image_spec_triv.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B D D) (not (@ReflectL Tn A B D D)) *)
right.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: not (@ReflectL Tn A B D D) *)
intro H.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: False *)
unfold ReflectL in *.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: False *)
destruct H as [H HFalse].
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: False *)
elim HFalse; clear HFalse; intro HFalse.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: False *)
(* Goal: False *)
apply perp_distinct in HFalse.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: False *)
(* Goal: False *)
intuition.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: False *)
intuition.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
elim (l10_6_existence_spec C D A HCD); intros B' HB'.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
elim (eq_dec_points B B'); intro HBB'.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
subst.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
(* Goal: or (@ReflectL Tn A B' C D) (not (@ReflectL Tn A B' C D)) *)
tauto.
(* Goal: or (@ReflectL Tn A B C D) (not (@ReflectL Tn A B C D)) *)
right.
(* Goal: not (@ReflectL Tn A B C D) *)
intro H.
(* Goal: False *)
apply HBB'.
(* Goal: @eq (@Tpoint Tn) B B' *)
apply l10_6_uniqueness with C D A.
(* Goal: @Reflect Tn A B' C D *)
(* Goal: @Reflect Tn A B C D *)
unfold Reflect.
(* Goal: @Reflect Tn A B' C D *)
(* Goal: or (and (not (@eq (@Tpoint Tn) C D)) (@ReflectL Tn A B C D)) (and (@eq (@Tpoint Tn) C D) (@Midpoint Tn C B A)) *)
tauto.
(* Goal: @Reflect Tn A B' C D *)
unfold Reflect.
(* Goal: or (and (not (@eq (@Tpoint Tn) C D)) (@ReflectL Tn A B' C D)) (and (@eq (@Tpoint Tn) C D) (@Midpoint Tn C B' A)) *)
tauto.
Qed.
Lemma l10_14 : forall P P' A B, P <> P' -> A <> B ->
Reflect P P' A B -> TS A B P P'.
Lemma l10_15 : forall A B C P,
Col A B C -> ~ Col A B P ->
exists Q, Perp A B Q C /\ OS A B P Q.
Lemma ex_per_cong : forall A B C D X Y,
A <> B -> X <> Y -> Col A B C -> ~Col A B D ->
exists P, Per P C A /\ Cong P C X Y /\ OS A B P D.
Proof.
(* Goal: forall (A B C D X Y : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) X Y)) (_ : @Col Tn A B C) (_ : not (@Col Tn A B D)), @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Per Tn P C A) (and (@Cong Tn P C X Y) (@OS Tn A B P D))) *)
intros A B C D X Y HAB HXY HCol HNCol.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Per Tn P C A) (and (@Cong Tn P C X Y) (@OS Tn A B P D))) *)
destruct (l10_15 A B C D) as [Q [HQ1 HQ2]]; trivial.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Per Tn P C A) (and (@Cong Tn P C X Y) (@OS Tn A B P D))) *)
assert_diffs.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Per Tn P C A) (and (@Cong Tn P C X Y) (@OS Tn A B P D))) *)
destruct (segment_construction_3 C Q X Y) as [P [HP1 HP2]]; auto.
(* Goal: @ex (@Tpoint Tn) (fun P : @Tpoint Tn => and (@Per Tn P C A) (and (@Cong Tn P C X Y) (@OS Tn A B P D))) *)
exists P; repeat split; Cong.
(* Goal: @OS Tn A B P D *)
(* Goal: @Per Tn P C A *)
-
(* Goal: @Per Tn P C A *)
destruct (eq_dec_points A C).
(* Goal: @Per Tn P C A *)
(* Goal: @Per Tn P C A *)
subst; Perp.
(* Goal: @Per Tn P C A *)
apply perp_per_1.
(* Goal: @Perp Tn C P A C *)
apply perp_col1 with B; auto.
(* Goal: @Perp Tn C P A B *)
assert_diffs; apply perp_sym, perp_col1 with Q; Col; Perp.
(* BG Goal: @OS Tn A B P D *)
-
(* Goal: @OS Tn A B P D *)
apply os_out_os with Q C; Side.
Qed.
Lemma exists_cong_per : forall A B X Y, exists C, Per A B C /\ Cong B C X Y.
Proof.
(* Goal: forall A B X Y : @Tpoint Tn, @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
destruct (eq_dec_points A B).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
subst.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn B B C) (@Cong Tn B C X Y)) *)
destruct (segment_construction X B X Y).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn B B C) (@Cong Tn B C X Y)) *)
exists x;split;spliter;finish.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
destruct (not_col_exists A B H) as [P HP].
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
destruct (eq_dec_points X Y).
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
exists B;split;subst;finish.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
destruct (ex_per_cong A B B P X Y);finish.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
spliter.
(* Goal: @ex (@Tpoint Tn) (fun C : @Tpoint Tn => and (@Per Tn A B C) (@Cong Tn B C X Y)) *)
exists x;split;finish.
Qed.
End T10.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq fintype finset.
From mathcomp
Require Import fingroup morphism.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Module Presentation.
Section Presentation.
Implicit Types gT rT : finGroupType.
Implicit Type vT : finType.
Inductive term :=
| Cst of nat
| Idx
| Inv of term
| Exp of term & nat
| Mul of term & term
| Conj of term & term
| Comm of term & term.
Fixpoint eval {gT} e t : gT :=
match t with
| Cst i => nth 1 e i
| Idx => 1
| Inv t1 => (eval e t1)^-1
| Exp t1 n => eval e t1 ^+ n
| Mul t1 t2 => eval e t1 * eval e t2
| Conj t1 t2 => eval e t1 ^ eval e t2
| Comm t1 t2 => [~ eval e t1, eval e t2]
end.
Inductive formula := Eq2 of term & term | And of formula & formula.
Definition Eq1 s := Eq2 s Idx.
Definition Eq3 s1 s2 t := And (Eq2 s1 t) (Eq2 s2 t).
Inductive rel_type := NoRel | Rel vT of vT & vT.
Definition bool_of_rel r := if r is Rel vT v1 v2 then v1 == v2 else true.
Local Coercion bool_of_rel : rel_type >-> bool.
Definition and_rel vT (v1 v2 : vT) r :=
if r is Rel wT w1 w2 then Rel (v1, w1) (v2, w2) else Rel v1 v2.
Fixpoint rel {gT} (e : seq gT) f r :=
match f with
| Eq2 s t => and_rel (eval e s) (eval e t) r
| And f1 f2 => rel e f1 (rel e f2 r)
end.
Inductive type := Generator of term -> type | Formula of formula.
Definition Cast p : type := p.
Local Coercion Formula : formula >-> type.
Inductive env gT := Env of {set gT} & seq gT.
Definition env1 {gT} (x : gT : finType) := Env <[x]> [:: x].
Fixpoint sat gT vT B n (s : vT -> env gT) p :=
match p with
| Formula f =>
[exists v, let: Env A e := s v in and_rel A B (rel (rev e) f NoRel)]
| Generator p' =>
let s' v := let: Env A e := s v.1 in Env (A <*> <[v.2]>) (v.2 :: e) in
sat B n.+1 s' (p' (Cst n))
end.
Definition hom gT (B : {set gT}) p := sat B 1 env1 (p (Cst 0)).
Definition iso gT (B : {set gT}) p :=
forall rT (H : {group rT}), (H \homg B) = hom H p.
End Presentation.
End Presentation.
Import Presentation.
Coercion bool_of_rel : rel_type >-> bool.
Coercion Eq1 : term >-> formula.
Coercion Formula : formula >-> type.
Notation "1" := Idx : group_presentation.
Arguments Inv _%group_presentation.
Arguments Exp _%group_presentation _%N.
Arguments Mul _%group_presentation _%group_presentation.
Arguments Conj _%group_presentation _%group_presentation.
Arguments Comm _%group_presentation _%group_presentation.
Arguments Eq1 _%group_presentation.
Arguments Eq2 _%group_presentation _%group_presentation.
Arguments Eq3 _%group_presentation _%group_presentation _%group_presentation.
Arguments And _%group_presentation _%group_presentation.
Arguments Formula _%group_presentation.
Arguments Cast _%group_presentation.
Infix "*" := Mul : group_presentation.
Infix "^+" := Exp : group_presentation.
Infix "^" := Conj : group_presentation.
Notation "x ^-1" := (Inv x) : group_presentation.
Notation "x ^- n" := (Inv (x ^+ n)) : group_presentation.
Notation "[ ~ x1 , x2 , .. , xn ]" :=
(Comm .. (Comm x1 x2) .. xn) : group_presentation.
Notation "x = y" := (Eq2 x y) : group_presentation.
Notation "x = y = z" := (Eq3 x y z) : group_presentation.
Notation "( r1 , r2 , .. , rn )" :=
(And .. (And r1 r2) .. rn) : group_presentation.
Notation "x : p" := (fun x => Cast p) : nt_group_presentation.
Arguments Generator _%nt_group_presentation.
Arguments hom _ _%group_scope _%nt_group_presentation.
Arguments iso _ _%group_scope _%nt_group_presentation.
Notation "x : p" := (Generator (x : p)) : group_presentation.
Notation "H \homg 'Grp' p" := (hom H p)
(at level 70, p at level 0, format "H \homg 'Grp' p") : group_scope.
Notation "H \isog 'Grp' p" := (iso H p)
(at level 70, p at level 0, format "H \isog 'Grp' p") : group_scope.
Notation "H \homg 'Grp' ( x : p )" := (hom H (x : p))
(at level 70, x at level 0,
format "'[hv' H '/ ' \homg 'Grp' ( x : p ) ']'") : group_scope.
Notation "H \isog 'Grp' ( x : p )" := (iso H (x : p))
(at level 70, x at level 0,
format "'[hv' H '/ ' \isog 'Grp' ( x : p ) ']'") : group_scope.
Section PresentationTheory.
Implicit Types gT rT : finGroupType.
Import Presentation.
Lemma isoGrp_hom gT (G : {group gT}) p : G \isog Grp p -> G \homg Grp p.
Proof.
(* Goal: forall _ : @iso gT (@gval gT G) p, is_true (@hom gT (@gval gT G) p) *)
by move <-; apply: homg_refl.
Qed.
Lemma isoGrpP gT (G : {group gT}) p rT (H : {group rT}) :
G \isog Grp p -> reflect (#|H| = #|G| /\ H \homg Grp p) (H \isog G).
Proof.
(* Goal: forall _ : @iso gT (@gval gT G) p, Bool.reflect (and (@eq nat (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (is_true (@hom rT (@gval rT H) p))) (@isog rT gT (@gval rT H) (@gval gT G)) *)
move=> isoGp; apply: (iffP idP) => [isoGH | [oH homHp]].
(* Goal: is_true (@isog rT gT (@gval rT H) (@gval gT G)) *)
(* Goal: and (@eq nat (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (is_true (@hom rT (@gval rT H) p)) *)
by rewrite (card_isog isoGH) -isoGp isog_hom.
(* Goal: is_true (@isog rT gT (@gval rT H) (@gval gT G)) *)
by rewrite isogEcard isoGp homHp /= oH.
Qed.
Lemma homGrp_trans rT gT (H : {set rT}) (G : {group gT}) p :
H \homg G -> G \homg Grp p -> H \homg Grp p.
Proof.
(* Goal: forall (_ : is_true (@homg rT gT H (@gval gT G))) (_ : is_true (@hom gT (@gval gT G) p)), is_true (@hom rT H p) *)
case/homgP=> h <-{H}; rewrite /hom; move: {p}(p _) => p.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
have evalG e t: all (mem G) e -> eval (map h e) t = h (eval e t).
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall _ : is_true (@all (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@pred_of_simpl (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@pred_of_mem_pred (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) e), @eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)) *)
move=> Ge; apply: (@proj2 (eval e t \in G)); elim: t => /=.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h (oneg (FinGroup.base gT)))) *)
(* Goal: forall n : nat, and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@nth (FinGroup.sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) n) (@mfun gT rT (@gval gT G) h (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e n))) *)
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h (oneg (FinGroup.base gT)))) *)
(* Goal: forall n : nat, and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@nth (FinGroup.sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) n) (@mfun gT rT (@gval gT G) h (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e n))) *)
move=> i; case: (leqP (size e) i) => [le_e_i | lt_i_e].
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h (oneg (FinGroup.base gT)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e i) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@nth (FinGroup.sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) i) (@mfun gT rT (@gval gT G) h (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e i))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e i) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@nth (FinGroup.sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) i) (@mfun gT rT (@gval gT G) h (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e i))) *)
by rewrite !nth_default ?size_map ?morph1.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h (oneg (FinGroup.base gT)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e i) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@nth (FinGroup.sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) i) (@mfun gT rT (@gval gT G) h (@nth (FinGroup.sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) e i))) *)
by rewrite (nth_map 1) // [_ \in G](allP Ge) ?mem_nth.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h (oneg (FinGroup.base gT)))) *)
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
(* Goal: and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h (oneg (FinGroup.base gT)))) *)
by rewrite morph1.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@invg (FinGroup.base gT) (@eval gT e t)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@invg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t)) (@mfun gT rT (@gval gT G) h (@invg (FinGroup.base gT) (@eval gT e t)))) *)
by move=> t [Gt ->]; rewrite groupV morphV.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (n : nat), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@expgn (FinGroup.base gT) (@eval gT e t) n) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@expgn (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) n) (@mfun gT rT (@gval gT G) h (@expgn (FinGroup.base gT) (@eval gT e t) n))) *)
by move=> t [Gt ->] n; rewrite groupX ?morphX.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@mulg (FinGroup.base gT) (@eval gT e t) (@eval gT e t0)))) *)
by move=> t1 [Gt1 ->] t2 [Gt2 ->]; rewrite groupM ?morphM.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@conjg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@conjg gT (@eval gT e t) (@eval gT e t0)))) *)
by move=> t1 [Gt1 ->] t2 [Gt2 ->]; rewrite groupJ ?morphJ.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (t : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@mfun gT rT (@gval gT G) h (@eval gT e t)))) (t0 : term) (_ : and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@eval gT e t0) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0) (@mfun gT rT (@gval gT G) h (@eval gT e t0)))), and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@eval gT e t) (@eval gT e t0)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq (FinGroup.arg_sort (FinGroup.base rT)) (@commg rT (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t) (@eval rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) t0)) (@mfun gT rT (@gval gT G) h (@commg gT (@eval gT e t) (@eval gT e t0)))) *)
by move=> t1 [Gt1 ->] t2 [Gt2 ->]; rewrite groupR ?morphR.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
have and_relE xT x1 x2 r: @and_rel xT x1 x2 r = (x1 == x2) && r :> bool.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: @eq bool (bool_of_rel (@and_rel xT x1 x2 r)) (andb (@eq_op (Finite.eqType xT) x1 x2) (bool_of_rel r)) *)
by case: r => //=; rewrite andbT.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
have rsatG e f: all (mem G) e -> rel e f NoRel -> rel (map h e) f NoRel.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (_ : is_true (@all (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@pred_of_simpl (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@pred_of_mem_pred (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) e)) (_ : is_true (bool_of_rel (@rel gT e f NoRel))), is_true (bool_of_rel (@rel rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) f NoRel)) *)
move=> Ge; have: NoRel -> NoRel by []; move: NoRel {2 4}NoRel.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall (r r0 : rel_type) (_ : forall _ : is_true (bool_of_rel r), is_true (bool_of_rel r0)) (_ : is_true (bool_of_rel (@rel gT e f r))), is_true (bool_of_rel (@rel rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) f r0)) *)
elim: f => [x1 x2 | f1 IH1 f2 IH2] r hr IHr; last by apply: IH1; apply: IH2.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
(* Goal: forall _ : is_true (bool_of_rel (@rel gT e (Eq2 x1 x2) r)), is_true (bool_of_rel (@rel rT (@map (FinGroup.arg_sort (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT G) h) e) (Eq2 x1 x2) hr)) *)
by rewrite !and_relE !evalG //; case/andP; move/eqP->; rewrite eqxx.
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
set s := env1; set vT := gT : finType in s *.
set s' := env1; set vT' := rT : finType in s' *.
have (v): let: Env A e := s v in A \subset G -> all (mem G) e /\ exists v', s' v' = Env (h @* A) (map h e).
-
(* Goal: forall _ : is_true (@sat gT (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (S O) (@env1 gT) p), is_true (@sat rT (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT G) h (@MorPhantom gT rT (@mfun gT rT (@gval gT G) h)) (@gval gT G)) (S O) (@env1 rT) p) *)
rewrite /= cycle_subG andbT => Gv; rewrite morphim_cycle //.
by split; last exists (h v).
elim: p 1%N vT vT' s s' => /= [p IHp | f] n vT vT' s s' Gs.
apply: IHp => [[v x]] /=; case: (s v) {Gs}(Gs v) => A e /= Gs.
rewrite join_subG cycle_subG; case/andP=> sAG Gx; rewrite Gx.
have [//|-> [v' def_v']] := Gs; split=> //; exists (v', h x); rewrite def_v'.
by congr (Env _ _); rewrite morphimY ?cycle_subG // morphim_cycle.
case/existsP=> v; case: (s v) {Gs}(Gs v) => /= A e Gs.
rewrite and_relE => /andP[/eqP defA rel_f].
have{Gs} [|Ge [v' def_v']] := Gs; first by rewrite defA.
apply/existsP; exists v'; rewrite def_v' and_relE defA eqxx /=.
by rewrite -map_rev rsatG ?(eq_all_r (mem_rev e)).
Qed.
Qed.
Lemma eq_homGrp gT rT (G : {group gT}) (H : {group rT}) p :
G \isog H -> (G \homg Grp p) = (H \homg Grp p).
Proof.
(* Goal: forall _ : is_true (@isog gT rT (@gval gT G) (@gval rT H)), @eq bool (@hom gT (@gval gT G) p) (@hom rT (@gval rT H) p) *)
by rewrite isogEhom => /andP[homGH homHG]; apply/idP/idP; apply: homGrp_trans.
Qed.
Lemma isoGrp_trans gT rT (G : {group gT}) (H : {group rT}) p :
G \isog H -> H \isog Grp p -> G \isog Grp p.
Proof.
(* Goal: forall (_ : is_true (@isog gT rT (@gval gT G) (@gval rT H))) (_ : @iso rT (@gval rT H) p), @iso gT (@gval gT G) p *)
by move=> isoGH isoHp kT K; rewrite -isoHp; apply: eq_homgr.
Qed.
Lemma intro_isoGrp gT (G : {group gT}) p :
G \homg Grp p -> (forall rT (H : {group rT}), H \homg Grp p -> H \homg G) ->
G \isog Grp p.
Proof.
(* Goal: forall (_ : is_true (@hom gT (@gval gT G) p)) (_ : forall (rT : FinGroup.type) (H : @group_of rT (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (@hom rT (@gval rT H) p)), is_true (@homg rT gT (@gval rT H) (@gval gT G))), @iso gT (@gval gT G) p *)
move=> homGp freeG rT H.
(* Goal: @eq bool (@homg rT gT (@gval rT H) (@gval gT G)) (@hom rT (@gval rT H) p) *)
by apply/idP/idP=> [homHp|]; [apply: homGrp_trans homGp | apply: freeG].
Qed.
End PresentationTheory.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray5.
Require Export GeoCoq.Elements.OriginalProofs.lemma_layoffunique.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_lessthanbetween :
forall A B C,
Lt A B A C -> Out A B C ->
BetS A B C.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @Lt Ax0 A B A C) (_ : @Out Ax0 A B C), @BetS Ax0 A B C *)
intros.
(* Goal: @BetS Ax0 A B C *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M C /\ Cong A M A B)) by (conclude_def Lt );destruct Tf as [M];spliter.
(* Goal: @BetS Ax0 A B C *)
assert (neq A M) by (forward_using lemma_betweennotequal).
(* Goal: @BetS Ax0 A B C *)
assert (Out A M C) by (conclude lemma_ray4).
(* Goal: @BetS Ax0 A B C *)
assert (Out A C M) by (conclude lemma_ray5).
(* Goal: @BetS Ax0 A B C *)
assert (Out A C B) by (conclude lemma_ray5).
(* Goal: @BetS Ax0 A B C *)
assert (eq M B) by (conclude lemma_layoffunique).
(* Goal: @BetS Ax0 A B C *)
assert (BetS A B C) by (conclude cn_equalitysub).
(* Goal: @BetS Ax0 A B C *)
close.
Qed.
End Euclid.
|
Require Import nat_trees.
Require Import search_trees.
Require Import Compare_dec.
Inductive INSERT (n : nat) (t t' : nat_tree) : Prop :=
insert_intro :
(forall p : nat, occ t p -> occ t' p) ->
occ t' n ->
(forall p : nat, occ t' p -> occ t p \/ n = p) ->
search t' -> INSERT n t t'.
Hint Resolve insert_intro: searchtrees.
Definition INSERT_SPEC (n : nat) (t : nat_tree) :=
{t' : nat_tree | INSERT n t t'}.
Lemma insert_nil : forall n : nat, INSERT n NIL (bin n NIL NIL).
Proof.
(* Goal: forall n : nat, INSERT n NIL (bin n NIL NIL) *)
intro n; split; auto with searchtrees.
(* Goal: forall (p : nat) (_ : occ (bin n NIL NIL) p), or (occ NIL p) (@eq nat n p) *)
intros p H; inversion_clear H; auto with searchtrees.
Qed.
Hint Resolve insert_nil: searchtrees.
Lemma insert_l :
forall (n p : nat) (t1 t'1 t2 : nat_tree),
n < p ->
search (bin p t1 t2) ->
INSERT n t1 t'1 -> INSERT n (bin p t1 t2) (bin p t'1 t2).
Proof.
(* Goal: forall (n p : nat) (t1 t'1 t2 : nat_tree) (_ : lt n p) (_ : search (bin p t1 t2)) (_ : INSERT n t1 t'1), INSERT n (bin p t1 t2) (bin p t'1 t2) *)
intros n p t1 t'1 t2 H H0 H1; split.
(* Goal: search (bin p t'1 t2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t'1 t2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t'1 t2) n *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t1 t2) p0), occ (bin p t'1 t2) p0 *)
intros p0 H2; inversion_clear H2.
(* Goal: search (bin p t'1 t2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t'1 t2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t'1 t2) n *)
(* Goal: occ (bin p t'1 t2) p0 *)
(* Goal: occ (bin p t'1 t2) p0 *)
(* Goal: occ (bin p0 t'1 t2) p0 *)
auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t'1 t2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t'1 t2) n *)
(* Goal: occ (bin p t'1 t2) p0 *)
(* Goal: occ (bin p t'1 t2) p0 *)
elim H1; auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t'1 t2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t'1 t2) n *)
(* Goal: occ (bin p t'1 t2) p0 *)
auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t'1 t2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t'1 t2) n *)
constructor 2; elim H1; auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t'1 t2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
intros p0 H2.
(* Goal: search (bin p t'1 t2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
inversion_clear H2.
(* Goal: search (bin p t'1 t2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: or (occ (bin p0 t1 t2) p0) (@eq nat n p0) *)
auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
elim H1; intros.
(* Goal: search (bin p t'1 t2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
elim (H5 p0); auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
auto with searchtrees.
(* Goal: search (bin p t'1 t2) *)
elim H1; constructor 2; auto with searchtrees.
(* Goal: min p t2 *)
(* Goal: maj p t'1 *)
(* Goal: search t2 *)
eapply search_r; eauto with searchtrees.
(* Goal: min p t2 *)
(* Goal: maj p t'1 *)
split; intros.
(* Goal: min p t2 *)
(* Goal: lt q p *)
elim (H4 q).
(* Goal: min p t2 *)
(* Goal: occ t'1 q *)
(* Goal: forall _ : @eq nat n q, lt q p *)
(* Goal: forall _ : occ t1 q, lt q p *)
intro; cut (maj p t1).
(* Goal: min p t2 *)
(* Goal: occ t'1 q *)
(* Goal: forall _ : @eq nat n q, lt q p *)
(* Goal: maj p t1 *)
(* Goal: forall _ : maj p t1, lt q p *)
simple induction 1; auto with searchtrees.
(* Goal: min p t2 *)
(* Goal: occ t'1 q *)
(* Goal: forall _ : @eq nat n q, lt q p *)
(* Goal: maj p t1 *)
eapply maj_l; eauto with searchtrees.
(* Goal: min p t2 *)
(* Goal: occ t'1 q *)
(* Goal: forall _ : @eq nat n q, lt q p *)
simple induction 1; auto with searchtrees.
(* Goal: min p t2 *)
(* Goal: occ t'1 q *)
auto with searchtrees.
(* Goal: min p t2 *)
eapply min_r; eauto with searchtrees.
Qed.
Lemma insert_r :
forall (n p : nat) (t1 t2 t'2 : nat_tree),
p < n ->
search (bin p t1 t2) ->
INSERT n t2 t'2 -> INSERT n (bin p t1 t2) (bin p t1 t'2).
Proof.
(* Goal: forall (n p : nat) (t1 t2 t'2 : nat_tree) (_ : lt p n) (_ : search (bin p t1 t2)) (_ : INSERT n t2 t'2), INSERT n (bin p t1 t2) (bin p t1 t'2) *)
intros n p t1 t2 t'2 H H0 H1; split.
(* Goal: search (bin p t1 t'2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t1 t'2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t1 t'2) n *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t1 t2) p0), occ (bin p t1 t'2) p0 *)
intros p0 H2; inversion_clear H2; auto with searchtrees.
(* Goal: search (bin p t1 t'2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t1 t'2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t1 t'2) n *)
(* Goal: occ (bin p t1 t'2) p0 *)
elim H1; auto with searchtrees.
(* Goal: search (bin p t1 t'2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t1 t'2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
(* Goal: occ (bin p t1 t'2) n *)
constructor 3; elim H1; auto with searchtrees.
(* Goal: search (bin p t1 t'2) *)
(* Goal: forall (p0 : nat) (_ : occ (bin p t1 t'2) p0), or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
intros p0 H2; inversion_clear H2; auto with searchtrees.
(* Goal: search (bin p t1 t'2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
elim H1; intros.
(* Goal: search (bin p t1 t'2) *)
(* Goal: or (occ (bin p t1 t2) p0) (@eq nat n p0) *)
elim (H5 p0); auto with searchtrees.
(* Goal: search (bin p t1 t'2) *)
elim H1; constructor 2; auto with searchtrees.
(* Goal: min p t'2 *)
(* Goal: maj p t1 *)
(* Goal: search t1 *)
eapply search_l; eauto with searchtrees.
(* Goal: min p t'2 *)
(* Goal: maj p t1 *)
split; intros.
(* Goal: min p t'2 *)
(* Goal: lt q p *)
elim (maj_l _ _ _ H0); auto with searchtrees.
(* Goal: min p t'2 *)
split; intros q H6.
(* Goal: lt p q *)
elim (H4 q H6).
(* Goal: forall _ : @eq nat n q, lt p q *)
(* Goal: forall _ : occ t2 q, lt p q *)
intro.
(* Goal: forall _ : @eq nat n q, lt p q *)
(* Goal: lt p q *)
elim (min_r _ _ _ H0); auto with searchtrees.
(* Goal: forall _ : @eq nat n q, lt p q *)
simple induction 1; auto with searchtrees.
Qed.
Lemma insert_eq :
forall (n : nat) (t1 t2 : nat_tree),
search (bin n t1 t2) -> INSERT n (bin n t1 t2) (bin n t1 t2).
Proof.
(* Goal: forall (n : nat) (t1 t2 : nat_tree) (_ : search (bin n t1 t2)), INSERT n (bin n t1 t2) (bin n t1 t2) *)
auto with searchtrees.
Qed.
Hint Resolve insert_l insert_r insert_eq: searchtrees.
Lemma insert : forall (n : nat) (t : nat_tree), search t -> INSERT_SPEC n t.
Proof.
(* Goal: forall (n : nat) (t : nat_tree) (_ : search t), INSERT_SPEC n t *)
refine (fix insert (n : nat) (t : nat_tree) {struct t} : search t -> INSERT_SPEC n t := match t return (search t -> INSERT_SPEC n t) with | NIL => fun s => exist _ (bin n NIL NIL) _ | bin p t1 t2 => fun s => match le_gt_dec n p with | left h => match le_lt_eq_dec n p h with | left _ => match insert n t1 _ with | exist t3 _ => exist _ (bin p t3 t2) _ end | right _ => exist _ (bin n t1 t2) _ end | right _ => match insert n t2 _ with | exist t3 _ => exist _ (bin p t1 t3) _ end end end).
(* Goal: INSERT n (bin p t1 t2) (bin p t1 t3) *)
(* Goal: search t2 *)
(* Goal: INSERT n (bin p t1 t2) (bin n t1 t2) *)
(* Goal: INSERT n (bin p t1 t2) (bin p t3 t2) *)
(* Goal: search t1 *)
(* Goal: INSERT n NIL (bin n NIL NIL) *)
auto with searchtrees.
(* Goal: INSERT n (bin p t1 t2) (bin p t1 t3) *)
(* Goal: search t2 *)
(* Goal: INSERT n (bin p t1 t2) (bin n t1 t2) *)
(* Goal: INSERT n (bin p t1 t2) (bin p t3 t2) *)
(* Goal: search t1 *)
eapply search_l; eauto with searchtrees.
(* Goal: INSERT n (bin p t1 t2) (bin p t1 t3) *)
(* Goal: search t2 *)
(* Goal: INSERT n (bin p t1 t2) (bin n t1 t2) *)
(* Goal: INSERT n (bin p t1 t2) (bin p t3 t2) *)
auto with searchtrees.
(* Goal: INSERT n (bin p t1 t2) (bin p t1 t3) *)
(* Goal: search t2 *)
(* Goal: INSERT n (bin p t1 t2) (bin n t1 t2) *)
rewrite e; auto with searchtrees.
(* Goal: INSERT n (bin p t1 t2) (bin p t1 t3) *)
(* Goal: search t2 *)
eapply search_r; eauto with searchtrees.
(* Goal: INSERT n (bin p t1 t2) (bin p t1 t3) *)
auto with searchtrees.
Qed.
Hint Resolve insert: searchtrees.
|
Require Import List.
Import ListNotations.
Require Import StructTact.StructTactics.
Require Import StructTact.Before.
Require Import StructTact.Prefix.
Set Implicit Arguments.
Fixpoint before_func {A: Type} (f : A -> bool) (g : A -> bool) (l : list A) : Prop :=
match l with
| [] => False
| a :: l' =>
f a = true \/
(g a = false /\ before_func f g l')
end.
Section before_func.
Variable A : Type.
Variables f g : A -> bool.
Definition before_func_dec : forall l, {before_func f g l} + {~ before_func f g l}.
Proof.
(* Goal: forall l : list A, sumbool (@before_func A f g l) (not (@before_func A f g l)) *)
intros; induction l; simpl in *.
(* Goal: sumbool (or (@eq bool (f a) true) (and (@eq bool (g a) false) (@before_func A f g l))) (not (or (@eq bool (f a) true) (and (@eq bool (g a) false) (@before_func A f g l)))) *)
(* Goal: sumbool False (not False) *)
-
(* Goal: sumbool False (not False) *)
intuition.
(* BG Goal: sumbool (or (@eq bool (f a) true) (and (@eq bool (g a) false) (@before_func A f g l))) (not (or (@eq bool (f a) true) (and (@eq bool (g a) false) (@before_func A f g l)))) *)
-
(* Goal: sumbool (or (@eq bool (f a) true) (and (@eq bool (g a) false) (@before_func A f g l))) (not (or (@eq bool (f a) true) (and (@eq bool (g a) false) (@before_func A f g l)))) *)
destruct (f a); destruct (g a); intuition.
Qed.
Lemma before_func_app :
forall l x,
before_func f g l ->
before_func f g (l ++ x).
Proof.
(* Goal: forall (l x : list A) (_ : @before_func A f g l), @before_func A f g (@app A l x) *)
intros.
(* Goal: @before_func A f g (@app A l x) *)
induction l; simpl in *; intuition.
Qed.
Lemma before_func_antisymmetric :
forall l, (forall x, f x = true -> g x = true -> False) ->
before_func f g l ->
before_func g f l ->
False.
Proof.
(* Goal: forall (l : list A) (_ : forall (x : A) (_ : @eq bool (f x) true) (_ : @eq bool (g x) true), False) (_ : @before_func A f g l) (_ : @before_func A g f l), False *)
induction l; simpl; intuition.
(* Goal: False *)
(* Goal: False *)
(* Goal: False *)
-
(* Goal: False *)
eauto.
(* BG Goal: False *)
(* BG Goal: False *)
-
(* Goal: False *)
congruence.
(* BG Goal: False *)
-
(* Goal: False *)
congruence.
Qed.
Lemma before_func_prepend :
forall l l',
before_func f g l ->
(forall x, In x l' -> g x = false) ->
before_func f g (l' ++ l).
Proof.
(* Goal: forall (l l' : list A) (_ : @before_func A f g l) (_ : forall (x : A) (_ : @In A x l'), @eq bool (g x) false), @before_func A f g (@app A l' l) *)
induction l'; intros; simpl in *; intuition.
Qed.
Lemma before_func_before :
forall l,
before_func f g l ->
forall y,
g y = true ->
exists x : A,
f x = true /\
before x y l.
Proof.
(* Goal: forall (l : list A) (_ : @before_func A f g l) (y : A) (_ : @eq bool (g y) true), @ex A (fun x : A => and (@eq bool (f x) true) (@before A x y l)) *)
induction l; intros; simpl in *; intuition.
(* Goal: @ex A (fun x : A => and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)))) *)
(* Goal: @ex A (fun x : A => and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)))) *)
-
(* Goal: @ex A (fun x : A => and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)))) *)
eauto.
(* BG Goal: @ex A (fun x : A => and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)))) *)
-
(* Goal: @ex A (fun x : A => and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)))) *)
find_copy_apply_hyp_hyp.
(* Goal: @ex A (fun x : A => and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)))) *)
break_exists_exists.
(* Goal: and (@eq bool (f x) true) (or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l))) *)
intuition.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
right.
(* Goal: and (forall _ : @eq A a y, False) (@before A x y l) *)
intuition.
(* Goal: False *)
congruence.
Qed.
Lemma before_func_prefix :
forall l l',
Prefix l l' ->
before_func f g l ->
before_func f g l'.
Proof.
(* Goal: forall (l l' : list A) (_ : @Prefix A l l') (_ : @before_func A f g l), @before_func A f g l' *)
intros.
(* Goal: @before_func A f g l' *)
find_apply_lem_hyp Prefix_exists_rest.
(* Goal: @before_func A f g l' *)
break_exists; subst.
(* Goal: @before_func A f g (@app A l x) *)
eauto using before_func_app.
Qed.
Lemma before_func_app_necessary :
forall l l',
~ before_func f g l ->
before_func f g (l ++ l') ->
(forall x, In x l -> g x = false) /\
before_func f g l'.
Proof.
(* Goal: forall (l l' : list A) (_ : not (@before_func A f g l)) (_ : @before_func A f g (@app A l l')), and (forall (x : A) (_ : @In A x l), @eq bool (g x) false) (@before_func A f g l') *)
intros.
(* Goal: and (forall (x : A) (_ : @In A x l), @eq bool (g x) false) (@before_func A f g l') *)
induction l; simpl in *; intuition; subst; auto.
Qed.
End before_func.
|
Require Import Coq.Arith.Arith.
Require Import Coq.Arith.Max.
Require Import Coq.Classes.EquivDec.
Require Import Coq.Lists.List.
Require Import Coq.Structures.Equalities.
Require Import Coq.FSets.FSets.
Require Import Metalib.CoqListFacts.
Require Import Metalib.FSetExtra.
Require Import Metalib.FSetWeakNotin.
Require Import Metalib.LibTactics.
Require Import Omega.
Module Type ATOM <: UsualDecidableType.
Parameter atom : Set.
Definition t := atom.
Parameter eq_dec : forall x y : atom, {x = y} + {x <> y}.
Parameter atom_fresh_for_list :
forall (xs : list t), {x : atom | ~ List.In x xs}.
Parameter fresh : list atom -> atom.
Parameter fresh_not_in : forall l, ~ In (fresh l) l.
Parameter nat_of : atom -> nat.
Hint Resolve eq_dec.
Include HasUsualEq <+ UsualIsEq <+ UsualIsEqOrig.
End ATOM.
Module Atom : ATOM.
Definition atom := nat.
Definition t := atom.
Definition eq_dec := eq_nat_dec.
Lemma max_lt_r : forall x y z,
x <= z -> x <= max y z.
Proof.
(* Goal: forall (x y z : nat) (_ : le x z), le x (Nat.max y z) *)
induction x.
(* Goal: forall (y z : nat) (_ : le (S x) z), le (S x) (Nat.max y z) *)
(* Goal: forall (y z : nat) (_ : le O z), le O (Nat.max y z) *)
auto with arith.
(* Goal: forall (y z : nat) (_ : le (S x) z), le (S x) (Nat.max y z) *)
induction y.
(* Goal: forall (z : nat) (_ : le (S x) z), le (S x) (Nat.max (S y) z) *)
(* Goal: forall (z : nat) (_ : le (S x) z), le (S x) (Nat.max O z) *)
auto with arith.
(* Goal: forall (z : nat) (_ : le (S x) z), le (S x) (Nat.max (S y) z) *)
simpl.
(* Goal: forall (z : nat) (_ : le (S x) z), le (S x) match z with | O => S y | S m' => S (Nat.max y m') end *)
induction z.
(* Goal: forall _ : le (S x) (S z), le (S x) (S (Nat.max y z)) *)
(* Goal: forall _ : le (S x) O, le (S x) (S y) *)
omega.
(* Goal: forall _ : le (S x) (S z), le (S x) (S (Nat.max y z)) *)
auto with arith.
Qed.
Lemma nat_list_max : forall (xs : list nat),
{ n : nat | forall x, List.In x xs -> x <= n }.
Proof.
(* Goal: forall xs : list nat, @sig nat (fun n : nat => forall (x : nat) (_ : @In nat x xs), le x n) *)
induction xs as [ | x xs [y H] ].
(* Goal: @sig nat (fun n : nat => forall (x0 : nat) (_ : @In nat x0 (@cons nat x xs)), le x0 n) *)
(* Goal: @sig nat (fun n : nat => forall (x : nat) (_ : @In nat x (@nil nat)), le x n) *)
exists 0.
(* Goal: @sig nat (fun n : nat => forall (x0 : nat) (_ : @In nat x0 (@cons nat x xs)), le x0 n) *)
(* Goal: forall (x : nat) (_ : @In nat x (@nil nat)), le x O *)
inversion 1.
(* Goal: @sig nat (fun n : nat => forall (x0 : nat) (_ : @In nat x0 (@cons nat x xs)), le x0 n) *)
exists (max x y).
(* Goal: forall (x0 : nat) (_ : @In nat x0 (@cons nat x xs)), le x0 (Nat.max x y) *)
intros z J.
(* Goal: le z (Nat.max x y) *)
simpl in J.
(* Goal: le z (Nat.max x y) *)
destruct J as [K | K].
(* Goal: le z (Nat.max x y) *)
(* Goal: le z (Nat.max x y) *)
subst.
(* Goal: le z (Nat.max x y) *)
(* Goal: le z (Nat.max z y) *)
auto with arith.
(* Goal: le z (Nat.max x y) *)
auto using max_lt_r.
Qed.
Lemma atom_fresh_for_list :
forall (xs : list nat), { n : nat | ~ List.In n xs }.
Proof.
(* Goal: forall xs : list nat, @sig nat (fun n : nat => not (@In nat n xs)) *)
intros xs.
(* Goal: @sig nat (fun n : nat => not (@In nat n xs)) *)
destruct (nat_list_max xs) as [x H].
(* Goal: @sig nat (fun n : nat => not (@In nat n xs)) *)
exists (S x).
(* Goal: not (@In nat (S x) xs) *)
intros J.
(* Goal: False *)
lapply (H (S x)).
(* Goal: @In nat (S x) xs *)
(* Goal: forall _ : le (S x) x, False *)
omega.
(* Goal: @In nat (S x) xs *)
trivial.
Qed.
Definition fresh (l : list atom) :=
match atom_fresh_for_list l with
(exist _ x _) => x
end.
Lemma fresh_not_in : forall l, ~ In (fresh l) l.
Proof.
(* Goal: forall l : list atom, not (@In nat (fresh l) l) *)
intro l.
(* Goal: not (@In nat (fresh l) l) *)
unfold fresh.
(* Goal: not (@In nat (let (x, _) := atom_fresh_for_list l in x) l) *)
destruct atom_fresh_for_list.
(* Goal: not (@In nat x l) *)
auto.
Qed.
Definition nat_of := fun (x : atom) => x.
Module Import AtomSetImpl : FSetExtra.WSfun Atom :=
FSetExtra.Make Atom.
Notation atoms :=
AtomSetImpl.t.
Module Export AtomSetDecide := Coq.FSets.FSetDecide.WDecide_fun Atom AtomSetImpl.
Module Export AtomSetNotin := FSetWeakNotin.Notin_fun Atom AtomSetImpl.
Module AtomSetFacts := FSetFacts.WFacts_fun Atom AtomSetImpl.
Module AtomSetProperties := FSetProperties.WProperties_fun Atom AtomSetImpl.
Export AtomSetFacts.
Lemma atom_fresh : forall L : atoms, { x : atom | ~ In x L }.
Proof.
(* Goal: forall L : t, @sig Atom.atom (fun x : Atom.atom => not (In x L)) *)
intros L.
(* Goal: @sig Atom.atom (fun x : Atom.atom => not (In x L)) *)
destruct (atom_fresh_for_list (elements L)) as [a H].
(* Goal: @sig Atom.atom (fun x : Atom.atom => not (In x L)) *)
exists a.
(* Goal: not (In a L) *)
intros J.
(* Goal: False *)
contradiction H.
(* Goal: @List.In Atom.atom a (elements L) *)
rewrite <- CoqListFacts.InA_iff_In.
(* Goal: @InA Atom.atom (@Logic.eq Atom.atom) a (elements L) *)
auto using elements_1.
Qed.
Proof.
intros L. destruct (atom_fresh_for_list (elements L)) as [a H].
exists a. intros J. contradiction H.
rewrite <- CoqListFacts.InA_iff_In. auto using elements_1.
Ltac simplify_list_of_atom_sets L :=
let L := eval simpl in L in
let L := ltac_remove_dups L in
let L := eval simpl in (List.fold_right union empty L) in
match L with
| context C [union ?E empty] => context C [ E ]
end.
Ltac gather_atoms_with F :=
let apply_arg x :=
match type of F with
| _ -> _ -> _ -> _ => constr:(@F _ _ x)
| _ -> _ -> _ => constr:(@F _ x)
| _ -> _ => constr:(@F x)
end in
let rec gather V :=
match goal with
| H : _ |- _ =>
let FH := apply_arg H in
match V with
| context [FH] => fail 1
| _ => gather (union FH V)
end
| _ => V
end in
let L := gather empty in eval simpl in L.
Ltac beautify_fset V :=
let rec go Acc E :=
match E with
| union ?E1 ?E2 => let Acc2 := go Acc E2 in go Acc2 E1
| empty => Acc
| ?E1 => match Acc with
| empty => E1
| _ => constr:(union E1 Acc)
end
end
in go empty V.
Ltac gather_atoms :=
constr:(empty).
Tactic Notation "pick" "fresh" ident(Y) "for" constr(L) :=
let Fr := fresh "Fr" in
let L := beautify_fset L in
(destruct (atom_fresh L) as [Y Fr]).
Tactic Notation "pick" "fresh" ident(Y) :=
let L := gather_atoms in
pick fresh Y for L.
Ltac pick_fresh y :=
pick fresh y.
Ltac gather_atoms ::=
let A := gather_atoms_with (fun x : atoms => x) in
let B := gather_atoms_with (fun x : atom => singleton x) in
constr:(union A B).
Lemma example_pick_fresh_use : forall (x y z : atom) (L1 L2 L3: atoms), True.
Proof.
(* Goal: forall (_ : Atom.atom) (_ : Atom.atom) (_ : Atom.atom) (_ : t) (_ : t) (_ : t), True *)
intros x y z L1 L2 L3.
(* Goal: True *)
pick fresh k.
(* Goal: True *)
trivial.
Qed.
|
Require Export Factorization.
Section Factorization_for_Synthesis.
Variable A : Set.
Variable BASE : BT.
Let b := base BASE.
Let Num := num BASE.
Let Digit := digit BASE.
Let Val_bound := val_bound BASE.
Definition Tl := tl Digit.
Variable FR : forall n : nat, A -> inf n -> inf n -> A.
Let R (n : nat) (a : A) (x y : inf n) (a' : A) : Prop := a' = FR n a x y.
Notation Factorizable := (factorizable _) (only parsing).
Notation Proper := (proper _) (only parsing).
Theorem factorization_for_synthesis :
factorizable _ R ->
proper _ BASE R ->
forall (n : nat) (X Y : Num n) (a : A),
{a' : A | R (exp b n) a (Val_bound n X) (Val_bound n Y) a'}.
Proof.
(* Goal: forall (_ : factorizable A R) (_ : proper A BASE R) (n : nat) (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a') *)
intros F P.
(* Goal: forall (n : nat) (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a') *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a')) (X Y : Num (S n)) (a : A), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
(* Goal: forall (X Y : Num O) (a : A), @sig A (fun a' : A => R (exp b O) a (Val_bound O X) (Val_bound O Y) a') *)
intros X Y a.
(* Goal: forall (n : nat) (_ : forall (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a')) (X Y : Num (S n)) (a : A), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
(* Goal: @sig A (fun a' : A => R (exp b O) a (Val_bound O X) (Val_bound O Y) a') *)
exists a.
(* Goal: forall (n : nat) (_ : forall (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a')) (X Y : Num (S n)) (a : A), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
(* Goal: R (exp b O) a (Val_bound O X) (Val_bound O Y) a *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : forall (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a')) (X Y : Num (S n)) (a : A), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
(* Goal: R (S O) a (Val_bound O X) (Val_bound O Y) a *)
unfold R in |- *; unfold Val_bound in |- *; apply prop_Rel.
(* Goal: forall (n : nat) (_ : forall (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a')) (X Y : Num (S n)) (a : A), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
(* Goal: proper A BASE (fun (n : nat) (a : A) (x y : inf n) (a' : A) => @eq A a' (FR n a x y)) *)
try trivial.
(* Goal: forall (n : nat) (_ : forall (X Y : Num n) (a : A), @sig A (fun a' : A => R (exp b n) a (Val_bound n X) (Val_bound n Y) a')) (X Y : Num (S n)) (a : A), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
clear n; intros n H_rec X Y a.
(* Goal: @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
elim (H_rec (Tl (S n) X) (Tl (S n) Y) (FR b a (Hd Digit n X) (Hd Digit n Y))).
(* Goal: forall (x : A) (_ : R (exp b n) (FR b a (Hd Digit n X) (Hd Digit n Y)) (Val_bound n (Tl (S n) X)) (Val_bound n (Tl (S n) Y)) x), @sig A (fun a' : A => R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a') *)
intros a' H; exists a'.
(* Goal: R (exp b (S n)) a (Val_bound (S n) X) (Val_bound (S n) Y) a' *)
unfold b in |- *; unfold R in |- *; unfold Val_bound in |- *.
(* Goal: @eq A a' (FR (exp (base BASE) (S n)) a (val_bound BASE (S n) X) (val_bound BASE (S n) Y)) *)
apply fact_Rel; try trivial.
Qed.
End Factorization_for_Synthesis.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Group_util.
Require Export Monoid_util.
Require Export Ring_cat.
Section Ring.
Variable E : Setoid.
Variable ringplus : E -> E -> E.
Variable ringmult : E -> E -> E.
Variable zero : E.
Variable un : E.
Variable ringopp : E -> E.
Hypothesis
ringpluscomp :
forall x x' y y' : E,
Equal x x' -> Equal y y' -> Equal (ringplus x y) (ringplus x' y').
Hypothesis
ringplusassoc :
forall x y z : E,
Equal (ringplus (ringplus x y) z) (ringplus x (ringplus y z)).
Hypothesis zerounitringplusr : forall x : E, Equal (ringplus x zero) x.
Hypothesis
oppcomp : forall x y : E, Equal x y -> Equal (ringopp x) (ringopp y).
Hypothesis ringoppr : forall x : E, Equal (ringplus x (ringopp x)) zero.
Hypothesis ringpluscom : forall x y : E, Equal (ringplus x y) (ringplus y x).
Hypothesis
ringmultcomp :
forall x x' y y' : E,
Equal x x' -> Equal y y' -> Equal (ringmult x y) (ringmult x' y').
Hypothesis
ringmultassoc :
forall x y z : E,
Equal (ringmult (ringmult x y) z) (ringmult x (ringmult y z)).
Hypothesis ununitringmultr : forall x : E, Equal (ringmult x un) x.
Hypothesis ununitlringmult : forall x : E, Equal (ringmult un x) x.
Hypothesis
ringdistl :
forall x y z : E,
Equal (ringmult x (ringplus y z))
(ringplus (ringmult x y) (ringmult x z)).
Hypothesis
ringdistr :
forall x y z : E,
Equal (ringmult (ringplus x y) z)
(ringplus (ringmult x z) (ringmult y z)).
Definition G :=
BUILD_ABELIAN_GROUP ringpluscomp ringplusassoc zerounitringplusr oppcomp
ringoppr ringpluscom.
Definition M :=
BUILD_MONOID ringmultcomp ringmultassoc ununitringmultr ununitlringmult.
Definition BUILD_RING : RING.
Proof.
(* Goal: Ob RING *)
apply (Build_ring (ring_group:=G)).
(* Goal: ring_on G *)
apply (Build_ring_on (R:=G) (ring_mult_sgroup:=M) (ring_mult_monoid:=M) M).
(* Goal: @dist_l (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@sgroup_law_map (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (sgroup_on_def (monoid_sgroup M))) (@sgroup_law_map (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (sgroup_on_def (monoid_sgroup (group_monoid (abelian_group_group G))))) *)
(* Goal: @dist_r (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@sgroup_law_map (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (sgroup_on_def (monoid_sgroup M))) (@sgroup_law_map (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (sgroup_on_def (monoid_sgroup (group_monoid (abelian_group_group G))))) *)
abstract (red in |- *; simpl in |- *; intros x y z; apply Trans with (ringmult (ringplus x y) z); auto with algebra).
(* Goal: @dist_l (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (@sgroup_law_map (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (sgroup_on_def (monoid_sgroup M))) (@sgroup_law_map (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G)))) (sgroup_on_def (monoid_sgroup (group_monoid (abelian_group_group G))))) *)
abstract (red in |- *; simpl in |- *; auto with algebra).
Qed.
End Ring.
Section Hom.
Variable Ring1 Ring2 : ring.
Variable ff : Ring1 -> Ring2.
Hypothesis ffcomp : forall x y : Ring1, Equal x y -> Equal (ff x) (ff y).
Hypothesis
ffplus :
forall x y : Ring1,
Equal (ff (sgroup_law Ring1 x y)) (sgroup_law Ring2 (ff x) (ff y)).
Hypothesis ffzero : Equal (ff (monoid_unit Ring1)) (monoid_unit Ring2).
Hypothesis
ffmult :
forall x y : Ring1, Equal (ff (ring_mult x y)) (ring_mult (ff x) (ff y)).
Hypothesis ffone : Equal (ff (ring_unit Ring1)) (ring_unit Ring2).
Definition BUILD_HOM_RING : Hom (Ring1:RING) (Ring2:RING).
Proof.
(* Goal: Carrier (@Hom RING (Ring1 : Ob RING) (Ring2 : Ob RING)) *)
apply (Build_ring_hom (E:=Ring1) (F:=Ring2) (ring_plus_hom:=BUILD_HOM_GROUP ffcomp ffplus ffzero)); abstract (red in |- *; simpl in |- *; auto with algebra).
Qed.
End Hom. |
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Field_facts.
Require Export Cfield_cat.
Section Lemmas1.
Variable K : CFIELD.
Lemma CFIELD_com : forall x y : K, Equal (ring_mult x y) (ring_mult y x).
Proof.
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x y) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y x) *)
exact (cring_com_prf K).
Qed.
Hint Immediate CFIELD_com: algebra.
Lemma CFIELD_inverse_law2 :
forall x y : K,
~ Equal x (monoid_unit K) ->
~ Equal y (monoid_unit K) ->
Equal (field_inverse (ring_mult x y))
(ring_mult (field_inverse x) (field_inverse y)).
Proof.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) x) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) y)) *)
intros x y H' H'0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x y)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) x) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) y)) *)
apply Trans with (ring_mult (field_inverse y) (field_inverse x):K); auto with algebra.
Qed.
Hint Resolve CFIELD_inverse_law2: algebra.
Lemma CFIELD_simpl_l :
forall x y : K,
~ Equal y (monoid_unit K) -> Equal (ring_mult y (field_div x y)) x.
Proof.
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))))))))) (_ : not (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) y (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y (@field_div (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) x y)) x *)
intros x y H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y (@field_div (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) x y)) x *)
apply Trans with (ring_mult (field_div x y) y:K); auto with algebra.
Qed.
Hint Resolve CFIELD_simpl_l: algebra.
Comments "Normalisation.".
Lemma CFIELD_mult4 :
forall a b c d : K,
Equal (ring_mult (ring_mult a b) (ring_mult c d))
(ring_mult (ring_mult a c) (ring_mult b d)).
Proof.
(* Goal: forall a b c d : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) a b) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) c d)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) a c) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) b d)) *)
exact (CRING_mult4 (R1:=K)).
Qed.
Hint Resolve CRING_mult4: algebra.
Lemma CFIELD_mult3 :
forall x y z : K,
Equal (ring_mult x (ring_mult y z)) (ring_mult y (ring_mult x z)).
Proof.
(* Goal: forall x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y z)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x z)) *)
exact (CRING_mult3 (R1:=K)).
Qed.
Hint Resolve CFIELD_mult3: algebra.
Lemma CFIELD_mult3bis :
forall x y z : K,
Equal (ring_mult (ring_mult x y) z) (ring_mult (ring_mult x z) y).
Proof.
(* Goal: forall x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x y) z) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) x z) y) *)
exact (CRING_mult3bis (R1:=K)).
Qed.
Hint Resolve CFIELD_mult3bis: algebra.
Lemma CFIELD_mult_div_r :
forall x y z : K,
Equal (ring_mult (field_div y z) x) (field_div (ring_mult y x) z).
Proof.
(* Goal: forall x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@field_div (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) y z) x) (@field_div (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y x) z) *)
unfold field_div in |- *.
(* Goal: forall x y z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)))))))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) z)) x) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) (@ring_mult (field_ring (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K))) y x) (@field_inverse (@Build_field (cring_ring (cfield_ring K)) (cfield_on_def K)) z)) *)
auto with algebra.
Qed.
End Lemmas1.
Hint Resolve CFIELD_inverse_law2 CFIELD_simpl_l CFIELD_mult4 CFIELD_mult3
CFIELD_mult3bis CFIELD_mult_div_r: algebra.
Hint Immediate CFIELD_com: algebra.
|
Require Import Coq.Classes.Equivalence.
Require Import Coq.Classes.EquivDec.
Require Import Coq.Logic.Decidable.
Hint Extern 0 (?x === ?x) => reflexivity.
Hint Extern 1 (_ === _) => (symmetry; trivial; fail).
Hint Extern 1 (_ =/= _) => (symmetry; trivial; fail).
Lemma equiv_reflexive' : forall (A : Type) `{EqDec A} (x : A),
x === x.
Proof.
(* Goal: forall (A : Type) (R : Relation_Definitions.relation A) (equiv0 : @Equivalence A R) (_ : @EqDec A R equiv0) (x : A), @equiv A R equiv0 x x *)
intros.
(* Goal: @equiv A R equiv0 x x *)
apply equiv_reflexive.
Qed.
Lemma equiv_symmetric' : forall (A : Type) `{EqDec A} (x y : A),
x === y ->
y === x.
Proof.
(* Goal: forall (A : Type) (R : Relation_Definitions.relation A) (equiv0 : @Equivalence A R) (_ : @EqDec A R equiv0) (x y : A) (_ : @equiv A R equiv0 x y), @equiv A R equiv0 y x *)
intros.
(* Goal: @equiv A R equiv0 y x *)
apply equiv_symmetric; assumption.
Qed.
Lemma equiv_transitive' : forall (A : Type) `{EqDec A} (x y z : A),
x === y ->
y === z ->
x === z.
Proof.
(* Goal: forall (A : Type) (R : Relation_Definitions.relation A) (equiv0 : @Equivalence A R) (_ : @EqDec A R equiv0) (x y z : A) (_ : @equiv A R equiv0 x y) (_ : @equiv A R equiv0 y z), @equiv A R equiv0 x z *)
intros.
(* Goal: @equiv A R equiv0 x z *)
eapply @equiv_transitive; eassumption.
Qed.
Lemma equiv_decidable : forall (A : Type) `{EqDec A} (x y : A),
decidable (x === y).
Proof.
(* Goal: forall (A : Type) (R : Relation_Definitions.relation A) (equiv0 : @Equivalence A R) (_ : @EqDec A R equiv0) (x y : A), decidable (@equiv A R equiv0 x y) *)
intros.
(* Goal: decidable (@equiv A R equiv0 x y) *)
unfold decidable.
(* Goal: or (@equiv A R equiv0 x y) (not (@equiv A R equiv0 x y)) *)
destruct (x == y); auto.
Qed.
Theorem eq_dec_refl {A : Type} `{EqDec_eq A} (x : A) : eq_dec x x = left eq_refl.
Proof.
(* Goal: @eq (sumbool (@eq A x x) (not (@eq A x x))) (@eq_dec A H x x) (@left (@eq A x x) (not (@eq A x x)) (@eq_refl A x)) *)
destruct (eq_dec x x); [|contradiction].
(* Goal: @eq (sumbool (@eq A x x) (not (@eq A x x))) (@left (@eq A x x) (not (@eq A x x)) e) (@left (@eq A x x) (not (@eq A x x)) (@eq_refl A x)) *)
f_equal; apply (Eqdep_dec.UIP_dec eq_dec).
Qed.
Notation " x == y " := (eq_dec x y) (at level 70) : coqeqdec_scope.
Open Scope coqeqdec_scope.
|
Require Import List.
Import ListNotations.
Require Import StructTact.StructTactics.
Require Import StructTact.ListUtil.
Require Import StructTact.ListTactics.
Require Import StructTact.Before.
Set Implicit Arguments.
Section remove_all.
Variable A : Type.
Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}.
Fixpoint remove_all (to_delete l : list A) : list A :=
match to_delete with
| [] => l
| d :: ds => remove_all ds (remove A_eq_dec d l)
end.
Lemma in_remove_all_was_in :
forall ds l x,
In x (remove_all ds l) ->
In x l.
Proof.
(* Goal: forall (ds l : list A) (x : A) (_ : @In A x (remove_all ds l)), @In A x l *)
induction ds; intros; simpl in *; intuition.
(* Goal: @In A x l *)
eauto using in_remove.
Qed.
Lemma in_remove_all_preserve :
forall ds l x,
~ In x ds ->
In x l ->
In x (remove_all ds l).
Proof.
(* Goal: forall (ds l : list A) (x : A) (_ : not (@In A x ds)) (_ : @In A x l), @In A x (remove_all ds l) *)
induction ds; intros; simpl in *; intuition auto using remove_preserve.
Qed.
Lemma in_remove_all_not_in :
forall ds l x,
In x (remove_all ds l) ->
In x ds ->
False.
Proof.
(* Goal: forall (ds l : list A) (x : A) (_ : @In A x (remove_all ds l)) (_ : @In A x ds), False *)
induction ds; intros; simpl in *; intuition.
(* Goal: False *)
(* Goal: False *)
-
(* Goal: False *)
subst.
(* Goal: False *)
find_apply_lem_hyp in_remove_all_was_in.
(* Goal: False *)
eapply remove_In; eauto.
(* BG Goal: False *)
-
(* Goal: False *)
eauto.
Qed.
Lemma remove_all_nil :
forall ys,
remove_all ys [] = [].
Proof.
(* Goal: forall ys : list A, @eq (list A) (remove_all ys (@nil A)) (@nil A) *)
intros.
(* Goal: @eq (list A) (remove_all ys (@nil A)) (@nil A) *)
induction ys; simpl in *; intuition.
Qed.
Lemma remove_all_cons :
forall ys a l,
(remove_all ys (a :: l) = remove_all ys l /\
In a ys) \/
(remove_all ys (a :: l) = a :: (remove_all ys l) /\
~In a ys).
Proof.
(* Goal: forall (ys : list A) (a : A) (l : list A), or (and (@eq (list A) (remove_all ys (@cons A a l)) (remove_all ys l)) (@In A a ys)) (and (@eq (list A) (remove_all ys (@cons A a l)) (@cons A a (remove_all ys l))) (not (@In A a ys))) *)
induction ys; intros; simpl in *; intuition.
(* Goal: or (and (@eq (list A) (remove_all ys (if A_eq_dec a a0 then @remove A A_eq_dec a l else @cons A a0 (@remove A A_eq_dec a l))) (remove_all ys (@remove A A_eq_dec a l))) (or (@eq A a a0) (@In A a0 ys))) (and (@eq (list A) (remove_all ys (if A_eq_dec a a0 then @remove A A_eq_dec a l else @cons A a0 (@remove A A_eq_dec a l))) (@cons A a0 (remove_all ys (@remove A A_eq_dec a l)))) (forall _ : or (@eq A a a0) (@In A a0 ys), False)) *)
break_if; subst; simpl in *; intuition.
(* Goal: or (and (@eq (list A) (remove_all ys (@cons A a0 (@remove A A_eq_dec a l))) (remove_all ys (@remove A A_eq_dec a l))) (or (@eq A a a0) (@In A a0 ys))) (and (@eq (list A) (remove_all ys (@cons A a0 (@remove A A_eq_dec a l))) (@cons A a0 (remove_all ys (@remove A A_eq_dec a l)))) (forall _ : or (@eq A a a0) (@In A a0 ys), False)) *)
specialize (IHys a0 (remove A_eq_dec a l)).
(* Goal: or (and (@eq (list A) (remove_all ys (@cons A a0 (@remove A A_eq_dec a l))) (remove_all ys (@remove A A_eq_dec a l))) (or (@eq A a a0) (@In A a0 ys))) (and (@eq (list A) (remove_all ys (@cons A a0 (@remove A A_eq_dec a l))) (@cons A a0 (remove_all ys (@remove A A_eq_dec a l)))) (forall _ : or (@eq A a a0) (@In A a0 ys), False)) *)
intuition.
Qed.
Lemma before_remove_all :
forall x y l ys,
before x y (remove_all ys l) ->
~ In y ys ->
before x y l.
Proof.
(* Goal: forall (x y : A) (l ys : list A) (_ : @before A x y (remove_all ys l)) (_ : not (@In A y ys)), @before A x y l *)
induction l; intros; simpl in *; intuition.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
(* Goal: False *)
-
(* Goal: False *)
rewrite remove_all_nil in *.
(* Goal: False *)
simpl in *.
(* Goal: False *)
intuition.
(* BG Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
-
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
pose proof remove_all_cons ys a l.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
intuition.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
+
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
repeat find_rewrite.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
right.
(* Goal: and (forall _ : @eq A a y, False) (@before A x y l) *)
intuition eauto.
(* Goal: False *)
subst; intuition.
(* BG Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
+
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
repeat find_rewrite.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
simpl in *.
(* Goal: or (@eq A a x) (and (forall _ : @eq A a y, False) (@before A x y l)) *)
intuition eauto.
Qed.
Lemma before_remove_all_if :
forall x y l xs,
before x y l ->
~ In x xs ->
before x y (remove_all xs l).
Proof.
(* Goal: forall (x y : A) (l xs : list A) (_ : @before A x y l) (_ : not (@In A x xs)), @before A x y (remove_all xs l) *)
induction l; intros; simpl in *; intuition; pose proof remove_all_cons xs a l; subst; intuition; repeat find_rewrite; simpl in *; intuition.
Qed.
Lemma NoDup_remove_all :
forall l l',
NoDup l' ->
NoDup (remove_all l l').
Proof.
(* Goal: forall (l l' : list A) (_ : @NoDup A l'), @NoDup A (remove_all l l') *)
intros.
(* Goal: @NoDup A (remove_all l l') *)
induction l'.
(* Goal: @NoDup A (remove_all l (@cons A a l')) *)
(* Goal: @NoDup A (remove_all l (@nil A)) *)
-
(* Goal: @NoDup A (remove_all l (@nil A)) *)
rewrite remove_all_nil; auto.
(* BG Goal: @NoDup A (remove_all l (@cons A a l')) *)
-
(* Goal: @NoDup A (remove_all l (@cons A a l')) *)
invc_NoDup.
(* Goal: @NoDup A (remove_all l (@cons A a l')) *)
concludes.
(* Goal: @NoDup A (remove_all l (@cons A a l')) *)
pose proof remove_all_cons l a l'.
(* Goal: @NoDup A (remove_all l (@cons A a l')) *)
break_or_hyp; break_and; find_rewrite; auto.
(* Goal: @NoDup A (@cons A a (remove_all l l')) *)
constructor; auto.
(* Goal: not (@In A a (remove_all l l')) *)
intro.
(* Goal: False *)
find_apply_lem_hyp in_remove_all_was_in; auto.
Qed.
Lemma remove_all_NoDup_split :
forall l l' l0 l1 a,
NoDup l' ->
remove_all l l' = l0 ++ a :: l1 ->
remove_all l (remove A_eq_dec a l') = l0 ++ l1.
Proof.
(* Goal: forall (l l' l0 l1 : list A) (a : A) (_ : @NoDup A l') (_ : @eq (list A) (remove_all l l') (@app A l0 (@cons A a l1))), @eq (list A) (remove_all l (@remove A A_eq_dec a l')) (@app A l0 l1) *)
induction l'; intros; simpl in *.
(* Goal: @eq (list A) (remove_all l (if A_eq_dec a0 a then @remove A A_eq_dec a0 l' else @cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
(* Goal: @eq (list A) (remove_all l (@nil A)) (@app A l0 l1) *)
-
(* Goal: @eq (list A) (remove_all l (@nil A)) (@app A l0 l1) *)
find_rewrite_lem remove_all_nil.
(* Goal: @eq (list A) (remove_all l (@nil A)) (@app A l0 l1) *)
destruct l0; simpl in *; match goal with H: [] = _ |- _ => contradict H end; auto using nil_cons.
(* BG Goal: @eq (list A) (remove_all l (if A_eq_dec a0 a then @remove A A_eq_dec a0 l' else @cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
-
(* Goal: @eq (list A) (remove_all l (if A_eq_dec a0 a then @remove A A_eq_dec a0 l' else @cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
invc_NoDup.
(* Goal: @eq (list A) (remove_all l (if A_eq_dec a0 a then @remove A A_eq_dec a0 l' else @cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
break_if; subst.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
(* Goal: @eq (list A) (remove_all l (@remove A A_eq_dec a l')) (@app A l0 l1) *)
*
(* Goal: @eq (list A) (remove_all l (@remove A A_eq_dec a l')) (@app A l0 l1) *)
rewrite remove_not_in; auto.
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
pose proof remove_all_cons l a l'.
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
break_or_hyp; break_and.
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
+
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
find_rewrite.
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
match goal with H0: NoDup _, H1: _ = remove_all _ _ |- _ => specialize (IHl' _ _ _ H0 (eq_sym H1)) end.
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
rewrite remove_not_in in IHl'; auto.
(* BG Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
(* BG Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
+
(* Goal: @eq (list A) (remove_all l l') (@app A l0 l1) *)
destruct l0; simpl in *; find_rewrite; find_injection; auto.
(* Goal: @eq (list A) (remove_all l l') (@cons A a (@app A l0 l1)) *)
assert (In a (remove_all l l')).
(* Goal: @eq (list A) (remove_all l l') (@cons A a (@app A l0 l1)) *)
(* Goal: @In A a (remove_all l l') *)
match goal with H: _ = remove_all _ _ |- _ => rewrite <- H end.
(* Goal: @eq (list A) (remove_all l l') (@cons A a (@app A l0 l1)) *)
(* Goal: @In A a (@app A l0 (@cons A a l1)) *)
apply in_or_app.
(* Goal: @eq (list A) (remove_all l l') (@cons A a (@app A l0 l1)) *)
(* Goal: or (@In A a l0) (@In A a (@cons A a l1)) *)
right; left; auto.
(* Goal: @eq (list A) (remove_all l l') (@cons A a (@app A l0 l1)) *)
find_apply_lem_hyp in_remove_all_was_in.
(* Goal: @eq (list A) (remove_all l l') (@cons A a (@app A l0 l1)) *)
intuition.
(* BG Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
*
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
pose proof remove_all_cons l a l'.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
break_or_hyp; break_and; find_rewrite.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
+
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
pose proof remove_all_cons l a (remove A_eq_dec a0 l').
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
break_or_hyp; break_and; intuition.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
aggressive_rewrite_goal; auto.
(* BG Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
+
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@app A l0 l1) *)
destruct l0; simpl in *; find_injection; intuition.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@cons A a (@app A l0 l1)) *)
match goal with H0: NoDup _, H1: _ = remove_all _ _ |- _ => specialize (IHl' _ _ _ H0 (eq_sym H1)) end.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@cons A a (@app A l0 l1)) *)
rewrite <- IHl'.
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@cons A a (remove_all l (@remove A A_eq_dec a0 l'))) *)
pose proof remove_all_cons l a (remove A_eq_dec a0 l').
(* Goal: @eq (list A) (remove_all l (@cons A a (@remove A A_eq_dec a0 l'))) (@cons A a (remove_all l (@remove A A_eq_dec a0 l'))) *)
break_or_hyp; break_and; intuition.
Qed.
Lemma remove_all_app_l :
forall xs ys zs,
remove_all (xs ++ ys) zs = remove_all xs (remove_all ys zs).
Proof.
(* Goal: forall xs ys zs : list A, @eq (list A) (remove_all (@app A xs ys) zs) (remove_all xs (remove_all ys zs)) *)
induction zs; intros.
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@cons A a zs)) (remove_all xs (remove_all ys (@cons A a zs))) *)
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@nil A)) (remove_all xs (remove_all ys (@nil A))) *)
-
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@nil A)) (remove_all xs (remove_all ys (@nil A))) *)
now repeat rewrite remove_all_nil.
(* BG Goal: @eq (list A) (remove_all (@app A xs ys) (@cons A a zs)) (remove_all xs (remove_all ys (@cons A a zs))) *)
-
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@cons A a zs)) (remove_all xs (remove_all ys (@cons A a zs))) *)
pose proof (remove_all_cons (xs ++ ys) a zs).
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@cons A a zs)) (remove_all xs (remove_all ys (@cons A a zs))) *)
pose proof (remove_all_cons ys a zs).
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@cons A a zs)) (remove_all xs (remove_all ys (@cons A a zs))) *)
pose proof (remove_all_cons xs a (remove_all ys zs)).
(* Goal: @eq (list A) (remove_all (@app A xs ys) (@cons A a zs)) (remove_all xs (remove_all ys (@cons A a zs))) *)
repeat (break_or_hyp; break_and); repeat find_rewrite; try find_eapply_lem_hyp in_app_or; try assert (In a (xs ++ ys)) by (eapply in_or_app; eauto); tauto.
Qed.
Lemma remove_all_app_r :
forall xs ys zs,
remove_all xs (ys ++ zs) = remove_all xs ys ++ remove_all xs zs.
Proof.
(* Goal: forall xs ys zs : list A, @eq (list A) (remove_all xs (@app A ys zs)) (@app A (remove_all xs ys) (remove_all xs zs)) *)
induction xs.
(* Goal: forall ys zs : list A, @eq (list A) (remove_all (@cons A a xs) (@app A ys zs)) (@app A (remove_all (@cons A a xs) ys) (remove_all (@cons A a xs) zs)) *)
(* Goal: forall ys zs : list A, @eq (list A) (remove_all (@nil A) (@app A ys zs)) (@app A (remove_all (@nil A) ys) (remove_all (@nil A) zs)) *)
-
(* Goal: forall ys zs : list A, @eq (list A) (remove_all (@nil A) (@app A ys zs)) (@app A (remove_all (@nil A) ys) (remove_all (@nil A) zs)) *)
auto.
(* BG Goal: forall ys zs : list A, @eq (list A) (remove_all (@cons A a xs) (@app A ys zs)) (@app A (remove_all (@cons A a xs) ys) (remove_all (@cons A a xs) zs)) *)
-
(* Goal: forall ys zs : list A, @eq (list A) (remove_all (@cons A a xs) (@app A ys zs)) (@app A (remove_all (@cons A a xs) ys) (remove_all (@cons A a xs) zs)) *)
intros.
(* Goal: @eq (list A) (remove_all (@cons A a xs) (@app A ys zs)) (@app A (remove_all (@cons A a xs) ys) (remove_all (@cons A a xs) zs)) *)
simpl.
(* Goal: @eq (list A) (remove_all xs (@remove A A_eq_dec a (@app A ys zs))) (@app A (remove_all xs (@remove A A_eq_dec a ys)) (remove_all xs (@remove A A_eq_dec a zs))) *)
rewrite remove_app_comm.
(* Goal: @eq (list A) (remove_all xs (@app A (@remove A A_eq_dec a ys) (@remove A A_eq_dec a zs))) (@app A (remove_all xs (@remove A A_eq_dec a ys)) (remove_all xs (@remove A A_eq_dec a zs))) *)
auto.
Qed.
Lemma remove_all_del_comm :
forall xs ys zs,
remove_all xs (remove_all ys zs) = remove_all ys (remove_all xs zs).
Proof.
(* Goal: forall xs ys zs : list A, @eq (list A) (remove_all xs (remove_all ys zs)) (remove_all ys (remove_all xs zs)) *)
intros.
(* Goal: @eq (list A) (remove_all xs (remove_all ys zs)) (remove_all ys (remove_all xs zs)) *)
induction zs; intros.
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@nil A))) (remove_all ys (remove_all xs (@nil A))) *)
-
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@nil A))) (remove_all ys (remove_all xs (@nil A))) *)
now repeat rewrite remove_all_nil.
(* BG Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
-
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
pose proof (remove_all_cons xs a zs).
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
pose proof (remove_all_cons ys a zs).
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
pose proof (remove_all_cons ys a (remove_all xs zs)).
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
pose proof (remove_all_cons xs a (remove_all ys zs)).
(* Goal: @eq (list A) (remove_all xs (remove_all ys (@cons A a zs))) (remove_all ys (remove_all xs (@cons A a zs))) *)
repeat (break_or_hyp; break_and); repeat find_rewrite; congruence.
Qed.
End remove_all.
Arguments in_remove_all_was_in : clear implicits.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div choice fintype.
From mathcomp
Require Import bigop ssralg countalg binomial tuple.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GRing.Theory.
Local Open Scope ring_scope.
Reserved Notation "{ 'poly' T }" (at level 0, format "{ 'poly' T }").
Reserved Notation "c %:P" (at level 2, format "c %:P").
Reserved Notation "p ^:P" (at level 2, format "p ^:P").
Reserved Notation "'X" (at level 0).
Reserved Notation "''X^' n" (at level 3, n at level 2, format "''X^' n").
Reserved Notation "\poly_ ( i < n ) E"
(at level 36, E at level 36, i, n at level 50,
format "\poly_ ( i < n ) E").
Reserved Notation "p \Po q" (at level 50).
Reserved Notation "p ^`N ( n )" (at level 8, format "p ^`N ( n )").
Reserved Notation "n .-unity_root" (at level 2, format "n .-unity_root").
Reserved Notation "n .-primitive_root"
(at level 2, format "n .-primitive_root").
Local Notation simp := Monoid.simpm.
Section Polynomial.
Variable R : ringType.
Record polynomial := Polynomial {polyseq :> seq R; _ : last 1 polyseq != 0}.
Canonical polynomial_subType := Eval hnf in [subType for polyseq].
Definition polynomial_eqMixin := Eval hnf in [eqMixin of polynomial by <:].
Canonical polynomial_eqType := Eval hnf in EqType polynomial polynomial_eqMixin.
Definition polynomial_choiceMixin := [choiceMixin of polynomial by <:].
Definition poly_of of phant R := polynomial.
Identity Coercion type_poly_of : poly_of >-> polynomial.
Definition coefp_head h i (p : poly_of (Phant R)) := let: tt := h in p`_i.
End Polynomial.
Bind Scope ring_scope with poly_of.
Bind Scope ring_scope with polynomial.
Arguments polyseq {R} p%R.
Arguments poly_inj {R} [p1%R p2%R] : rename.
Arguments coefp_head {R} h i%N p%R.
Notation "{ 'poly' T }" := (poly_of (Phant T)).
Notation coefp i := (coefp_head tt i).
Definition poly_countMixin (R : countRingType) :=
[countMixin of polynomial R by <:].
Canonical polynomial_countType R := CountType _ (poly_countMixin R).
Canonical poly_countType (R : countRingType) := [countType of {poly R}].
Section PolynomialTheory.
Variable R : ringType.
Implicit Types (a b c x y z : R) (p q r d : {poly R}).
Canonical poly_subType := Eval hnf in [subType of {poly R}].
Canonical poly_eqType := Eval hnf in [eqType of {poly R}].
Canonical poly_choiceType := Eval hnf in [choiceType of {poly R}].
Definition lead_coef p := p`_(size p).-1.
Definition poly_nil := @Polynomial R [::] (oner_neq0 R).
Definition polyC c : {poly R} := insubd poly_nil [:: c].
Local Notation "c %:P" := (polyC c).
Lemma polyseqC c : c%:P = nseq (c != 0) c :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (polyC c)) (@nseq (GRing.Ring.sort R) (nat_of_bool (negb (@eq_op (GRing.Ring.eqType R) c (GRing.zero (GRing.Ring.zmodType R))))) c) *)
by rewrite val_insubd /=; case: (c == 0).
Qed.
Lemma size_polyC c : size c%:P = (c != 0).
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (polyC c))) (nat_of_bool (negb (@eq_op (GRing.Ring.eqType R) c (GRing.zero (GRing.Ring.zmodType R))))) *)
by rewrite polyseqC size_nseq.
Qed.
Lemma coefC c i : c%:P`_i = if i == 0%N then c else 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC c)) i) (if @eq_op nat_eqType i O then c else GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite polyseqC; case: i => [|[]]; case: eqP.
Qed.
Lemma polyCK : cancel polyC (coefp 0).
Proof.
(* Goal: @cancel (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.Ring.sort R) polyC (@coefp_head R tt O) *)
by move=> c; rewrite [coefp 0 _]coefC.
Qed.
Lemma polyC_inj : injective polyC.
Proof.
(* Goal: @injective (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.Ring.sort R) polyC *)
by move=> c1 c2 eqc12; have:= coefC c2 0; rewrite -eqc12 coefC.
Qed.
Lemma lead_coefC c : lead_coef c%:P = c.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (polyC c)) c *)
by rewrite /lead_coef polyseqC; case: eqP.
Qed.
Lemma polyP p q : nth 0 p =1 nth 0 q <-> p = q.
Lemma size1_polyC p : size p <= 1 -> p = (p`_0)%:P.
Proof.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) (S O)), @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (polyC (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) O)) *)
move=> le_p_1; apply/polyP=> i; rewrite coefC.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (if @eq_op nat_eqType i O then @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) O else GRing.zero (GRing.Ring.zmodType R)) *)
by case: i => // i; rewrite nth_default // (leq_trans le_p_1).
Qed.
Definition cons_poly c p : {poly R} :=
if p is Polynomial ((_ :: _) as s) ns then
@Polynomial R (c :: s) ns
else c%:P.
Lemma polyseq_cons c p :
cons_poly c p = (if ~~ nilp p then c :: p else c%:P) :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (cons_poly c p)) (if negb (@nilp (GRing.Ring.sort R) (@polyseq R p)) then @cons (GRing.Ring.sort R) c (@polyseq R p) else @polyseq R (polyC c)) *)
by case: p => [[]].
Qed.
Lemma size_cons_poly c p :
size (cons_poly c p) = (if nilp p && (c == 0) then 0%N else (size p).+1).
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (cons_poly c p))) (if andb (@nilp (GRing.Ring.sort R) (@polyseq R p)) (@eq_op (GRing.Ring.eqType R) c (GRing.zero (GRing.Ring.zmodType R))) then O else S (@size (GRing.Ring.sort R) (@polyseq R p))) *)
by case: p => [[|c' s] _] //=; rewrite size_polyC; case: eqP.
Qed.
Lemma coef_cons c p i : (cons_poly c p)`_i = if i == 0%N then c else p`_i.-1.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (cons_poly c p)) i) (if @eq_op nat_eqType i O then c else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred i)) *)
by case: p i => [[|c' s] _] [] //=; rewrite polyseqC; case: eqP => //= _ [].
Qed.
Definition Poly := foldr cons_poly 0%:P.
Lemma PolyK c s : last c s != 0 -> Poly s = s :> seq R.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType R) (@last (GRing.Ring.sort R) c s) (GRing.zero (GRing.Ring.zmodType R)))), @eq (list (GRing.Ring.sort R)) (@polyseq R (Poly s)) s *)
case: s => {c}/= [_ |c s]; first by rewrite polyseqC eqxx.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType R) (@last (GRing.Ring.sort R) c s) (GRing.zero (GRing.Ring.zmodType R)))), @eq (list (GRing.Ring.sort R)) (@polyseq R (cons_poly c (Poly s))) (@cons (GRing.Ring.sort R) c s) *)
elim: s c => /= [|a s IHs] c nz_c; rewrite polyseq_cons ?{}IHs //.
(* Goal: @eq (list (GRing.Ring.sort R)) (if negb (@nilp (GRing.Ring.sort R) (@polyseq R (polyC (GRing.zero (GRing.Ring.zmodType R))))) then @cons (GRing.Ring.sort R) c (@polyseq R (polyC (GRing.zero (GRing.Ring.zmodType R)))) else @polyseq R (polyC c)) (@cons (GRing.Ring.sort R) c (@nil (GRing.Ring.sort R))) *)
by rewrite !polyseqC !eqxx nz_c.
Qed.
Lemma polyseqK p : Poly p = p.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (Poly (@polyseq R p)) p *)
by apply: poly_inj; apply: PolyK (valP p).
Qed.
Lemma size_Poly s : size (Poly s) <= size s.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (Poly s))) (@size (GRing.Ring.sort R) s)) *)
elim: s => [|c s IHs] /=; first by rewrite polyseqC eqxx.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (cons_poly c (Poly s)))) (S (@size (GRing.Ring.sort R) s))) *)
by rewrite polyseq_cons; case: ifP => // _; rewrite size_polyC; case: (~~ _).
Qed.
Lemma coef_Poly s i : (Poly s)`_i = s`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (Poly s)) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) s i) *)
by elim: s i => [|c s IHs] /= [|i]; rewrite !(coefC, eqxx, coef_cons) /=.
Qed.
Definition poly_expanded_def n E := Poly (mkseq E n).
Definition poly := locked_with poly_key poly_expanded_def.
Canonical poly_unlockable := [unlockable fun poly].
Local Notation "\poly_ ( i < n ) E" := (poly n (fun i : nat => E)).
Lemma polyseq_poly n E :
E n.-1 != 0 -> \poly_(i < n) E i = mkseq [eta E] n :> seq R.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (E (Nat.pred n)) (GRing.zero (GRing.Ring.zmodType R)))), @eq (list (GRing.Ring.sort R)) (@polyseq R (poly n (fun i : nat => E i))) (@mkseq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R))) (fun x : nat => E x) n) *)
rewrite unlock; case: n => [|n] nzEn; first by rewrite polyseqC eqxx.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (Poly (@mkseq (GRing.Ring.sort R) (fun i : nat => E i) (S n)))) (@mkseq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R))) (fun x : nat => E x) (S n)) *)
by rewrite (@PolyK 0) // -nth_last nth_mkseq size_mkseq.
Qed.
Lemma size_poly n E : size (\poly_(i < n) E i) <= n.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (poly n (fun i : nat => E i)))) n) *)
by rewrite unlock (leq_trans (size_Poly _)) ?size_mkseq.
Qed.
Lemma size_poly_eq n E : E n.-1 != 0 -> size (\poly_(i < n) E i) = n.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (E (Nat.pred n)) (GRing.zero (GRing.Ring.zmodType R)))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (poly n (fun i : nat => E i)))) n *)
by move/polyseq_poly->; apply: size_mkseq.
Qed.
Lemma coef_poly n E k : (\poly_(i < n) E i)`_k = (if k < n then E k else 0).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (poly n (fun i : nat => E i))) k) (if leq (S k) n then E k else GRing.zero (GRing.Ring.zmodType R)) *)
rewrite unlock coef_Poly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@mkseq (GRing.Ring.sort R) (fun i : nat => E i) n) k) (if leq (S k) n then E k else GRing.zero (GRing.Ring.zmodType R)) *)
have [lt_kn | le_nk] := ltnP k n; first by rewrite nth_mkseq.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@mkseq (GRing.Ring.sort R) (fun i : nat => E i) n) k) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite nth_default // size_mkseq.
Qed.
Lemma lead_coef_poly n E :
n > 0 -> E n.-1 != 0 -> lead_coef (\poly_(i < n) E i) = E n.-1.
Proof.
(* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (E (Nat.pred n)) (GRing.zero (GRing.Ring.zmodType R))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (poly n (fun i : nat => E i))) (E (Nat.pred n)) *)
by case: n => // n _ nzE; rewrite /lead_coef size_poly_eq // coef_poly leqnn.
Qed.
Lemma coefK p : \poly_(i < size p) p`_i = p.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (poly (@size (GRing.Ring.sort R) (@polyseq R p)) (fun i : nat => @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) p *)
by apply/polyP=> i; rewrite coef_poly; case: ltnP => // /(nth_default 0)->.
Qed.
Definition add_poly_def p q := \poly_(i < maxn (size p) (size q)) (p`_i + q`_i).
Definition add_poly := locked_with add_poly_key add_poly_def.
Canonical add_poly_unlockable := [unlockable fun add_poly].
Definition opp_poly_def p := \poly_(i < size p) - p`_i.
Definition opp_poly := locked_with opp_poly_key opp_poly_def.
Canonical opp_poly_unlockable := [unlockable fun opp_poly].
Fact coef_add_poly p q i : (add_poly p q)`_i = p`_i + q`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (add_poly p q)) i) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) i)) *)
rewrite unlock coef_poly; case: leqP => //.
(* Goal: forall _ : is_true (leq (maxn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q))) i), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) i)) *)
by rewrite geq_max => /andP[le_p_i le_q_i]; rewrite !nth_default ?add0r.
Qed.
Fact coef_opp_poly p i : (opp_poly p)`_i = - p`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (opp_poly p)) i) (@GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
rewrite unlock coef_poly /=.
(* Goal: @eq (GRing.Ring.sort R) (if leq (S i) (@size (GRing.Ring.sort R) (@polyseq R p)) then @GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) else GRing.zero (GRing.Ring.zmodType R)) (@GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
by case: leqP => // le_p_i; rewrite nth_default ?oppr0.
Qed.
Fact add_polyA : associative add_poly.
Proof.
(* Goal: @associative (@poly_of R (Phant (GRing.Ring.sort R))) add_poly *)
by move=> p q r; apply/polyP=> i; rewrite !coef_add_poly addrA.
Qed.
Fact add_polyC : commutative add_poly.
Proof.
(* Goal: @commutative (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) add_poly *)
by move=> p q; apply/polyP=> i; rewrite !coef_add_poly addrC.
Qed.
Fact add_poly0 : left_id 0%:P add_poly.
Proof.
(* Goal: @left_id (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (polyC (GRing.zero (GRing.Ring.zmodType R))) add_poly *)
by move=> p; apply/polyP=> i; rewrite coef_add_poly coefC if_same add0r.
Qed.
Fact add_polyN : left_inverse 0%:P opp_poly add_poly.
Proof.
(* Goal: @left_inverse (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (polyC (GRing.zero (GRing.Ring.zmodType R))) opp_poly add_poly *)
move=> p; apply/polyP=> i.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (add_poly (opp_poly p) p)) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC (GRing.zero (GRing.Ring.zmodType R)))) i) *)
by rewrite coef_add_poly coef_opp_poly coefC if_same addNr.
Qed.
Definition poly_zmodMixin :=
ZmodMixin add_polyA add_polyC add_poly0 add_polyN.
Lemma polyseq0 : (0 : {poly R}) = [::] :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (GRing.zero poly_zmodType : @poly_of R (Phant (GRing.Ring.sort R)))) (@nil (GRing.Ring.sort R)) *)
by rewrite polyseqC eqxx.
Qed.
Lemma size_poly0 : size (0 : {poly R}) = 0%N.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (GRing.zero poly_zmodType : @poly_of R (Phant (GRing.Ring.sort R))))) O *)
by rewrite polyseq0.
Qed.
Lemma coef0 i : (0 : {poly R})`_i = 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (GRing.zero poly_zmodType : @poly_of R (Phant (GRing.Ring.sort R)))) i) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite coefC if_same.
Qed.
Lemma size_poly_eq0 p : (size p == 0%N) = (p == 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (@size (GRing.Ring.sort R) (@polyseq R p)) O) (@eq_op poly_eqType p (GRing.zero poly_zmodType)) *)
by rewrite size_eq0 -polyseq0.
Qed.
Lemma size_poly_leq0 p : (size p <= 0) = (p == 0).
Proof.
(* Goal: @eq bool (leq (@size (GRing.Ring.sort R) (@polyseq R p)) O) (@eq_op poly_eqType p (GRing.zero poly_zmodType)) *)
by rewrite leqn0 size_poly_eq0.
Qed.
Lemma size_poly_leq0P p : reflect (p = 0) (size p <= 0%N).
Proof.
(* Goal: Bool.reflect (@eq (@poly_of R (Phant (GRing.Ring.sort R))) p (GRing.zero poly_zmodType)) (leq (@size (GRing.Ring.sort R) (@polyseq R p)) O) *)
by apply: (iffP idP); rewrite size_poly_leq0; move/eqP.
Qed.
Lemma size_poly_gt0 p : (0 < size p) = (p != 0).
Proof.
(* Goal: @eq bool (leq (S O) (@size (GRing.Ring.sort R) (@polyseq R p))) (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) *)
by rewrite lt0n size_poly_eq0.
Qed.
Lemma gt_size_poly_neq0 p n : (size p > n)%N -> p != 0.
Proof.
(* Goal: forall _ : is_true (leq (S n) (@size (GRing.Ring.sort R) (@polyseq R p))), is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) *)
by move=> /(leq_ltn_trans _) h; rewrite -size_poly_eq0 lt0n_neq0 ?h.
Qed.
Lemma nil_poly p : nilp p = (p == 0).
Proof.
(* Goal: @eq bool (@nilp (GRing.Ring.sort R) (@polyseq R p)) (@eq_op poly_eqType p (GRing.zero poly_zmodType)) *)
exact: size_poly_eq0.
Qed.
Lemma poly0Vpos p : {p = 0} + {size p > 0}.
Proof.
(* Goal: sumbool (@eq (@poly_of R (Phant (GRing.Ring.sort R))) p (GRing.zero poly_zmodType)) (is_true (leq (S O) (@size (GRing.Ring.sort R) (@polyseq R p)))) *)
by rewrite lt0n size_poly_eq0; apply: eqVneq.
Qed.
Lemma polySpred p : p != 0 -> size p = (size p).-1.+1.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R p)) (S (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p)))) *)
by rewrite -size_poly_eq0 -lt0n => /prednK.
Qed.
Lemma lead_coef_eq0 p : (lead_coef p == 0) = (p == 0).
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (lead_coef p) (GRing.zero (GRing.Ring.zmodType R))) (@eq_op poly_eqType p (GRing.zero poly_zmodType)) *)
rewrite -nil_poly /lead_coef nth_last.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (@last (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p)) (GRing.zero (GRing.Ring.zmodType R))) (@nilp (GRing.Ring.sort R) (@polyseq R p)) *)
by case: p => [[|x s] /= /negbTE // _]; rewrite eqxx.
Qed.
Lemma polyC_eq0 (c : R) : (c%:P == 0) = (c == 0).
Proof.
(* Goal: @eq bool (@eq_op poly_eqType (polyC c) (GRing.zero poly_zmodType)) (@eq_op (GRing.Ring.eqType R) c (GRing.zero (GRing.Ring.zmodType R))) *)
by rewrite -nil_poly polyseqC; case: (c == 0).
Qed.
Lemma size_poly1P p : reflect (exists2 c, c != 0 & p = c%:P) (size p == 1%N).
Proof.
(* Goal: Bool.reflect (@ex2 (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R))) (fun c : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) c (GRing.zero (GRing.Ring.zmodType R))))) (fun c : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (polyC c))) (@eq_op nat_eqType (@size (GRing.Ring.sort R) (@polyseq R p)) (S O)) *)
apply: (iffP eqP) => [pC | [c nz_c ->]]; last by rewrite size_polyC nz_c.
(* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R))) (fun c : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) c (GRing.zero (GRing.Ring.zmodType R))))) (fun c : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (polyC c)) *)
have def_p: p = (p`_0)%:P by rewrite -size1_polyC ?pC.
(* Goal: @ex2 (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R))) (fun c : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) => is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) c (GRing.zero (GRing.Ring.zmodType R))))) (fun c : Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (polyC c)) *)
by exists p`_0; rewrite // -polyC_eq0 -def_p -size_poly_eq0 pC.
Qed.
Lemma size_polyC_leq1 (c : R) : (size c%:P <= 1)%N.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (polyC c))) (S O)) *)
by rewrite size_polyC; case: (c == 0).
Qed.
Lemma leq_sizeP p i : reflect (forall j, i <= j -> p`_j = 0) (size p <= i).
Proof.
(* Goal: Bool.reflect (forall (j : nat) (_ : is_true (leq i j)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) j) (GRing.zero (GRing.Ring.zmodType R))) (leq (@size (GRing.Ring.sort R) (@polyseq R p)) i) *)
apply: (iffP idP) => [hp j hij| hp].
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) i) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) j) (GRing.zero (GRing.Ring.zmodType R)) *)
by apply: nth_default; apply: leq_trans hij.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) i) *)
case p0: (p == 0); first by rewrite (eqP p0) size_poly0.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) i) *)
move: (lead_coef_eq0 p); rewrite p0 leqNgt; move/negbT; apply: contra => hs.
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (lead_coef p) (GRing.zero (GRing.Ring.zmodType R))) *)
by apply/eqP; apply: hp; rewrite -ltnS (ltn_predK hs).
Qed.
Lemma coefD p q i : (p + q)`_i = p`_i + q`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add poly_zmodType p q)) i) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) i)) *)
exact: coef_add_poly.
Qed.
Lemma coefN p i : (- p)`_i = - p`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.opp poly_zmodType p)) i) (@GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
exact: coef_opp_poly.
Qed.
Lemma coefB p q i : (p - q)`_i = p`_i - q`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add poly_zmodType p (@GRing.opp poly_zmodType q))) i) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) i))) *)
by rewrite coefD coefN.
Qed.
Canonical coefp_additive i :=
Additive ((fun p => (coefB p)^~ i) : additive (coefp i)).
Lemma coefMn p n i : (p *+ n)`_i = p`_i *+ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.natmul poly_zmodType p n)) i) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) n) *)
exact: (raddfMn (coefp_additive i)).
Qed.
Lemma coefMNn p n i : (p *- n)`_i = p`_i *- n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType p n))) i) (@GRing.opp (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) n)) *)
by rewrite coefN coefMn.
Qed.
Lemma coef_sum I (r : seq I) (P : pred I) (F : I -> {poly R}) k :
(\sum_(i <- r | P i) F i)`_k = \sum_(i <- r | P i) (F i)`_k.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@BigOp.bigop (GRing.Zmodule.sort poly_zmodType) I (GRing.zero poly_zmodType) r (fun i : I => @BigBody (GRing.Zmodule.sort poly_zmodType) I i (@GRing.add poly_zmodType) (P i) (F i)))) k) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I (GRing.zero (GRing.Ring.zmodType R)) r (fun i : I => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I i (@GRing.add (GRing.Ring.zmodType R)) (P i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (F i)) k))) *)
exact: (raddf_sum (coefp_additive k)).
Qed.
Lemma polyC_add : {morph polyC : a b / a + b}.
Proof.
(* Goal: @morphism_2 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) polyC (fun a b : GRing.Ring.sort R => @GRing.add (GRing.Ring.zmodType R) a b) (fun a b : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType a b) *)
by move=> a b; apply/polyP=> [[|i]]; rewrite coefD !coefC ?addr0.
Qed.
Lemma polyC_opp : {morph polyC : c / - c}.
Proof.
(* Goal: @morphism_1 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) polyC (fun c : GRing.Ring.sort R => @GRing.opp (GRing.Ring.zmodType R) c) (fun c : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType c) *)
by move=> c; apply/polyP=> [[|i]]; rewrite coefN !coefC ?oppr0.
Qed.
Lemma polyC_sub : {morph polyC : a b / a - b}.
Proof.
(* Goal: @morphism_2 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) polyC (fun a b : GRing.Ring.sort R => @GRing.add (GRing.Ring.zmodType R) a (@GRing.opp (GRing.Ring.zmodType R) b)) (fun a b : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType a (@GRing.opp poly_zmodType b)) *)
by move=> a b; rewrite polyC_add polyC_opp.
Qed.
Canonical polyC_additive := Additive polyC_sub.
Lemma polyC_muln n : {morph polyC : c / c *+ n}.
Proof.
(* Goal: @morphism_1 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) polyC (fun c : GRing.Ring.sort R => @GRing.natmul (GRing.Ring.zmodType R) c n) (fun c : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.natmul poly_zmodType c n) *)
exact: raddfMn.
Qed.
Lemma size_opp p : size (- p) = size p.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.opp poly_zmodType p))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
by apply/eqP; rewrite eqn_leq -{3}(opprK p) -[-%R]/opp_poly unlock !size_poly.
Qed.
Lemma lead_coef_opp p : lead_coef (- p) = - lead_coef p.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.opp poly_zmodType p)) (@GRing.opp (GRing.Ring.zmodType R) (lead_coef p)) *)
by rewrite /lead_coef size_opp coefN.
Qed.
Lemma size_add p q : size (p + q) <= maxn (size p) (size q).
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add poly_zmodType p q))) (maxn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
by rewrite -[+%R]/add_poly unlock; apply: size_poly.
Qed.
Lemma size_addl p q : size p > size q -> size (p + q) = size p.
Proof.
(* Goal: forall _ : is_true (leq (S (@size (GRing.Ring.sort R) (@polyseq R q))) (@size (GRing.Ring.sort R) (@polyseq R p))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add poly_zmodType p q))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
move=> ltqp; rewrite -[+%R]/add_poly unlock size_poly_eq (maxn_idPl (ltnW _))//.
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))))) (GRing.zero (GRing.Ring.zmodType R)))) *)
by rewrite addrC nth_default ?simp ?nth_last //; case: p ltqp => [[]].
Qed.
Lemma size_sum I (r : seq I) (P : pred I) (F : I -> {poly R}) :
size (\sum_(i <- r | P i) F i) <= \max_(i <- r | P i) size (F i).
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (GRing.Zmodule.sort poly_zmodType) I (GRing.zero poly_zmodType) r (fun i : I => @BigBody (GRing.Zmodule.sort poly_zmodType) I i (@GRing.add poly_zmodType) (P i) (F i))))) (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i maxn (P i) (@size (GRing.Ring.sort R) (@polyseq R (F i)))))) *)
elim/big_rec2: _ => [|i p q _ IHp]; first by rewrite size_poly0.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add poly_zmodType (F i) q))) (maxn (@size (GRing.Ring.sort R) (@polyseq R (F i))) p)) *)
by rewrite -(maxn_idPr IHp) maxnA leq_max size_add.
Qed.
Lemma lead_coefDl p q : size p > size q -> lead_coef (p + q) = lead_coef p.
Proof.
(* Goal: forall _ : is_true (leq (S (@size (GRing.Ring.sort R) (@polyseq R q))) (@size (GRing.Ring.sort R) (@polyseq R p))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.add poly_zmodType p q)) (lead_coef p) *)
move=> ltqp; rewrite /lead_coef coefD size_addl //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p)))) *)
by rewrite addrC nth_default ?simp // -ltnS (ltn_predK ltqp).
Qed.
Lemma lead_coefDr p q : size q > size p -> lead_coef (p + q) = lead_coef q.
Proof.
(* Goal: forall _ : is_true (leq (S (@size (GRing.Ring.sort R) (@polyseq R p))) (@size (GRing.Ring.sort R) (@polyseq R q))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.add poly_zmodType p q)) (lead_coef q) *)
by move/lead_coefDl<-; rewrite addrC.
Qed.
Definition mul_poly_def p q :=
\poly_(i < (size p + size q).-1) (\sum_(j < i.+1) p`_j * q`_(i - j)).
Definition mul_poly := locked_with mul_poly_key mul_poly_def.
Canonical mul_poly_unlockable := [unlockable fun mul_poly].
Fact coef_mul_poly p q i :
(mul_poly p q)`_i = \sum_(j < i.+1) p`_j * q`_(i - j)%N.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) i) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) j)))))) *)
rewrite unlock coef_poly -subn1 ltn_subRL add1n; case: leqP => // le_pq_i1.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) j)))))) *)
rewrite big1 // => j _; have [lq_q_ij | gt_q_ij] := leqP (size q) (i - j).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) j)))) (GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) j)))) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite [q`__]nth_default ?mulr0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) j)))) (GRing.zero (GRing.Ring.zmodType R)) *)
rewrite nth_default ?mul0r // -(leq_add2r (size q)) (leq_trans le_pq_i1) //.
(* Goal: is_true (leq (S i) (addn (@nat_of_ord (S i) j) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
by rewrite -leq_subLR -subnSK.
Qed.
Fact coef_mul_poly_rev p q i :
(mul_poly p q)`_i = \sum_(j < i.+1) p`_(i - j)%N * q`_j.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) i) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord (S i) j))))) *)
rewrite coef_mul_poly (reindex_inj rev_ord_inj) /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn (S i) (S (@nat_of_ord (S i) j)))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (subn (S i) (S (@nat_of_ord (S i) j)))))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord (S i) j))))) *)
by apply: eq_bigr => j _; rewrite (sub_ordK j).
Qed.
Fact mul_polyA : associative mul_poly.
Proof.
(* Goal: @associative (@poly_of R (Phant (GRing.Ring.sort R))) mul_poly *)
move=> p q r; apply/polyP=> i; rewrite coef_mul_poly coef_mul_poly_rev.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly q r)) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) j))))) *)
pose coef3 j k := p`_j * (q`_(i - j - k)%N * r`_k).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly q r)) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) j))))) *)
transitivity (\sum_(j < i.+1) \sum_(k < i.+1 | k <= i - j) coef3 j k).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun k : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) k (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) j))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) j))))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly q r)) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun k : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) k (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) j))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))))) *)
apply: eq_bigr => /= j _; rewrite coef_mul_poly_rev big_distrr /=.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun k : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) k (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) j))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) j))))) *)
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S (subn i (@nat_of_ord (S i) j)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S (subn i (@nat_of_ord (S i) j))))) (fun i0 : ordinal (S (subn i (@nat_of_ord (S i) j))) => @BigBody (GRing.Ring.sort R) (ordinal (S (subn i (@nat_of_ord (S i) j)))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn (subn i (@nat_of_ord (S i) j)) (@nat_of_ord (S (subn i (@nat_of_ord (S i) j))) i0))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S (subn i (@nat_of_ord (S i) j))) i0)))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun k : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) k (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) j))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))) *)
by rewrite (big_ord_narrow_leq (leq_subr _ _)).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun k : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) k (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) j))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) j))))) *)
rewrite (exchange_big_dep predT) //=; apply: eq_bigr => k _.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun i0 : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) i0 (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) i0))) (coef3 (@nat_of_ord (S i) i0) (@nat_of_ord (S i) k)))) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) k))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) k))) *)
transitivity (\sum_(j < i.+1 | j <= i - k) coef3 j k).
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) j) (subn i (@nat_of_ord (S i) k))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) k))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) k))) *)
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun i0 : ordinal (S i) => @BigBody (GRing.Ring.sort R) (ordinal (S i)) i0 (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) k) (subn i (@nat_of_ord (S i) i0))) (coef3 (@nat_of_ord (S i) i0) (@nat_of_ord (S i) k)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) j) (subn i (@nat_of_ord (S i) k))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))) *)
apply: eq_bigl => j; rewrite -ltnS -(ltnS j) -!subSn ?leq_ord //.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) j) (subn i (@nat_of_ord (S i) k))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) k))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) k))) *)
(* Goal: @eq bool (leq (S (@nat_of_ord (S i) k)) (subn (S i) (@nat_of_ord (S i) j))) (leq (S (@nat_of_ord (S i) j)) (subn (S i) (@nat_of_ord (S i) k))) *)
by rewrite -subn_gt0 -(subn_gt0 j) -!subnDA addnC.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) (leq (@nat_of_ord (S i) j) (subn i (@nat_of_ord (S i) k))) (coef3 (@nat_of_ord (S i) j) (@nat_of_ord (S i) k)))) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (mul_poly p q)) (subn i (@nat_of_ord (S i) k))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) k))) *)
rewrite (big_ord_narrow_leq (leq_subr _ _)) coef_mul_poly big_distrl /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S (subn i (@nat_of_ord (S i) k)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S (subn i (@nat_of_ord (S i) k))))) (fun i0 : ordinal (S (subn i (@nat_of_ord (S i) k))) => @BigBody (GRing.Ring.sort R) (ordinal (S (subn i (@nat_of_ord (S i) k)))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (coef3 (@nat_of_ord (S (subn i (@nat_of_ord (S i) k))) i0) (@nat_of_ord (S i) k)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S (subn i (@nat_of_ord (S i) k)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S (subn i (@nat_of_ord (S i) k))))) (fun i0 : ordinal (S (subn i (@nat_of_ord (S i) k))) => @BigBody (GRing.Ring.sort R) (ordinal (S (subn i (@nat_of_ord (S i) k)))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S (subn i (@nat_of_ord (S i) k))) i0)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn (subn i (@nat_of_ord (S i) k)) (@nat_of_ord (S (subn i (@nat_of_ord (S i) k))) i0)))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (@nat_of_ord (S i) k))))) *)
by apply: eq_bigr => j _; rewrite /coef3 -!subnDA addnC mulrA.
Qed.
Fact mul_1poly : left_id 1%:P mul_poly.
Proof.
(* Goal: @left_id (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (polyC (GRing.one R)) mul_poly *)
move=> p; apply/polyP => i; rewrite coef_mul_poly big_ord_recl subn0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC (GRing.one R))) (@nat_of_ord (S i) (@ord0 i))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType i)) (fun i0 : ordinal i => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal i) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC (GRing.one R))) (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0)))))))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) *)
by rewrite big1 => [|j _]; rewrite coefC !simp.
Qed.
Fact mul_poly1 : right_id 1%:P mul_poly.
Proof.
(* Goal: @right_id (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (polyC (GRing.one R)) mul_poly *)
move=> p; apply/polyP => i; rewrite coef_mul_poly_rev big_ord_recl subn0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC (GRing.one R))) (@nat_of_ord (S i) (@ord0 i)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType i)) (fun i0 : ordinal i => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal i) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC (GRing.one R))) (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0))))))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) *)
by rewrite big1 => [|j _]; rewrite coefC !simp.
Qed.
Fact mul_polyDl : left_distributive mul_poly +%R.
Proof.
(* Goal: @left_distributive (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) mul_poly (@GRing.add poly_zmodType) *)
move=> p q r; apply/polyP=> i; rewrite coefD !coef_mul_poly -big_split.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add poly_zmodType p q)) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun i0 : Finite.sort (ordinal_finType (S i)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) i0 (@Monoid.operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@Monoid.com_operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_comoid (GRing.Ring.zmodType R)))) true (@Monoid.operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@Monoid.com_operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_comoid (GRing.Ring.zmodType R))) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) i0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (subn i (@nat_of_ord (S i) i0)))) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord (S i) i0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (subn i (@nat_of_ord (S i) i0))))))) *)
by apply: eq_bigr => j _; rewrite coefD mulrDl.
Qed.
Fact mul_polyDr : right_distributive mul_poly +%R.
Proof.
(* Goal: @right_distributive (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) mul_poly (@GRing.add poly_zmodType) *)
move=> p q r; apply/polyP=> i; rewrite coefD !coef_mul_poly -big_split.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add poly_zmodType q r)) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun i0 : Finite.sort (ordinal_finType (S i)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) i0 (@Monoid.operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@Monoid.com_operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_comoid (GRing.Ring.zmodType R)))) true (@Monoid.operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@Monoid.com_operator (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_comoid (GRing.Ring.zmodType R))) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) i0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) i0)))) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) i0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R r) (subn i (@nat_of_ord (S i) i0))))))) *)
by apply: eq_bigr => j _; rewrite coefD mulrDr.
Qed.
Fact poly1_neq0 : 1%:P != 0 :> {poly R}.
Proof.
(* Goal: is_true (negb (@eq_op poly_eqType (polyC (GRing.one R) : @poly_of R (Phant (GRing.Ring.sort R))) (GRing.zero poly_zmodType : @poly_of R (Phant (GRing.Ring.sort R))))) *)
by rewrite polyC_eq0 oner_neq0.
Qed.
Definition poly_ringMixin :=
RingMixin mul_polyA mul_1poly mul_poly1 mul_polyDl mul_polyDr poly1_neq0.
Lemma polyseq1 : (1 : {poly R}) = [:: 1] :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (GRing.one poly_ringType : @poly_of R (Phant (GRing.Ring.sort R)))) (@cons (GRing.Ring.sort R) (GRing.one R) (@nil (GRing.Ring.sort R))) *)
by rewrite polyseqC oner_neq0.
Qed.
Lemma size_poly1 : size (1 : {poly R}) = 1%N.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (GRing.one poly_ringType : @poly_of R (Phant (GRing.Ring.sort R))))) (S O) *)
by rewrite polyseq1.
Qed.
Lemma coef1 i : (1 : {poly R})`_i = (i == 0%N)%:R.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (GRing.one poly_ringType : @poly_of R (Phant (GRing.Ring.sort R)))) i) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i O))) *)
by case: i => [|i]; rewrite polyseq1 /= ?nth_nil.
Qed.
Lemma coefM p q i : (p * q)`_i = \sum_(j < i.+1) p`_j * q`_(i - j)%N.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) i) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn i (@nat_of_ord (S i) j)))))) *)
exact: coef_mul_poly.
Qed.
Lemma coefMr p q i : (p * q)`_i = \sum_(j < i.+1) p`_(i - j)%N * q`_j.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) i) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord (S i) j))))) *)
exact: coef_mul_poly_rev.
Qed.
Lemma size_mul_leq p q : size (p * q) <= (size p + size q).-1.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p q))) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q))))) *)
by rewrite -[*%R]/mul_poly unlock size_poly.
Qed.
Lemma mul_lead_coef p q :
lead_coef p * lead_coef q = (p * q)`_(size p + size q).-2.
Proof.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
pose dp := (size p).-1; pose dq := (size q).-1.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite lead_coef0 !mul0r coef0.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
have [-> | nz_q] := eqVneq q 0; first by rewrite lead_coef0 !mulr0 coef0.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
have ->: (size p + size q).-2 = (dp + dq)%N.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (addn dp dq)) *)
(* Goal: @eq nat (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q))))) (addn dp dq) *)
by do 2!rewrite polySpred // addSn addnC.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (addn dp dq)) *)
have lt_p_pq: dp < (dp + dq).+1 by rewrite ltnS leq_addr.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (lead_coef p) (lead_coef q)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (addn dp dq)) *)
rewrite coefM (bigD1 (Ordinal lt_p_pq)) ?big1 ?simp ?addKn //= => i.
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (S (addn dp dq)))) i (@Ordinal (S (addn dp dq)) dp lt_p_pq))), @eq (GRing.Ring.sort R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S (addn dp dq)) i)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn (addn dp dq) (@nat_of_ord (S (addn dp dq)) i)))) (GRing.zero (GRing.Ring.zmodType R)) *)
rewrite -val_eqE neq_ltn /= => /orP[lt_i_p | gt_i_p]; last first.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S (addn dp dq)) i)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn (addn dp dq) (@nat_of_ord (S (addn dp dq)) i)))) (GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S (addn dp dq)) i)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn (addn dp dq) (@nat_of_ord (S (addn dp dq)) i)))) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite nth_default ?mul0r //; rewrite -polySpred in gt_i_p.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (S (addn dp dq)) i)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (subn (addn dp dq) (@nat_of_ord (S (addn dp dq)) i)))) (GRing.zero (GRing.Ring.zmodType R)) *)
rewrite [q`__]nth_default ?mulr0 //= -subSS -{1}addnS -polySpred //.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R q)) (subn (addn dp (@size (GRing.Ring.sort R) (@polyseq R q))) (S (@nat_of_ord (S (addn dp dq)) i)))) *)
by rewrite addnC -addnBA ?leq_addr.
Qed.
Lemma size_proper_mul p q :
lead_coef p * lead_coef q != 0 -> size (p * q) = (size p + size q).-1.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType R) (@GRing.mul R (lead_coef p) (lead_coef q)) (GRing.zero (GRing.Ring.zmodType R)))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p q))) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
apply: contraNeq; rewrite mul_lead_coef eqn_leq size_mul_leq -ltnNge => lt_pq.
(* Goal: is_true (@eq_op (GRing.Ring.eqType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p q)) (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))))) (GRing.zero (GRing.Ring.zmodType R))) *)
by rewrite nth_default // -subn1 -(leq_add2l 1) -leq_subLR leq_sub2r.
Qed.
Lemma lead_coef_proper_mul p q :
let c := lead_coef p * lead_coef q in c != 0 -> lead_coef (p * q) = c.
Proof.
(* Goal: let c := @GRing.mul R (lead_coef p) (lead_coef q) in forall _ : is_true (negb (@eq_op (GRing.Ring.eqType R) c (GRing.zero (GRing.Ring.zmodType R)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p q)) c *)
by move=> /= nz_c; rewrite mul_lead_coef -size_proper_mul.
Qed.
Lemma size_prod_leq (I : finType) (P : pred I) (F : I -> {poly R}) :
size (\prod_(i | P i) F i) <= (\sum_(i | P i) size (F i)).+1 - #|P|.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (GRing.Ring.sort poly_ringType) (Finite.sort I) (GRing.one poly_ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort poly_ringType) (Finite.sort I) i (@GRing.mul poly_ringType) (P i) (F i))))) (subn (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@size (GRing.Ring.sort R) (@polyseq R (F i)))))) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)))) *)
rewrite -sum1_card.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (GRing.Ring.sort poly_ringType) (Finite.sort I) (GRing.one poly_ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort poly_ringType) (Finite.sort I) i (@GRing.mul poly_ringType) (P i) (F i))))) (subn (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@size (GRing.Ring.sort R) (@polyseq R (F i)))))) (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)) (S O))))) *)
elim/big_rec3: _ => [|i n m p _ IHp]; first by rewrite size_poly1.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType (F i) p))) (subn (S (addn (@size (GRing.Ring.sort R) (@polyseq R (F i))) m)) (addn (S O) n))) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite mulr0 size_poly0.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType (F i) p))) (subn (S (addn (@size (GRing.Ring.sort R) (@polyseq R (F i))) m)) (addn (S O) n))) *)
rewrite (leq_trans (size_mul_leq _ _)) // subnS -!subn1 leq_sub2r //.
(* Goal: is_true (leq (addn (@size (GRing.Ring.sort R) (@polyseq R (F i))) (@size (GRing.Ring.sort R) (@polyseq R p))) (subn (S (addn (@size (GRing.Ring.sort R) (@polyseq R (F i))) m)) n)) *)
rewrite -addnS -addnBA ?leq_add2l // ltnW // -subn_gt0 (leq_trans _ IHp) //.
(* Goal: is_true (leq (S O) (@size (GRing.Ring.sort R) (@polyseq R p))) *)
by rewrite polySpred.
Qed.
Lemma coefCM c p i : (c%:P * p)`_i = c * p`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType (polyC c) p)) i) (@GRing.mul R c (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
rewrite coefM big_ord_recl subn0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC c)) (@nat_of_ord (S i) (@ord0 i))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType i)) (fun i0 : ordinal i => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal i) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC c)) (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0)))))))) (@GRing.mul R c (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
by rewrite big1 => [|j _]; rewrite coefC !simp.
Qed.
Lemma coefMC c p i : (p * c%:P)`_i = p`_i * c.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p (polyC c))) i) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) c) *)
rewrite coefMr big_ord_recl subn0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC c)) (@nat_of_ord (S i) (@ord0 i)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType i)) (fun i0 : ordinal i => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal i) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC c)) (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0))))))) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) c) *)
by rewrite big1 => [|j _]; rewrite coefC !simp.
Qed.
Lemma polyC_mul : {morph polyC : a b / a * b}.
Proof.
(* Goal: @morphism_2 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) polyC (fun a b : GRing.Ring.sort R => @GRing.mul R a b) (fun a b : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.mul poly_ringType a b) *)
by move=> a b; apply/polyP=> [[|i]]; rewrite coefCM !coefC ?simp.
Qed.
Fact polyC_multiplicative : multiplicative polyC.
Proof.
(* Goal: @GRing.RMorphism.mixin_of R poly_ringType polyC *)
by split; first apply: polyC_mul.
Qed.
Canonical polyC_rmorphism := AddRMorphism polyC_multiplicative.
Lemma polyC_exp n : {morph polyC : c / c ^+ n}.
Proof.
(* Goal: @morphism_1 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) polyC (fun c : GRing.Ring.sort R => @GRing.exp R c n) (fun c : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.exp poly_ringType c n) *)
exact: rmorphX.
Qed.
Lemma size_exp_leq p n : size (p ^+ n) <= ((size p).-1 * n).+1.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.exp poly_ringType p n))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) n))) *)
elim: n => [|n IHn]; first by rewrite size_poly1.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.exp poly_ringType p (S n)))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) (S n)))) *)
have [-> | nzp] := poly0Vpos p; first by rewrite exprS mul0r size_poly0.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.exp poly_ringType p (S n)))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) (S n)))) *)
rewrite exprS (leq_trans (size_mul_leq _ _)) //.
(* Goal: is_true (leq (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R (@GRing.exp poly_ringType p n))))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) (S n)))) *)
by rewrite -{1}(prednK nzp) mulnS -addnS leq_add2l.
Qed.
Lemma size_Msign p n : size ((-1) ^+ n * p) = size p.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType (@GRing.exp poly_ringType (@GRing.opp (GRing.Ring.zmodType poly_ringType) (GRing.one poly_ringType)) n) p))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
by rewrite -signr_odd; case: (odd n); rewrite ?mul1r // mulN1r size_opp.
Qed.
Fact coefp0_multiplicative : multiplicative (coefp 0 : {poly R} -> R).
Proof.
(* Goal: @GRing.RMorphism.mixin_of poly_ringType R (@coefp_head R tt O : forall _ : @poly_of R (Phant (GRing.Ring.sort R)), GRing.Ring.sort R) *)
split=> [p q|]; last by rewrite polyCK.
(* Goal: @eq (GRing.Ring.sort R) (@coefp_head R tt O (@GRing.mul poly_ringType p q)) (@GRing.mul R (@coefp_head R tt O p) (@coefp_head R tt O q)) *)
by rewrite [coefp 0 _]coefM big_ord_recl big_ord0 addr0.
Qed.
Canonical coefp0_rmorphism := AddRMorphism coefp0_multiplicative.
Definition scale_poly_def a (p : {poly R}) := \poly_(i < size p) (a * p`_i).
Definition scale_poly := locked_with scale_poly_key scale_poly_def.
Canonical scale_poly_unlockable := [unlockable fun scale_poly].
Fact scale_polyE a p : scale_poly a p = a%:P * p.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (scale_poly a p) (@GRing.mul poly_ringType (polyC a) p) *)
apply/polyP=> n; rewrite unlock coef_poly coefCM.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (if leq (S n) (@size (GRing.Ring.sort R) (@polyseq R p)) then @GRing.mul R a (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) n) else GRing.zero (GRing.Ring.zmodType R)) (@GRing.mul R a (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) n)) *)
by case: leqP => // le_p_n; rewrite nth_default ?mulr0.
Qed.
Fact scale_polyA a b p : scale_poly a (scale_poly b p) = scale_poly (a * b) p.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (scale_poly a (scale_poly b p)) (scale_poly (@GRing.mul R a b) p) *)
by rewrite !scale_polyE mulrA polyC_mul.
Qed.
Fact scale_1poly : left_id 1 scale_poly.
Proof.
(* Goal: @left_id (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.one R) scale_poly *)
by move=> p; rewrite scale_polyE mul1r.
Qed.
Fact scale_polyDr a : {morph scale_poly a : p q / p + q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (scale_poly a) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) *)
by move=> p q; rewrite !scale_polyE mulrDr.
Qed.
Fact scale_polyDl p : {morph scale_poly^~ p : a b / a + b}.
Proof.
(* Goal: @morphism_2 (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (fun x : GRing.Ring.sort R => scale_poly x p) (fun a b : GRing.Ring.sort R => @GRing.add (GRing.Ring.zmodType R) a b) (fun a b : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType a b) *)
by move=> a b /=; rewrite !scale_polyE raddfD mulrDl.
Qed.
Fact scale_polyAl a p q : scale_poly a (p * q) = scale_poly a p * q.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (scale_poly a (@GRing.mul poly_ringType p q)) (@GRing.mul poly_ringType (scale_poly a p) q) *)
by rewrite !scale_polyE mulrA.
Qed.
Definition poly_lmodMixin :=
LmodMixin scale_polyA scale_1poly scale_polyDr scale_polyDl.
Canonical poly_lmodType :=
Eval hnf in LmodType R {poly R} poly_lmodMixin.
Canonical polynomial_lmodType :=
Eval hnf in LmodType R (polynomial R) poly_lmodMixin.
Canonical poly_lalgType :=
Eval hnf in LalgType R {poly R} scale_polyAl.
Canonical polynomial_lalgType :=
Eval hnf in LalgType R (polynomial R) scale_polyAl.
Lemma mul_polyC a p : a%:P * p = a *: p.
Proof.
(* Goal: @eq (GRing.Ring.sort poly_ringType) (@GRing.mul poly_ringType (polyC a) p) (@GRing.scale R poly_lmodType a p) *)
by rewrite -scale_polyE.
Qed.
Lemma alg_polyC a : a%:A = a%:P :> {poly R}.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType) a (GRing.one (@GRing.Lalgebra.ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))) (polyC a) *)
by rewrite -mul_polyC mulr1.
Qed.
Lemma coefZ a p i : (a *: p)`_i = a * p`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.scale R poly_lmodType a p)) i) (@GRing.mul R a (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
rewrite -[*:%R]/scale_poly unlock coef_poly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (if leq (S i) (@size (GRing.Ring.sort R) (@polyseq R p)) then @GRing.mul R a (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) else GRing.zero (GRing.Ring.zmodType R)) (@GRing.mul R a (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) *)
by case: leqP => // le_p_n; rewrite nth_default ?mulr0.
Qed.
Lemma size_scale_leq a p : size (a *: p) <= size p.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.scale R poly_lmodType a p))) (@size (GRing.Ring.sort R) (@polyseq R p))) *)
by rewrite -[*:%R]/scale_poly unlock size_poly.
Qed.
Canonical coefp_linear i : {scalar {poly R}} :=
AddLinear ((fun a => (coefZ a) ^~ i) : scalable_for *%R (coefp i)).
Canonical coefp0_lrmorphism := [lrmorphism of coefp 0].
Definition polyX_def := Poly [:: 0; 1].
Definition polyX : {poly R} := locked_with polyX_key polyX_def.
Canonical polyX_unlockable := [unlockable of polyX].
Local Notation "'X" := polyX.
Lemma polyseqX : 'X = [:: 0; 1] :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R polyX) (@cons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@cons (GRing.Ring.sort R) (GRing.one R) (@nil (GRing.Ring.sort R)))) *)
by rewrite unlock !polyseq_cons nil_poly eqxx /= polyseq1.
Qed.
Lemma polyX_eq0 : ('X == 0) = false.
Proof.
(* Goal: @eq bool (@eq_op poly_eqType polyX (GRing.zero poly_zmodType)) false *)
by rewrite -size_poly_eq0 size_polyX.
Qed.
Lemma coefX i : 'X`_i = (i == 1%N)%:R.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R polyX) i) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (S O)))) *)
by case: i => [|[|i]]; rewrite polyseqX //= nth_nil.
Qed.
Lemma lead_coefX : lead_coef 'X = 1.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef polyX) (GRing.one R) *)
by rewrite /lead_coef polyseqX.
Qed.
Lemma commr_polyX p : GRing.comm p 'X.
Proof.
(* Goal: @GRing.comm poly_ringType p polyX *)
apply/polyP=> i; rewrite coefMr coefM.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R polyX) (@nat_of_ord (S i) j))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R polyX) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) j)))))) *)
by apply: eq_bigr => j _; rewrite coefX commr_nat.
Qed.
Lemma coefMX p i : (p * 'X)`_i = (if (i == 0)%N then 0 else p`_i.-1).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p polyX)) i) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred i)) *)
rewrite coefMr big_ord_recl coefX ?simp.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType i)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType i)) (fun i0 : ordinal i => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal i) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0)))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R polyX) (@nat_of_ord (S i) (@lift (S i) (@ord0 i) i0)))))) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred i)) *)
case: i => [|i]; rewrite ?big_ord0 //= big_ord_recl polyseqX subn1 /=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (GRing.one R)) (@BigOp.bigop (GRing.Ring.sort R) (ordinal i) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType i)) (fun i0 : ordinal i => @BigBody (GRing.Ring.sort R) (ordinal i) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn (S i) (bump O (bump O (@nat_of_ord i i0))))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@nil (GRing.Ring.sort R)) (@nat_of_ord i i0)))))) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) *)
by rewrite big1 ?simp // => j _; rewrite nth_nil !simp.
Qed.
Lemma coefXM p i : ('X * p)`_i = (if (i == 0)%N then 0 else p`_i.-1).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType polyX p)) i) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred i)) *)
by rewrite -commr_polyX coefMX.
Qed.
Lemma cons_poly_def p a : cons_poly a p = p * 'X + a%:P.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (cons_poly a p) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC a)) *)
apply/polyP=> i; rewrite coef_cons coefD coefMX coefC.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (if @eq_op nat_eqType i O then a else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred i)) (@GRing.add (GRing.Ring.zmodType R) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred i)) (if @eq_op nat_eqType i O then a else GRing.zero (GRing.Ring.zmodType R))) *)
by case: ifP; rewrite !simp.
Qed.
Lemma poly_ind (K : {poly R} -> Type) :
K 0 -> (forall p c, K p -> K (p * 'X + c%:P)) -> (forall p, K p).
Proof.
(* Goal: forall (_ : K (GRing.zero poly_zmodType)) (_ : forall (p : @poly_of R (Phant (GRing.Ring.sort R))) (c : GRing.Ring.sort R) (_ : K p), K (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c))) (p : @poly_of R (Phant (GRing.Ring.sort R))), K p *)
move=> K0 Kcons p; rewrite -[p]polyseqK.
(* Goal: K (Poly (@polyseq R p)) *)
by elim: {p}(p : seq R) => //= p c IHp; rewrite cons_poly_def; apply: Kcons.
Qed.
Lemma polyseqXsubC a : 'X - a%:P = [:: - a; 1] :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (@cons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.opp (GRing.Ring.zmodType R) a) (@cons (GRing.Ring.sort R) (GRing.one R) (@nil (GRing.Ring.sort R)))) *)
by rewrite -['X]mul1r -polyC_opp -cons_poly_def polyseq_cons polyseq1.
Qed.
Lemma size_XsubC a : size ('X - a%:P) = 2%N.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))))) (S (S O)) *)
by rewrite polyseqXsubC.
Qed.
Lemma size_XaddC b : size ('X + b%:P) = 2.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add poly_zmodType polyX (polyC b)))) (S (S O)) *)
by rewrite -[b]opprK rmorphN size_XsubC.
Qed.
Lemma lead_coefXsubC a : lead_coef ('X - a%:P) = 1.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.one R) *)
by rewrite lead_coefE polyseqXsubC.
Qed.
Lemma polyXsubC_eq0 a : ('X - a%:P == 0) = false.
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType poly_zmodType) (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) (GRing.zero poly_zmodType)) false *)
by rewrite -nil_poly polyseqXsubC.
Qed.
Lemma size_MXaddC p c :
size (p * 'X + c%:P) = (if (p == 0) && (c == 0) then 0%N else (size p).+1).
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c)))) (if andb (@eq_op poly_eqType p (GRing.zero poly_zmodType)) (@eq_op (GRing.Ring.eqType R) c (GRing.zero (GRing.Ring.zmodType R))) then O else S (@size (GRing.Ring.sort R) (@polyseq R p))) *)
by rewrite -cons_poly_def size_cons_poly nil_poly.
Qed.
Lemma polyseqMX p : p != 0 -> p * 'X = 0 :: p :> seq R.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))), @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.mul poly_ringType p polyX)) (@cons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p)) *)
by move=> nz_p; rewrite -[p * _]addr0 -cons_poly_def polyseq_cons nil_poly nz_p.
Qed.
Lemma size_mulX p : p != 0 -> size (p * 'X) = (size p).+1.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p polyX))) (S (@size (GRing.Ring.sort R) (@polyseq R p))) *)
by move/polyseqMX->.
Qed.
Lemma lead_coefMX p : lead_coef (p * 'X) = lead_coef p.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p polyX)) (lead_coef p) *)
have [-> | nzp] := eqVneq p 0; first by rewrite mul0r.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p polyX)) (lead_coef p) *)
by rewrite /lead_coef !nth_last polyseqMX.
Qed.
Lemma size_XmulC a : a != 0 -> size ('X * a%:P) = 2.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType R) a (GRing.zero (GRing.Ring.zmodType R)))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType polyX (polyC a)))) (S (S O)) *)
by move=> nz_a; rewrite -commr_polyX size_mulX ?polyC_eq0 ?size_polyC nz_a.
Qed.
Local Notation "''X^' n" := ('X ^+ n).
Lemma coefXn n i : 'X^n`_i = (i == n)%:R.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.exp poly_ringType polyX n)) i) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i n))) *)
by elim: n i => [|n IHn] [|i]; rewrite ?coef1 // exprS coefXM ?IHn.
Qed.
Lemma polyseqXn n : 'X^n = rcons (nseq n 0) 1 :> seq R.
Proof.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.exp poly_ringType polyX n)) (@rcons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nseq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n (GRing.zero (GRing.Ring.zmodType R))) (GRing.one R)) *)
elim: n => [|n IHn]; rewrite ?polyseq1 // exprSr.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.mul poly_ringType (@GRing.exp poly_ringType polyX n) polyX)) (@rcons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nseq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n) (GRing.zero (GRing.Ring.zmodType R))) (GRing.one R)) *)
by rewrite polyseqMX -?size_poly_eq0 IHn ?size_rcons.
Qed.
Lemma size_polyXn n : size 'X^n = n.+1.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.exp poly_ringType polyX n))) (S n) *)
by rewrite polyseqXn size_rcons size_nseq.
Qed.
Lemma commr_polyXn p n : GRing.comm p 'X^n.
Proof.
(* Goal: @GRing.comm poly_ringType p (@GRing.exp poly_ringType polyX n) *)
by apply: commrX; apply: commr_polyX.
Qed.
Lemma lead_coefXn n : lead_coef 'X^n = 1.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.exp poly_ringType polyX n)) (GRing.one R) *)
by rewrite /lead_coef nth_last polyseqXn last_rcons.
Qed.
Lemma polyseqMXn n p : p != 0 -> p * 'X^n = ncons n 0 p :> seq R.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))), @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.mul poly_ringType p (@GRing.exp poly_ringType polyX n))) (@ncons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) n (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p)) *)
case: n => [|n] nz_p; first by rewrite mulr1.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.mul poly_ringType p (@GRing.exp poly_ringType polyX (S n)))) (@ncons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p)) *)
elim: n => [|n IHn]; first exact: polyseqMX.
(* Goal: @eq (list (GRing.Ring.sort R)) (@polyseq R (@GRing.mul poly_ringType p (@GRing.exp poly_ringType polyX (S (S n))))) (@ncons (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S (S n)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p)) *)
by rewrite exprSr mulrA polyseqMX -?nil_poly IHn.
Qed.
Lemma coefMXn n p i : (p * 'X^n)`_i = if i < n then 0 else p`_(i - n).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType p (@GRing.exp poly_ringType polyX n))) i) (if leq (S i) n then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i n)) *)
have [-> | /polyseqMXn->] := eqVneq p 0; last exact: nth_ncons.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType (GRing.zero poly_zmodType) (@GRing.exp poly_ringType polyX n))) i) (if leq (S i) n then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (GRing.zero poly_zmodType)) (subn i n)) *)
by rewrite mul0r !coef0 if_same.
Qed.
Lemma coefXnM n p i : ('X^n * p)`_i = if i < n then 0 else p`_(i - n).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul poly_ringType (@GRing.exp poly_ringType polyX n) p)) i) (if leq (S i) n then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (subn i n)) *)
by rewrite -commr_polyXn coefMXn.
Qed.
Lemma poly_def n E : \poly_(i < n) E i = \sum_(i < n) E i *: 'X^i.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (poly n (fun i : nat => E i)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) (Finite.sort (ordinal_finType n)) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) (ordinal n) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) true (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType) (E (@nat_of_ord n i)) (@GRing.exp poly_ringType polyX (@nat_of_ord n i))))) *)
rewrite unlock; elim: n => [|n IHn] in E *; first by rewrite big_ord0.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (Poly (@mkseq (GRing.Ring.sort R) (fun i : nat => E i) (S n))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) (Finite.sort (ordinal_finType (S n))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) (index_enum (ordinal_finType (S n))) (fun i : ordinal (S n) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) (ordinal (S n)) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType))))) true (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType) (E (@nat_of_ord (S n) i)) (@GRing.exp poly_ringType polyX (@nat_of_ord (S n) i))))) *)
rewrite big_ord_recl /= cons_poly_def addrC expr0 alg_polyC.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.add (GRing.Ring.zmodType poly_ringType) (polyC (E O)) (@GRing.mul poly_ringType (Poly (@map nat (GRing.Ring.sort R) (fun i : nat => E i) (iota (S O) n))) polyX)) (@GRing.add (@GRing.Zmodule.Pack (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.Zmodule.Class (@poly_of R (Phant (GRing.Ring.sort R))) (@Choice.Class (polynomial R) (polynomial_eqMixin R) (polynomial_choiceMixin R)) poly_zmodMixin)) (polyC (E O)) (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) (ordinal n) (GRing.zero (@GRing.Zmodule.Pack (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.Zmodule.Class (@poly_of R (Phant (GRing.Ring.sort R))) (@Choice.Class (polynomial R) (polynomial_eqMixin R) (polynomial_choiceMixin R)) poly_zmodMixin))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) (ordinal n) i (@GRing.add (@GRing.Zmodule.Pack (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.Zmodule.Class (@poly_of R (Phant (GRing.Ring.sort R))) (@Choice.Class (polynomial R) (polynomial_eqMixin R) (polynomial_choiceMixin R)) poly_zmodMixin))) true (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType) (E (bump O (@nat_of_ord n i))) (@GRing.exp poly_ringType polyX (bump O (@nat_of_ord n i))))))) *)
congr (_ + _); rewrite (iota_addl 1 0) -map_comp IHn big_distrl /=.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) (ordinal n) (GRing.zero (GRing.Ring.zmodType poly_ringType)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) (ordinal n) i (@GRing.add (GRing.Ring.zmodType poly_ringType)) true (@GRing.mul poly_ringType (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType) (E (addn (S O) (@nat_of_ord n i))) (@GRing.exp poly_ringType polyX (@nat_of_ord n i))) polyX))) (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) (ordinal n) (GRing.zero (@GRing.Zmodule.Pack (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.Zmodule.Class (@poly_of R (Phant (GRing.Ring.sort R))) (@Choice.Class (polynomial R) (polynomial_eqMixin R) (polynomial_choiceMixin R)) poly_zmodMixin))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) (ordinal n) i (@GRing.add (@GRing.Zmodule.Pack (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.Zmodule.Class (@poly_of R (Phant (GRing.Ring.sort R))) (@Choice.Class (polynomial R) (polynomial_eqMixin R) (polynomial_choiceMixin R)) poly_zmodMixin))) true (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) poly_lalgType) (E (bump O (@nat_of_ord n i))) (@GRing.exp poly_ringType polyX (bump O (@nat_of_ord n i)))))) *)
by apply: eq_bigr => i _; rewrite -scalerAl exprSr.
Qed.
Definition monic := [qualify p | lead_coef p == 1].
Fact monic_key : pred_key monic. Proof. by []. Qed.
Proof.
(* Goal: @pred_key (@poly_of R (Phant (GRing.Ring.sort R))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic) *)
by [].
Qed.
Lemma monicP p : reflect (lead_coef p = 1) (p \is monic).
Proof.
(* Goal: Bool.reflect (@eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef p) (GRing.one R)) (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
exact: eqP.
Qed.
Lemma monicX : 'X \is monic. Proof. exact/eqP/lead_coefX. Qed.
Proof.
(* Goal: is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) polyX (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
exact/eqP/lead_coefX.
Qed.
Lemma monic_neq0 p : p \is monic -> p != 0.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) *)
by rewrite -lead_coef_eq0 => /eqP->; apply: oner_neq0.
Qed.
Lemma lead_coef_monicM p q : p \is monic -> lead_coef (p * q) = lead_coef q.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p q)) (lead_coef q) *)
have [-> | nz_q] := eqVneq q 0; first by rewrite mulr0.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p q)) (lead_coef q) *)
by move/monicP=> mon_p; rewrite lead_coef_proper_mul mon_p mul1r ?lead_coef_eq0.
Qed.
Lemma lead_coef_Mmonic p q : q \is monic -> lead_coef (p * q) = lead_coef p.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) q (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p q)) (lead_coef p) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite mul0r.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) q (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.mul poly_ringType p q)) (lead_coef p) *)
by move/monicP=> mon_q; rewrite lead_coef_proper_mul mon_q mulr1 ?lead_coef_eq0.
Qed.
Lemma size_monicM p q :
p \is monic -> q != 0 -> size (p * q) = (size p + size q).-1.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic)))) (_ : is_true (negb (@eq_op poly_eqType q (GRing.zero poly_zmodType)))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p q))) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
move/monicP=> mon_p nz_q.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p q))) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
by rewrite size_proper_mul // mon_p mul1r lead_coef_eq0.
Qed.
Lemma size_Mmonic p q :
p != 0 -> q \is monic -> size (p * q) = (size p + size q).-1.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType)))) (_ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) q (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic)))), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p q))) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
move=> nz_p /monicP mon_q.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p q))) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R p)) (@size (GRing.Ring.sort R) (@polyseq R q)))) *)
by rewrite size_proper_mul // mon_q mulr1 lead_coef_eq0.
Qed.
Lemma monicMl p q : p \is monic -> (p * q \is monic) = (q \is monic).
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), @eq bool (@in_mem (GRing.Ring.sort poly_ringType) (@GRing.mul poly_ringType p q) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) q (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
by move=> mon_p; rewrite !monicE lead_coef_monicM.
Qed.
Lemma monicMr p q : q \is monic -> (p * q \is monic) = (p \is monic).
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) q (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), @eq bool (@in_mem (GRing.Ring.sort poly_ringType) (@GRing.mul poly_ringType p q) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
by move=> mon_q; rewrite !monicE lead_coef_Mmonic.
Qed.
Fact monic_mulr_closed : mulr_closed monic.
Proof.
(* Goal: @GRing.mulr_closed poly_ringType (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic) *)
by split=> [|p q mon_p]; rewrite (monic1, monicMl).
Qed.
Canonical monic_mulrPred := MulrPred monic_mulr_closed.
Lemma monic_exp p n : p \is monic -> p ^+ n \is monic.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), is_true (@in_mem (GRing.Ring.sort poly_ringType) (@GRing.exp poly_ringType p n) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
exact: rpredX.
Qed.
Lemma monic_prod I rI (P : pred I) (F : I -> {poly R}):
(forall i, P i -> F i \is monic) -> \prod_(i <- rI | P i) F i \is monic.
Proof.
(* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (F i) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), is_true (@in_mem (GRing.Ring.sort poly_ringType) (@BigOp.bigop (GRing.Ring.sort poly_ringType) I (GRing.one poly_ringType) rI (fun i : I => @BigBody (GRing.Ring.sort poly_ringType) I i (@GRing.mul poly_ringType) (P i) (F i))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
exact: rpred_prod.
Qed.
Lemma monicXsubC c : 'X - c%:P \is monic.
Proof.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort poly_zmodType) (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC c))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
exact/eqP/lead_coefXsubC.
Qed.
Lemma monic_prod_XsubC I rI (P : pred I) (F : I -> R) :
\prod_(i <- rI | P i) ('X - (F i)%:P) \is monic.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort poly_ringType) (@BigOp.bigop (GRing.Ring.sort poly_ringType) I (GRing.one poly_ringType) rI (fun i : I => @BigBody (GRing.Ring.sort poly_ringType) I i (@GRing.mul poly_ringType) (P i) (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F i)))))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
by apply: monic_prod => i _; apply: monicXsubC.
Qed.
Lemma size_prod_XsubC I rI (F : I -> R) :
size (\prod_(i <- rI) ('X - (F i)%:P)) = (size rI).+1.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (GRing.Ring.sort poly_ringType) I (GRing.one poly_ringType) rI (fun i : I => @BigBody (GRing.Ring.sort poly_ringType) I i (@GRing.mul poly_ringType) true (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F i)))))))) (S (@size I rI)) *)
elim: rI => [|i r /= <-]; rewrite ?big_nil ?size_poly1 // big_cons.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F i)))) (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) I (GRing.one poly_ringType) r (fun j : I => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) I j (@GRing.mul poly_ringType) true (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F j))))))))) (S (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) I (GRing.one poly_ringType) r (fun i : I => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) I i (@GRing.mul poly_ringType) true (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F i))))))))) *)
rewrite size_monicM ?monicXsubC ?monic_neq0 ?monic_prod_XsubC //.
(* Goal: @eq nat (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F i)))))) (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) I (GRing.one poly_ringType) r (fun j : I => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) I j (@GRing.mul poly_ringType) true (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F j)))))))))) (S (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (@poly_of R (Phant (GRing.Ring.sort R))) I (GRing.one poly_ringType) r (fun i : I => @BigBody (@poly_of R (Phant (GRing.Ring.sort R))) I i (@GRing.mul poly_ringType) true (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC (F i))))))))) *)
by rewrite size_XsubC.
Qed.
Lemma size_exp_XsubC n a : size (('X - a%:P) ^+ n) = n.+1.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) n))) (S n) *)
by rewrite -[n]card_ord -prodr_const size_prod_XsubC cardE enumT.
Qed.
Lemma lreg_lead p : GRing.lreg (lead_coef p) -> GRing.lreg p.
Proof.
(* Goal: forall _ : @GRing.lreg R (lead_coef p), @GRing.lreg poly_ringType p *)
move/mulrI_eq0=> reg_p; apply: mulrI0_lreg => q /eqP; apply: contraTeq => nz_q.
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType poly_ringType) (@GRing.mul poly_ringType p q) (GRing.zero (GRing.Ring.zmodType poly_ringType)))) *)
by rewrite -lead_coef_eq0 lead_coef_proper_mul reg_p lead_coef_eq0.
Qed.
Lemma rreg_lead p : GRing.rreg (lead_coef p) -> GRing.rreg p.
Proof.
(* Goal: forall _ : @GRing.rreg R (lead_coef p), @GRing.rreg poly_ringType p *)
move/mulIr_eq0=> reg_p; apply: mulIr0_rreg => q /eqP; apply: contraTeq => nz_q.
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType poly_ringType) (@GRing.mul poly_ringType q p) (GRing.zero (GRing.Ring.zmodType poly_ringType)))) *)
by rewrite -lead_coef_eq0 lead_coef_proper_mul reg_p lead_coef_eq0.
Qed.
Lemma lreg_lead0 p : GRing.lreg (lead_coef p) -> p != 0.
Proof.
(* Goal: forall _ : @GRing.lreg R (lead_coef p), is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) *)
by move/lreg_neq0; rewrite lead_coef_eq0.
Qed.
Lemma rreg_lead0 p : GRing.rreg (lead_coef p) -> p != 0.
Proof.
(* Goal: forall _ : @GRing.rreg R (lead_coef p), is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) *)
by move/rreg_neq0; rewrite lead_coef_eq0.
Qed.
Lemma lreg_size c p : GRing.lreg c -> size (c *: p) = size p.
Proof.
(* Goal: forall _ : @GRing.lreg R c, @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.scale R poly_lmodType c p))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
move=> reg_c; have [-> | nz_p] := eqVneq p 0; first by rewrite scaler0.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.scale R poly_lmodType c p))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
rewrite -mul_polyC size_proper_mul; first by rewrite size_polyC lreg_neq0.
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType R) (@GRing.mul R (lead_coef (polyC c)) (lead_coef p)) (GRing.zero (GRing.Ring.zmodType R)))) *)
by rewrite lead_coefC mulrI_eq0 ?lead_coef_eq0.
Qed.
Lemma lreg_polyZ_eq0 c p : GRing.lreg c -> (c *: p == 0) = (p == 0).
Proof.
(* Goal: forall _ : @GRing.lreg R c, @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))) (@GRing.scale R poly_lmodType c p) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType))))) (@eq_op poly_eqType p (GRing.zero poly_zmodType)) *)
by rewrite -!size_poly_eq0 => /lreg_size->.
Qed.
Lemma lead_coef_lreg c p :
GRing.lreg c -> lead_coef (c *: p) = c * lead_coef p.
Proof.
(* Goal: forall _ : @GRing.lreg R c, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (lead_coef (@GRing.scale R poly_lmodType c p)) (@GRing.mul R c (lead_coef p)) *)
by move=> reg_c; rewrite !lead_coefE coefZ lreg_size.
Qed.
Lemma rreg_size c p : GRing.rreg c -> size (p * c%:P) = size p.
Proof.
(* Goal: forall _ : @GRing.rreg R c, @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p (polyC c)))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
move=> reg_c; have [-> | nz_p] := eqVneq p 0; first by rewrite mul0r.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType p (polyC c)))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
rewrite size_proper_mul; first by rewrite size_polyC rreg_neq0 ?addn1.
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType R) (@GRing.mul R (lead_coef p) (lead_coef (polyC c))) (GRing.zero (GRing.Ring.zmodType R)))) *)
by rewrite lead_coefC mulIr_eq0 ?lead_coef_eq0.
Qed.
Lemma rreg_polyMC_eq0 c p : GRing.rreg c -> (p * c%:P == 0) = (p == 0).
Proof.
(* Goal: forall _ : @GRing.rreg R c, @eq bool (@eq_op (GRing.Ring.eqType poly_ringType) (@GRing.mul poly_ringType p (polyC c)) (GRing.zero (GRing.Ring.zmodType poly_ringType))) (@eq_op poly_eqType p (GRing.zero poly_zmodType)) *)
by rewrite -!size_poly_eq0 => /rreg_size->.
Qed.
Lemma rreg_div0 q r d :
GRing.rreg (lead_coef d) -> size r < size d ->
Proof.
(* Goal: forall (_ : @GRing.rreg R (lead_coef d)) (_ : is_true (leq (S (@size (GRing.Ring.sort R) (@polyseq R r))) (@size (GRing.Ring.sort R) (@polyseq R d)))), @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType poly_ringType)) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType q d) r) (GRing.zero (GRing.Ring.zmodType poly_ringType))) (andb (@eq_op poly_eqType q (GRing.zero poly_zmodType)) (@eq_op poly_eqType r (GRing.zero poly_zmodType))) *)
move=> reg_d lt_r_d; rewrite addrC addr_eq0.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType poly_ringType)) r (@GRing.opp (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType q d))) (andb (@eq_op poly_eqType q (GRing.zero poly_zmodType)) (@eq_op poly_eqType r (GRing.zero poly_zmodType))) *)
have [-> | nz_q] := altP (q =P 0); first by rewrite mul0r oppr0.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType poly_ringType)) r (@GRing.opp (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType q d))) (andb false (@eq_op poly_eqType r (GRing.zero poly_zmodType))) *)
apply: contraTF lt_r_d => /eqP->; rewrite -leqNgt size_opp.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R d)) (@size (GRing.Ring.sort R) (@polyseq R (@GRing.mul poly_ringType q d)))) *)
rewrite size_proper_mul ?mulIr_eq0 ?lead_coef_eq0 //.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R d)) (Nat.pred (addn (@size (GRing.Ring.sort R) (@polyseq R q)) (@size (GRing.Ring.sort R) (@polyseq R d))))) *)
by rewrite (polySpred nz_q) leq_addl.
Qed.
Lemma monic_comreg p :
p \is monic -> GRing.comm p (lead_coef p)%:P /\ GRing.rreg (lead_coef p).
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))), and (@GRing.comm poly_ringType p (polyC (lead_coef p))) (@GRing.rreg R (lead_coef p)) *)
by move/monicP->; split; [apply: commr1 | apply: rreg1].
Qed.
Implicit Types s rs : seq R.
Fixpoint horner_rec s x := if s is a :: s' then horner_rec s' x * x + a else 0.
Definition horner p := horner_rec p.
Local Notation "p .[ x ]" := (horner p x) : ring_scope.
Lemma horner0 x : (0 : {poly R}).[x] = 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (GRing.zero poly_zmodType : @poly_of R (Phant (GRing.Ring.sort R))) x) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite /horner polyseq0.
Qed.
Lemma hornerC c x : (c%:P).[x] = c.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (polyC c) x) c *)
by rewrite /horner polyseqC; case: eqP; rewrite /= ?simp.
Qed.
Lemma hornerX x : 'X.[x] = x.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner polyX x) x *)
by rewrite /horner polyseqX /= !simp.
Qed.
Lemma horner_cons p c x : (cons_poly c p).[x] = p.[x] * x + c.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (cons_poly c p) x) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner p x) x) c) *)
rewrite /horner polyseq_cons; case: nilP => //= ->.
(* Goal: @eq (GRing.Ring.sort R) (horner_rec (@polyseq R (polyC c)) x) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner_rec (@nil (GRing.Ring.sort R)) x) x) c) *)
by rewrite !simp -/(_.[x]) hornerC.
Qed.
Lemma horner_coef0 p : p.[0] = p`_0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p (GRing.zero (GRing.Ring.zmodType R))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) O) *)
by rewrite /horner; case: (p : seq R) => //= c p'; rewrite !simp.
Qed.
Lemma hornerMXaddC p c x : (p * 'X + c%:P).[x] = p.[x] * x + c.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c)) x) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner p x) x) c) *)
by rewrite -cons_poly_def horner_cons.
Qed.
Lemma hornerMX p x : (p * 'X).[x] = p.[x] * x.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.mul poly_ringType p polyX) x) (@GRing.mul R (horner p x) x) *)
by rewrite -[p * 'X]addr0 hornerMXaddC addr0.
Qed.
Lemma horner_Poly s x : (Poly s).[x] = horner_rec s x.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (Poly s) x) (horner_rec s x) *)
by elim: s => [|a s /= <-]; rewrite (horner0, horner_cons).
Qed.
Lemma horner_coef p x : p.[x] = \sum_(i < size p) p`_i * x ^+ i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p x) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))))) *)
rewrite /horner.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner_rec (@polyseq R p) x) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))))) *)
elim: {p}(p : seq R) => /= [|a s ->]; first by rewrite big_ord0.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) s)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) s))) (fun i : ordinal (@size (GRing.Ring.sort R) s) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) s)) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) s (@nat_of_ord (@size (GRing.Ring.sort R) s) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) s) i))))) x) a) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S (@size (GRing.Ring.sort R) s))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S (@size (GRing.Ring.sort R) s)))) (fun i : ordinal (S (@size (GRing.Ring.sort R) s)) => @BigBody (GRing.Ring.sort R) (ordinal (S (@size (GRing.Ring.sort R) s))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@cons (GRing.Ring.sort R) a s) (@nat_of_ord (S (@size (GRing.Ring.sort R) s)) i)) (@GRing.exp R x (@nat_of_ord (S (@size (GRing.Ring.sort R) s)) i))))) *)
rewrite big_ord_recl simp addrC big_distrl /=.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) a (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) s)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) s))) (fun i : ordinal (@size (GRing.Ring.sort R) s) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) s)) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) s (@nat_of_ord (@size (GRing.Ring.sort R) s) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) s) i))) x)))) (@GRing.add (GRing.Ring.zmodType R) a (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) s)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) s))) (fun i : ordinal (@size (GRing.Ring.sort R) s) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) s)) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) s (@nat_of_ord (@size (GRing.Ring.sort R) s) i)) (@GRing.exp R x (bump O (@nat_of_ord (@size (GRing.Ring.sort R) s) i))))))) *)
by congr (_ + _); apply: eq_bigr => i _; rewrite -mulrA exprSr.
Qed.
Lemma horner_coef_wide n p x :
size p <= n -> p.[x] = \sum_(i < n) p`_i * x ^+ i.
Proof.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) n), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p x) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i))))) *)
move=> le_p_n.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p x) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i))))) *)
rewrite horner_coef (big_ord_widen n (fun i => p`_i * x ^+ i)) // big_mkcond.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Ring.sort R) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Ring.sort R) (Finite.sort (ordinal_finType n)) i (@Monoid.operator (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_monoid (GRing.Ring.zmodType R))) true (if leq (S (@nat_of_ord n i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then @GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i)) else GRing.zero (GRing.Ring.zmodType R)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i))))) *)
by apply: eq_bigr => i _; case: ltnP => // le_p_i; rewrite nth_default ?simp.
Qed.
Lemma horner_poly n E x : (\poly_(i < n) E i).[x] = \sum_(i < n) E i * x ^+ i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (poly n (fun i : nat => E i)) x) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (E (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i))))) *)
rewrite (@horner_coef_wide n) ?size_poly //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (poly n (fun i0 : nat => E i0))) (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (E (@nat_of_ord n i)) (@GRing.exp R x (@nat_of_ord n i))))) *)
by apply: eq_bigr => i _; rewrite coef_poly ltn_ord.
Qed.
Lemma hornerN p x : (- p).[x] = - p.[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.opp poly_zmodType p) x) (@GRing.opp (GRing.Ring.zmodType R) (horner p x)) *)
rewrite -[-%R]/opp_poly unlock horner_poly horner_coef -sumrN /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.opp (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)))))) *)
by apply: eq_bigr => i _; rewrite mulNr.
Qed.
Lemma hornerD p q x : (p + q).[x] = p.[x] + q.[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.add poly_zmodType p q) x) (@GRing.add (GRing.Ring.zmodType R) (horner p x) (horner q x)) *)
rewrite -[+%R]/add_poly unlock horner_poly; set m := maxn _ _.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType m)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal m) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord m i)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord m i))) (@GRing.exp R x (@nat_of_ord m i))))) (@GRing.add (GRing.Ring.zmodType R) (horner p x) (horner q x)) *)
rewrite !(@horner_coef_wide m) ?leq_max ?leqnn ?orbT // -big_split /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal m) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (GRing.Ring.sort R) (ordinal m) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord m i)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord m i))) (@GRing.exp R x (@nat_of_ord m i))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal m) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType m)) (fun i : ordinal m => @BigBody (GRing.Ring.sort R) (ordinal m) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord m i)) (@GRing.exp R x (@nat_of_ord m i))) (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R q) (@nat_of_ord m i)) (@GRing.exp R x (@nat_of_ord m i)))))) *)
by apply: eq_bigr => i _; rewrite -mulrDl.
Qed.
Lemma hornerXsubC a x : ('X - a%:P).[x] = x - a.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) x) (@GRing.add (GRing.Ring.zmodType R) x (@GRing.opp (GRing.Ring.zmodType R) a)) *)
by rewrite hornerD hornerN hornerC hornerX.
Qed.
Lemma horner_sum I (r : seq I) (P : pred I) F x :
(\sum_(i <- r | P i) F i).[x] = \sum_(i <- r | P i) (F i).[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@BigOp.bigop (GRing.Zmodule.sort poly_zmodType) I (GRing.zero poly_zmodType) r (fun i : I => @BigBody (GRing.Zmodule.sort poly_zmodType) I i (@GRing.add poly_zmodType) (P i) (F i))) x) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I (GRing.zero (GRing.Ring.zmodType R)) r (fun i : I => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) I i (@GRing.add (GRing.Ring.zmodType R)) (P i) (horner (F i) x))) *)
by elim/big_rec2: _ => [|i _ p _ <-]; rewrite (horner0, hornerD).
Qed.
Lemma hornerCM a p x : (a%:P * p).[x] = a * p.[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.mul poly_ringType (polyC a) p) x) (@GRing.mul R a (horner p x)) *)
elim/poly_ind: p => [|p c IHp]; first by rewrite !(mulr0, horner0).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.mul poly_ringType (polyC a) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c))) x) (@GRing.mul R a (horner (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c)) x)) *)
by rewrite mulrDr mulrA -polyC_mul !hornerMXaddC IHp mulrDr mulrA.
Qed.
Lemma hornerZ c p x : (c *: p).[x] = c * p.[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.scale R poly_lmodType c p) x) (@GRing.mul R c (horner p x)) *)
by rewrite -mul_polyC hornerCM.
Qed.
Lemma hornerMn n p x : (p *+ n).[x] = p.[x] *+ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.natmul poly_zmodType p n) x) (@GRing.natmul (GRing.Ring.zmodType R) (horner p x) n) *)
by elim: n => [| n IHn]; rewrite ?horner0 // !mulrS hornerD IHn.
Qed.
Definition comm_coef p x := forall i, p`_i * x = x * p`_i.
Definition comm_poly p x := x * p.[x] = p.[x] * x.
Lemma comm_coef_poly p x : comm_coef p x -> comm_poly p x.
Proof.
(* Goal: forall _ : comm_coef p x, comm_poly p x *)
move=> cpx; rewrite /comm_poly !horner_coef big_distrl big_distrr /=.
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R x (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)))))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Ring.sort R) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))) x))) *)
by apply: eq_bigr => i _; rewrite /= mulrA -cpx -!mulrA commrX.
Qed.
Lemma comm_poly0 x : comm_poly 0 x.
Proof.
(* Goal: comm_poly (GRing.zero poly_zmodType) x *)
by rewrite /comm_poly !horner0 !simp.
Qed.
Lemma comm_poly1 x : comm_poly 1 x.
Proof.
(* Goal: comm_poly (GRing.one poly_ringType) x *)
by rewrite /comm_poly !hornerC !simp.
Qed.
Lemma comm_polyX x : comm_poly 'X x.
Proof.
(* Goal: comm_poly polyX x *)
by rewrite /comm_poly !hornerX.
Qed.
Lemma hornerM_comm p q x : comm_poly q x -> (p * q).[x] = p.[x] * q.[x].
Proof.
(* Goal: forall _ : comm_poly q x, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.mul poly_ringType p q) x) (@GRing.mul R (horner p x) (horner q x)) *)
move=> comm_qx.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.mul poly_ringType p q) x) (@GRing.mul R (horner p x) (horner q x)) *)
elim/poly_ind: p => [|p c IHp]; first by rewrite !(simp, horner0).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.mul poly_ringType (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c)) q) x) (@GRing.mul R (horner (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c)) x) (horner q x)) *)
rewrite mulrDl hornerD hornerCM -mulrA -commr_polyX mulrA hornerMX.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner (@GRing.mul poly_ringType p q) x) x) (@GRing.mul R c (horner q x))) (@GRing.mul R (horner (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c)) x) (horner q x)) *)
by rewrite {}IHp -mulrA -comm_qx mulrA -mulrDl hornerMXaddC.
Qed.
Lemma horner_exp_comm p x n : comm_poly p x -> (p ^+ n).[x] = p.[x] ^+ n.
Proof.
(* Goal: forall _ : comm_poly p x, @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.exp poly_ringType p n) x) (@GRing.exp R (horner p x) n) *)
move=> comm_px; elim: n => [|n IHn]; first by rewrite hornerC.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.exp poly_ringType p (S n)) x) (@GRing.exp R (horner p x) (S n)) *)
by rewrite !exprSr -IHn hornerM_comm.
Qed.
Lemma hornerXn x n : ('X^n).[x] = x ^+ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner (@GRing.exp poly_ringType polyX n) x) (@GRing.exp R x n) *)
by rewrite horner_exp_comm /comm_poly hornerX.
Qed.
Definition hornerE_comm :=
(hornerD, hornerN, hornerX, hornerC, horner_cons,
simp, hornerCM, hornerZ,
(fun p x => hornerM_comm p (comm_polyX x))).
Definition root p : pred R := fun x => p.[x] == 0.
Lemma mem_root p x : x \in root p = (p.[x] == 0).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Ring.sort R) x (@mem (GRing.Ring.sort R) (predPredType (GRing.Ring.sort R)) (root p))) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (horner p x) (GRing.zero (GRing.Ring.zmodType R))) *)
by [].
Qed.
Lemma rootE p x : (root p x = (p.[x] == 0)) * ((x \in root p) = (p.[x] == 0)).
Proof.
(* Goal: prod (@eq bool (root p x) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (horner p x) (GRing.zero (GRing.Ring.zmodType R)))) (@eq bool (@in_mem (GRing.Ring.sort R) x (@mem (GRing.Ring.sort R) (predPredType (GRing.Ring.sort R)) (root p))) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (horner p x) (GRing.zero (GRing.Ring.zmodType R)))) *)
by [].
Qed.
Lemma rootP p x : reflect (p.[x] = 0) (root p x).
Proof.
(* Goal: Bool.reflect (@eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p x) (GRing.zero (GRing.Ring.zmodType R))) (root p x) *)
exact: eqP.
Qed.
Lemma rootPt p x : reflect (p.[x] == 0) (root p x).
Proof.
(* Goal: Bool.reflect (is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (horner p x) (GRing.zero (GRing.Ring.zmodType R)))) (root p x) *)
exact: idP.
Qed.
Lemma rootPf p x : reflect ((p.[x] == 0) = false) (~~ root p x).
Proof.
(* Goal: Bool.reflect (@eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (horner p x) (GRing.zero (GRing.Ring.zmodType R))) false) (negb (root p x)) *)
exact: negPf.
Qed.
Lemma rootC a x : root a%:P x = (a == 0).
Proof.
(* Goal: @eq bool (root (polyC a) x) (@eq_op (GRing.Ring.eqType R) a (GRing.zero (GRing.Ring.zmodType R))) *)
by rewrite rootE hornerC.
Qed.
Lemma root0 x : root 0 x.
Proof.
(* Goal: is_true (root (GRing.zero poly_zmodType) x) *)
by rewrite rootC.
Qed.
Lemma root1 x : ~~ root 1 x.
Proof.
(* Goal: is_true (negb (root (GRing.one poly_ringType) x)) *)
by rewrite rootC oner_eq0.
Qed.
Lemma rootX x : root 'X x = (x == 0).
Proof.
(* Goal: @eq bool (root polyX x) (@eq_op (GRing.Ring.eqType R) x (GRing.zero (GRing.Ring.zmodType R))) *)
by rewrite rootE hornerX.
Qed.
Lemma rootN p x : root (- p) x = root p x.
Proof.
(* Goal: @eq bool (root (@GRing.opp poly_zmodType p) x) (root p x) *)
by rewrite rootE hornerN oppr_eq0.
Qed.
Lemma root_size_gt1 a p : p != 0 -> root p a -> 1 < size p.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType)))) (_ : is_true (root p a)), is_true (leq (S (S O)) (@size (GRing.Ring.sort R) (@polyseq R p))) *)
rewrite ltnNge => nz_p; apply: contraL => /size1_polyC Dp.
(* Goal: is_true (negb (root p a)) *)
by rewrite Dp rootC -polyC_eq0 -Dp.
Qed.
Lemma root_XsubC a x : root ('X - a%:P) x = (x == a).
Proof.
(* Goal: @eq bool (root (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) x) (@eq_op (GRing.Ring.eqType R) x a) *)
by rewrite rootE hornerXsubC subr_eq0.
Qed.
Lemma root_XaddC a x : root ('X + a%:P) x = (x == - a).
Proof.
(* Goal: @eq bool (root (@GRing.add poly_zmodType polyX (polyC a)) x) (@eq_op (GRing.Ring.eqType R) x (@GRing.opp (GRing.Ring.zmodType R) a)) *)
by rewrite -root_XsubC rmorphN opprK.
Qed.
Theorem factor_theorem p a : reflect (exists q, p = q * ('X - a%:P)) (root p a).
Proof.
(* Goal: Bool.reflect (@ex (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))))) (root p a) *)
apply: (iffP eqP) => [pa0 | [q ->]]; last first.
(* Goal: @ex (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))))) *)
(* Goal: @eq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType R))) (horner (@GRing.mul poly_ringType q (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) a) (GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite hornerM_comm /comm_poly hornerXsubC subrr ?simp.
(* Goal: @ex (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))))) *)
exists (\poly_(i < size p) horner_rec (drop i.+1 p) a).
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType (poly (@size (GRing.Ring.sort R) (@polyseq R p)) (fun i : nat => horner_rec (@drop (GRing.Ring.sort R) (S i) (@polyseq R p)) a)) (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) *)
apply/polyP=> i; rewrite mulrBr coefB coefMX coefMC !coef_poly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@GRing.add (GRing.Ring.zmodType R) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else if leq (S (Nat.pred i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S (Nat.pred i)) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) (@GRing.opp (GRing.Ring.zmodType R) (@GRing.mul R (if leq (S i) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S i) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) a))) *)
apply: canRL (addrK _) _; rewrite addrC; have [le_p_i | lt_i_p] := leqP.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner_rec (@drop (GRing.Ring.sort R) (S i) (@polyseq R p)) a) a) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else if leq (S (Nat.pred i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S (Nat.pred i)) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (GRing.zero (GRing.Ring.zmodType R)) a) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else if leq (S (Nat.pred i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S (Nat.pred i)) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) *)
rewrite nth_default // !simp drop_oversize ?if_same //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner_rec (@drop (GRing.Ring.sort R) (S i) (@polyseq R p)) a) a) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else if leq (S (Nat.pred i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S (Nat.pred i)) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) (S (Nat.pred i))) *)
exact: leq_trans (leqSpred _).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner_rec (@drop (GRing.Ring.sort R) (S i) (@polyseq R p)) a) a) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i)) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else if leq (S (Nat.pred i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S (Nat.pred i)) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) *)
case: i => [|i] in lt_i_p *; last by rewrite ltnW // (drop_nth 0 lt_i_p).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R (horner_rec (@drop (GRing.Ring.sort R) (S O) (@polyseq R p)) a) a) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) O)) (if @eq_op nat_eqType O O then GRing.zero (GRing.Ring.zmodType R) else if leq (S (Nat.pred O)) (@size (GRing.Ring.sort R) (@polyseq R p)) then horner_rec (@drop (GRing.Ring.sort R) (S (Nat.pred O)) (@polyseq R p)) a else GRing.zero (GRing.Ring.zmodType R)) *)
by rewrite drop1 /= -{}pa0 /horner; case: (p : seq R) lt_i_p.
Qed.
Lemma multiplicity_XsubC p a :
{m | exists2 q, (p != 0) ==> ~~ root q a & p = q * ('X - a%:P) ^+ m}.
Proof.
(* Goal: @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
elim: {p}(size p) {-2}p (eqxx (size p)) => [|n IHn] p.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort R) (@polyseq R p)) (S n)), @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort R) (@polyseq R p)) O), @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
by rewrite size_poly_eq0 => ->; exists 0%N, p; rewrite ?mulr1.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort R) (@polyseq R p)) (S n)), @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
have [/sig_eqW[{p}p ->] sz_p | nz_pa] := altP (factor_theorem p a); last first.
(* Goal: @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort R) (@polyseq R p)) (S n)), @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) p (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
by exists 0%N, p; rewrite ?mulr1 ?nz_pa ?implybT.
(* Goal: @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
have nz_p: p != 0 by apply: contraTneq sz_p => ->; rewrite mul0r size_poly0.
(* Goal: @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
rewrite size_Mmonic ?monicXsubC // size_XsubC addn2 eqSS in sz_p.
(* Goal: @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
have [m /sig2_eqW[q nz_qa Dp]] := IHn p sz_p; rewrite nz_p /= in nz_qa.
(* Goal: @sig nat (fun m : nat => @ex2 (@poly_of R (Phant (GRing.Ring.sort R))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (implb (negb (@eq_op poly_eqType (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.zero poly_zmodType))) (negb (root q a)))) (fun q : @poly_of R (Phant (GRing.Ring.sort R)) => @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.mul poly_ringType p (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (@GRing.mul poly_ringType q (@GRing.exp poly_ringType (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a))) m)))) *)
by exists m.+1, q; rewrite ?nz_qa ?implybT // exprSr mulrA -Dp.
Qed.
Lemma size_Xn_sub_1 n : n > 0 -> size ('X^n - 1 : {poly R}) = n.+1.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.exp poly_ringType polyX n) (@GRing.opp (GRing.Ring.zmodType poly_ringType) (GRing.one poly_ringType)) : @poly_of R (Phant (GRing.Ring.sort R))))) (S n) *)
by move=> n_gt0; rewrite size_addl size_polyXn // size_opp size_poly1.
Qed.
Lemma monic_Xn_sub_1 n : n > 0 -> 'X^n - 1 \is monic.
Proof.
(* Goal: forall _ : is_true (leq (S O) n), is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType poly_ringType)) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.exp poly_ringType polyX n) (@GRing.opp (GRing.Ring.zmodType poly_ringType) (GRing.one poly_ringType))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) monic))) *)
move=> n_gt0; rewrite monicE lead_coefE size_Xn_sub_1 // coefB.
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.exp poly_ringType polyX n)) (Nat.pred (S n))) (@GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (GRing.one poly_ringType)) (Nat.pred (S n))))) (GRing.one R)) *)
by rewrite coefXn coef1 eqxx eqn0Ngt n_gt0 subr0.
Qed.
Definition root_of_unity n : pred R := root ('X^n - 1).
Local Notation "n .-unity_root" := (root_of_unity n) : ring_scope.
Lemma unity_rootE n z : n.-unity_root z = (z ^+ n == 1).
Proof.
(* Goal: @eq bool (root_of_unity n z) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z n) (GRing.one R)) *)
by rewrite /root_of_unity rootE hornerD hornerN hornerXn hornerC subr_eq0.
Qed.
Lemma unity_rootP n z : reflect (z ^+ n = 1) (n.-unity_root z).
Proof.
(* Goal: Bool.reflect (@eq (GRing.Ring.sort R) (@GRing.exp R z n) (GRing.one R)) (root_of_unity n z) *)
by rewrite unity_rootE; apply: eqP.
Qed.
Definition primitive_root_of_unity n z :=
(n > 0) && [forall i : 'I_n, i.+1.-unity_root z == (i.+1 == n)].
Local Notation "n .-primitive_root" := (primitive_root_of_unity n) : ring_scope.
Lemma prim_order_exists n z :
n > 0 -> z ^+ n = 1 -> {m | m.-primitive_root z & (m %| n)}.
Proof.
(* Goal: forall (_ : is_true (leq (S O) n)) (_ : @eq (GRing.Ring.sort R) (@GRing.exp R z n) (GRing.one R)), @sig2 nat (fun m : nat => is_true (primitive_root_of_unity m z)) (fun m : nat => is_true (dvdn m n)) *)
move=> n_gt0 zn1.
(* Goal: @sig2 nat (fun m : nat => is_true (primitive_root_of_unity m z)) (fun m : nat => is_true (dvdn m n)) *)
have: exists m, (m > 0) && (z ^+ m == 1) by exists n; rewrite n_gt0 /= zn1.
(* Goal: forall _ : @ex nat (fun m : nat => is_true (andb (leq (S O) m) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z m) (GRing.one R)))), @sig2 nat (fun m : nat => is_true (primitive_root_of_unity m z)) (fun m : nat => is_true (dvdn m n)) *)
case/ex_minnP=> m /andP[m_gt0 /eqP zm1] m_min.
(* Goal: @sig2 nat (fun m : nat => is_true (primitive_root_of_unity m z)) (fun m : nat => is_true (dvdn m n)) *)
exists m.
(* Goal: is_true (dvdn m n) *)
(* Goal: is_true (primitive_root_of_unity m z) *)
apply/andP; split=> //; apply/eqfunP=> [[i]] /=.
(* Goal: is_true (dvdn m n) *)
(* Goal: forall _ : is_true (leq (S i) m), @eq bool (root_of_unity (S i) z) (@eq_op nat_eqType (S i) m) *)
rewrite leq_eqVlt unity_rootE.
(* Goal: is_true (dvdn m n) *)
(* Goal: forall _ : is_true (orb (@eq_op nat_eqType (S i) m) (leq (S (S i)) m)), @eq bool (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z (S i)) (GRing.one R)) (@eq_op nat_eqType (S i) m) *)
case: eqP => [-> _ | _]; first by rewrite zm1 eqxx.
(* Goal: is_true (dvdn m n) *)
(* Goal: forall _ : is_true (orb false (leq (S (S i)) m)), @eq bool (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z (S i)) (GRing.one R)) false *)
by apply: contraTF => zi1; rewrite -leqNgt m_min.
(* Goal: is_true (dvdn m n) *)
have: n %% m < m by rewrite ltn_mod.
(* Goal: forall _ : is_true (leq (S (modn n m)) m), is_true (dvdn m n) *)
apply: contraLR; rewrite -lt0n -leqNgt => nm_gt0; apply: m_min.
(* Goal: is_true (andb (leq (S O) (modn n m)) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z (modn n m)) (GRing.one R))) *)
by rewrite nm_gt0 /= expr_mod ?zn1.
Qed.
Let n_gt0 := prim_order_gt0.
Lemma prim_expr_order : z ^+ n = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.exp R z n) (GRing.one R) *)
case/andP: prim_z => _; rewrite -(prednK n_gt0) => /forallP/(_ ord_max).
(* Goal: forall _ : is_true (@eq_op bool_eqType (root_of_unity (S (@nat_of_ord (S (Nat.pred n)) (@ord_max (Nat.pred n)))) z) (@eq_op nat_eqType (S (@nat_of_ord (S (Nat.pred n)) (@ord_max (Nat.pred n)))) (S (Nat.pred n)))), @eq (GRing.Ring.sort R) (@GRing.exp R z (S (Nat.pred n))) (GRing.one R) *)
by rewrite unity_rootE eqxx eqb_id => /eqP.
Qed.
Lemma prim_expr_mod i : z ^+ (i %% n) = z ^+ i.
Proof.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.exp R z (modn i n)) (@GRing.exp R z i) *)
exact: expr_mod prim_expr_order.
Qed.
Lemma prim_order_dvd i : (n %| i) = (z ^+ i == 1).
Proof.
(* Goal: @eq bool (dvdn n i) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z i) (GRing.one R)) *)
move: n_gt0; rewrite -prim_expr_mod /dvdn -(ltn_mod i).
(* Goal: forall _ : is_true (leq (S (modn i n)) n), @eq bool (@eq_op nat_eqType (modn i n) O) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z (modn i n)) (GRing.one R)) *)
case: {i}(i %% n)%N => [|i] lt_i; first by rewrite !eqxx.
(* Goal: @eq bool (@eq_op nat_eqType (S i) O) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z (S i)) (GRing.one R)) *)
case/andP: prim_z => _ /forallP/(_ (Ordinal (ltnW lt_i))).
(* Goal: forall _ : is_true (@eq_op bool_eqType (root_of_unity (S (@nat_of_ord n (@Ordinal n i (@ltnW (S i) n lt_i)))) z) (@eq_op nat_eqType (S (@nat_of_ord n (@Ordinal n i (@ltnW (S i) n lt_i)))) n)), @eq bool (@eq_op nat_eqType (S i) O) (@eq_op (GRing.Ring.eqType R) (@GRing.exp R z (S i)) (GRing.one R)) *)
by move/eqP; rewrite unity_rootE eqn_leq andbC leqNgt lt_i.
Qed.
Lemma eq_prim_root_expr i j : (z ^+ i == z ^+ j) = (i == j %[mod n]).
Lemma exp_prim_root k : (n %/ gcdn k n).-primitive_root (z ^+ k).
Lemma dvdn_prim_root m : (m %| n)%N -> m.-primitive_root (z ^+ (n %/ m)).
Proof.
(* Goal: forall _ : is_true (dvdn m n), is_true (primitive_root_of_unity m (@GRing.exp R z (divn n m))) *)
set k := (n %/ m)%N => m_dv_n; rewrite -{1}(mulKn m n_gt0) -divnA // -/k.
(* Goal: is_true (primitive_root_of_unity (divn n k) (@GRing.exp R z k)) *)
by rewrite -{1}(@gcdn_idPl k n _) ?exp_prim_root // -(divnK m_dv_n) dvdn_mulr.
Qed.
End OnePrimitive.
Lemma prim_root_exp_coprime n z k :
n.-primitive_root z -> n.-primitive_root (z ^+ k) = coprime k n.
Proof.
(* Goal: forall _ : is_true (primitive_root_of_unity n z), @eq bool (primitive_root_of_unity n (@GRing.exp R z k)) (coprime k n) *)
move=> prim_z; have n_gt0 := prim_order_gt0 prim_z.
(* Goal: @eq bool (primitive_root_of_unity n (@GRing.exp R z k)) (coprime k n) *)
apply/idP/idP=> [prim_zk | co_k_n].
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
(* Goal: is_true (coprime k n) *)
set d := gcdn k n; have dv_d_n: (d %| n)%N := dvdn_gcdr _ _.
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
(* Goal: is_true (coprime k n) *)
rewrite /coprime -/d -(eqn_pmul2r n_gt0) mul1n -{2}(gcdnMl n d).
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
(* Goal: is_true (@eq_op nat_eqType (muln d n) (gcdn n (muln d n))) *)
rewrite -{2}(divnK dv_d_n) (mulnC _ d) -muln_gcdr (gcdn_idPr _) //.
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
(* Goal: is_true (dvdn n (divn n d)) *)
rewrite (prim_order_dvd prim_zk) -exprM -(prim_order_dvd prim_z).
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
(* Goal: is_true (dvdn n (muln k (divn n d))) *)
by rewrite muln_divCA_gcd dvdn_mulr.
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
have zkn_1: z ^+ k ^+ n = 1 by rewrite exprAC (prim_expr_order prim_z) expr1n.
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
have{zkn_1} [m prim_zk dv_m_n]:= prim_order_exists n_gt0 zkn_1.
(* Goal: is_true (primitive_root_of_unity n (@GRing.exp R z k)) *)
suffices /eqP <-: m == n by [].
(* Goal: is_true (@eq_op nat_eqType m n) *)
rewrite eqn_dvd dv_m_n -(@Gauss_dvdr n k m) 1?coprime_sym //=.
(* Goal: is_true (dvdn n (muln k m)) *)
by rewrite (prim_order_dvd prim_z) exprM (prim_expr_order prim_zk).
Qed.
Definition polyOver (S : pred_class) :=
[qualify a p : {poly R} | all (mem S) p].
Canonical polyOver_keyed S := KeyedQualifier (polyOver_key S).
Lemma polyOverS (S1 S2 : pred_class) :
{subset S1 <= S2} -> {subset polyOver S1 <= polyOver S2}.
Proof.
(* Goal: forall _ : @sub_mem (GRing.Ring.sort R) (@mem (GRing.Ring.sort R) (predPredType (GRing.Ring.sort R)) S1) (@mem (GRing.Ring.sort R) (predPredType (GRing.Ring.sort R)) S2), @sub_mem (@poly_of R (Phant (GRing.Ring.sort R))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver S1))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver S2))) *)
by move=> sS12 p /(all_nthP 0)S1p; apply/(all_nthP 0)=> i /S1p; apply: sS12.
Qed.
Lemma polyOver0 S : 0 \is a polyOver S.
Proof.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort poly_zmodType) (GRing.zero poly_zmodType) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver S)))) *)
by rewrite qualifE polyseq0.
Qed.
Lemma polyOver_poly (S : pred_class) n E :
(forall i, i < n -> E i \in S) -> \poly_(i < n) E i \is a polyOver S.
Proof.
(* Goal: forall _ : forall (i : nat) (_ : is_true (leq (Datatypes.S i) n)), is_true (@in_mem (GRing.Ring.sort R) (E i) (@mem (GRing.Ring.sort R) (predPredType (GRing.Ring.sort R)) S)), is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (poly n (fun i : nat => E i)) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver S)))) *)
move=> S_E; apply/(all_nthP 0)=> i lt_i_p /=; rewrite coef_poly.
(* Goal: is_true (@in_mem (GRing.Ring.sort R) (if leq (Datatypes.S i) n then E i else GRing.zero (GRing.Ring.zmodType R)) (@mem (GRing.Ring.sort R) (predPredType (GRing.Ring.sort R)) S)) *)
by case: ifP => [/S_E// | /idP[]]; apply: leq_trans lt_i_p (size_poly n E).
Qed.
Section PolyOverAdd.
Variables (S : predPredType R) (addS : addrPred S) (kS : keyed_pred addS).
Lemma polyOverP {p} : reflect (forall i, p`_i \in kS) (p \in polyOver kS).
Proof.
(* Goal: Bool.reflect (forall i : nat, is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS)))) (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) p (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS))))) *)
apply: (iffP (all_nthP 0)) => [Sp i | Sp i _]; last exact: Sp.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS))) *)
by have [/Sp // | /(nth_default 0)->] := ltnP i (size p); apply: rpred0.
Qed.
Lemma polyOverC c : (c%:P \in polyOver kS) = (c \in kS).
Proof.
(* Goal: @eq bool (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (polyC c) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS))))) (@in_mem (GRing.Ring.sort R) c (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS))) *)
by rewrite qualifE polyseqC; case: eqP => [->|] /=; rewrite ?andbT ?rpred0.
Qed.
Fact polyOver_addr_closed : addr_closed (polyOver kS).
Proof.
(* Goal: @GRing.addr_closed poly_zmodType (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS))) *)
split=> [|p q Sp Sq]; first exact: polyOver0.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort poly_zmodType) (@GRing.add poly_zmodType p q) (@mem (GRing.Zmodule.sort poly_zmodType) (predPredType (GRing.Zmodule.sort poly_zmodType)) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S addS) kS))))) *)
by apply/polyOverP=> i; rewrite coefD rpredD ?(polyOverP _).
Qed.
Canonical polyOver_addrPred := AddrPred polyOver_addr_closed.
End PolyOverAdd.
Fact polyOverNr S (addS : zmodPred S) (kS : keyed_pred addS) :
oppr_closed (polyOver kS).
Proof.
(* Goal: @GRing.oppr_closed poly_zmodType (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.opp_key (GRing.Ring.zmodType R) S (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) S addS)) kS))) *)
by move=> p /polyOverP Sp; apply/polyOverP=> i; rewrite coefN rpredN.
Qed.
Canonical polyOver_opprPred S addS kS := OpprPred (@polyOverNr S addS kS).
Canonical polyOver_zmodPred S addS kS := ZmodPred (@polyOverNr S addS kS).
Section PolyOverSemiring.
Context (S : pred_class) (ringS : @semiringPred R S) (kS : keyed_pred ringS).
Fact polyOver_mulr_closed : mulr_closed (polyOver kS).
Proof.
(* Goal: @GRing.mulr_closed poly_ringType (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) *)
split=> [|p q /polyOverP Sp /polyOverP Sq]; first by rewrite polyOverC rpred1.
(* Goal: is_true (@in_mem (GRing.Ring.sort poly_ringType) (@GRing.mul poly_ringType p q) (@mem (GRing.Ring.sort poly_ringType) (predPredType (GRing.Ring.sort poly_ringType)) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))) *)
by apply/polyOverP=> i; rewrite coefM rpred_sum // => j _; apply: rpredM.
Qed.
Canonical polyOver_mulrPred := MulrPred polyOver_mulr_closed.
Canonical polyOver_semiringPred := SemiringPred polyOver_mulr_closed.
Lemma polyOverZ : {in kS & polyOver kS, forall c p, c *: p \is a polyOver kS}.
Proof.
(* Goal: @prop_in11 (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@poly_of R (Phant (GRing.Ring.sort R))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (fun (c : GRing.Ring.sort R) (p : @poly_of R (Phant (GRing.Ring.sort R))) => is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))) (@GRing.scale R poly_lmodType c p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))))) (inPhantom (forall (c : GRing.Ring.sort R) (p : @poly_of R (Phant (GRing.Ring.sort R))), is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))) (@GRing.scale R poly_lmodType c p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))))) *)
by move=> c p Sc /polyOverP Sp; apply/polyOverP=> i; rewrite coefZ rpredM ?Sp.
Qed.
Lemma polyOverX : 'X \in polyOver kS.
Proof.
(* Goal: is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) polyX (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))) *)
by rewrite qualifE polyseqX /= rpred0 rpred1.
Qed.
Lemma rpred_horner : {in polyOver kS & kS, forall p x, p.[x] \in kS}.
Proof.
(* Goal: @prop_in11 (@poly_of R (Phant (GRing.Ring.sort R))) (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)) (fun (p : @poly_of R (Phant (GRing.Ring.sort R))) (x : GRing.Ring.sort R) => is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p x) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (inPhantom (forall (p : @poly_of R (Phant (GRing.Ring.sort R))) (x : GRing.Ring.sort R), is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p x) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))) *)
move=> p x /polyOverP Sp Sx; rewrite horner_coef rpred_sum // => i _.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp R x (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) *)
by rewrite rpredM ?rpredX.
Qed.
End PolyOverSemiring.
Section PolyOverRing.
Context (S : pred_class) (ringS : @subringPred R S) (kS : keyed_pred ringS).
Canonical polyOver_smulrPred := SmulrPred (polyOver_mulr_closed kS).
Canonical polyOver_subringPred := SubringPred (polyOver_mulr_closed kS).
Lemma polyOverXsubC c : ('X - c%:P \in polyOver kS) = (c \in kS).
Proof.
(* Goal: @eq bool (@in_mem (GRing.Zmodule.sort poly_zmodType) (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC c))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.opp_key (GRing.Ring.zmodType R) S (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) S (@GRing.Pred.subring_zmod R S ringS))) kS))))) (@in_mem (GRing.Ring.sort R) c (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.opp_key (GRing.Ring.zmodType R) S (@GRing.Pred.zmod_opp (GRing.Ring.zmodType R) S (@GRing.Pred.subring_zmod R S ringS))) kS))) *)
by rewrite rpredBl ?polyOverX ?polyOverC.
Qed.
End PolyOverRing.
Definition deriv p := \poly_(i < (size p).-1) (p`_i.+1 *+ i.+1).
Local Notation "a ^` ()" := (deriv a).
Lemma coef_deriv p i : p^`()`_i = p`_i.+1 *+ i.+1.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (deriv p)) i) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (S i)) (S i)) *)
rewrite coef_poly -subn1 ltn_subRL.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (if leq (S (addn (S O) i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then @GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (S i)) (S i) else GRing.zero (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (S i)) (S i)) *)
by case: leqP => // /(nth_default 0) ->; rewrite mul0rn.
Qed.
Lemma polyOver_deriv S (ringS : semiringPred S) (kS : keyed_pred ringS) :
{in polyOver kS, forall p, p^`() \is a polyOver kS}.
Proof.
(* Goal: @prop_in1 (@poly_of R (Phant (GRing.Ring.sort R))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (deriv p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))))) (inPhantom (forall p : @poly_of R (Phant (GRing.Ring.sort R)), is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (deriv p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))))) *)
by move=> p /polyOverP Kp; apply/polyOverP=> i; rewrite coef_deriv rpredMn ?Kp.
Qed.
Lemma derivC c : c%:P^`() = 0.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (polyC c)) (GRing.zero poly_zmodType) *)
by apply/polyP=> i; rewrite coef_deriv coef0 coefC mul0rn.
Qed.
Lemma derivX : ('X)^`() = 1.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv polyX) (GRing.one poly_ringType) *)
by apply/polyP=> [[|i]]; rewrite coef_deriv coef1 coefX ?mul0rn.
Qed.
Lemma derivXn n : 'X^n^`() = 'X^n.-1 *+ n.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.exp poly_ringType polyX n)) (@GRing.natmul (GRing.Ring.zmodType poly_ringType) (@GRing.exp poly_ringType polyX (Nat.pred n)) n) *)
case: n => [|n]; first exact: derivC.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.exp poly_ringType polyX (S n))) (@GRing.natmul (GRing.Ring.zmodType poly_ringType) (@GRing.exp poly_ringType polyX (Nat.pred (S n))) (S n)) *)
apply/polyP=> i; rewrite coef_deriv coefMn !coefXn eqSS.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i n))) (S i)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (Nat.pred (S n))))) (S n)) *)
by case: eqP => [-> // | _]; rewrite !mul0rn.
Qed.
Fact deriv_is_linear : linear deriv.
Proof.
(* Goal: @GRing.Linear.axiom R poly_lmodType poly_zmodType (@GRing.scale R poly_lmodType) deriv (@GRing.Scale.scale_law R poly_lmodType) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))) (@GRing.scale R poly_lmodType)) *)
move=> k p q; apply/polyP=> i.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (deriv (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType))) (@GRing.scale R poly_lmodType k p) q))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add poly_zmodType (@GRing.scale R poly_lmodType k (deriv p)) (deriv q))) i) *)
by rewrite !(coef_deriv, coefD, coefZ) mulrnDl mulrnAr.
Qed.
Canonical deriv_additive := Additive deriv_is_linear.
Canonical deriv_linear := Linear deriv_is_linear.
Lemma deriv0 : 0^`() = 0.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (GRing.zero poly_zmodType)) (GRing.zero poly_zmodType) *)
exact: linear0.
Qed.
Lemma derivD : {morph deriv : p q / p + q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) deriv (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) *)
exact: linearD.
Qed.
Lemma derivN : {morph deriv : p / - p}.
Proof.
(* Goal: @morphism_1 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) deriv (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType p) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType p) *)
exact: linearN.
Qed.
Lemma derivB : {morph deriv : p q / p - q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) deriv (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p (@GRing.opp poly_zmodType q)) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p (@GRing.opp poly_zmodType q)) *)
exact: linearB.
Qed.
Lemma derivXsubC (a : R) : ('X - a%:P)^`() = 1.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.add poly_zmodType polyX (@GRing.opp poly_zmodType (polyC a)))) (GRing.one poly_ringType) *)
by rewrite derivB derivX derivC subr0.
Qed.
Lemma derivMn n p : (p *+ n)^`() = p^`() *+ n.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.natmul poly_zmodType p n)) (@GRing.natmul poly_zmodType (deriv p) n) *)
exact: linearMn.
Qed.
Lemma derivMNn n p : (p *- n)^`() = p^`() *- n.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType p n))) (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType (deriv p) n)) *)
exact: linearMNn.
Qed.
Lemma derivZ c p : (c *: p)^`() = c *: p^`().
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.scale R poly_lmodType c p)) (@GRing.scale R poly_lmodType c (deriv p)) *)
by rewrite linearZ.
Qed.
Lemma deriv_mulC c p : (c%:P * p)^`() = c%:P * p^`().
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.mul poly_ringType (polyC c) p)) (@GRing.mul poly_ringType (polyC c) (deriv p)) *)
by rewrite !mul_polyC derivZ.
Qed.
Lemma derivMXaddC p c : (p * 'X + c%:P)^`() = p + p^`() * 'X.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c))) (@GRing.add poly_zmodType p (@GRing.mul poly_ringType (deriv p) polyX)) *)
apply/polyP=> i; rewrite raddfD /= derivC addr0 coefD !(coefMX, coef_deriv).
(* Goal: @eq (GRing.Ring.sort R) (@GRing.natmul (GRing.Ring.zmodType R) (if @eq_op nat_eqType (S i) O then GRing.zero (GRing.Ring.zmodType R) else @nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (Nat.pred (S i))) (S i)) (@GRing.add (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) i) (if @eq_op nat_eqType i O then GRing.zero (GRing.Ring.zmodType R) else @GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (S (Nat.pred i))) (S (Nat.pred i)))) *)
by case: i; rewrite ?addr0.
Qed.
Lemma derivM p q : (p * q)^`() = p^`() * q + p * q^`().
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.mul poly_ringType p q)) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType (deriv p) q) (@GRing.mul poly_ringType p (deriv q))) *)
elim/poly_ind: p => [|p b IHp]; first by rewrite !(mul0r, add0r, derivC).
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (deriv (@GRing.mul poly_ringType (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC b)) q)) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType (deriv (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC b))) q) (@GRing.mul poly_ringType (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC b)) (deriv q))) *)
rewrite mulrDl -mulrA -commr_polyX mulrA -[_ * 'X]addr0 raddfD /= !derivMXaddC.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.add poly_zmodType (@GRing.add poly_zmodType (@GRing.mul poly_ringType p q) (@GRing.mul poly_ringType (deriv (@GRing.mul poly_ringType p q)) polyX)) (deriv (@GRing.mul poly_ringType (polyC b) q))) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType (@GRing.add poly_zmodType p (@GRing.mul poly_ringType (deriv p) polyX)) q) (@GRing.mul poly_ringType (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC b)) (deriv q))) *)
by rewrite deriv_mulC IHp !mulrDl -!mulrA !commr_polyX !addrA.
Qed.
Definition derivE := Eval lazy beta delta [morphism_2 morphism_1] in
(derivZ, deriv_mulC, derivC, derivX, derivMXaddC, derivXsubC, derivM, derivB,
derivD, derivN, derivXn, derivM, derivMn).
Definition derivn n p := iter n deriv p.
Local Notation "a ^` ( n )" := (derivn n a) : ring_scope.
Lemma derivn0 p : p^`(0) = p.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn O p) p *)
by [].
Qed.
Lemma derivn1 p : p^`(1) = p^`().
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn (S O) p) (deriv p) *)
by [].
Qed.
Lemma derivnS p n : p^`(n.+1) = p^`(n)^`().
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn (S n) p) (deriv (derivn n p)) *)
by [].
Qed.
Lemma derivSn p n : p^`(n.+1) = p^`()^`(n).
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn (S n) p) (derivn n (deriv p)) *)
exact: iterSr.
Qed.
Lemma coef_derivn n p i : p^`(n)`_i = p`_(n + i) *+ (n + i) ^_ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (derivn n p)) i) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (addn n i)) (falling_factorial (addn n i) n)) *)
elim: n i => [|n IHn] i; first by rewrite ffactn0 mulr1n.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (derivn (S n) p)) i) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (addn (S n) i)) (falling_factorial (addn (S n) i) (S n))) *)
by rewrite derivnS coef_deriv IHn -mulrnA ffactnSr addSnnS addKn.
Qed.
Lemma polyOver_derivn S (ringS : semiringPred S) (kS : keyed_pred ringS) :
{in polyOver kS, forall p n, p^`(n) \is a polyOver kS}.
Proof.
(* Goal: @prop_in1 (@poly_of R (Phant (GRing.Ring.sort R))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => forall n : nat, is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))))) (inPhantom (forall (p : @poly_of R (Phant (GRing.Ring.sort R))) (n : nat), is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))))) *)
move=> p /polyOverP Kp /= n; apply/polyOverP=> i.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (derivn n p)) i) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) *)
by rewrite coef_derivn rpredMn.
Qed.
Fact derivn_is_linear n : linear (derivn n).
Proof.
(* Goal: @GRing.Linear.axiom R poly_lmodType poly_zmodType (@GRing.scale R poly_lmodType) (derivn n) (@GRing.Scale.scale_law R poly_lmodType) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))) (@GRing.scale R poly_lmodType)) *)
by elim: n => // n IHn a p q; rewrite derivnS IHn linearP.
Qed.
Canonical derivn_additive n := Additive (derivn_is_linear n).
Canonical derivn_linear n := Linear (derivn_is_linear n).
Lemma derivnC c n : c%:P^`(n) = if n == 0%N then c%:P else 0.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n (polyC c)) (if @eq_op nat_eqType n O then polyC c else GRing.zero poly_zmodType) *)
by case: n => // n; rewrite derivSn derivC linear0.
Qed.
Lemma derivnD n : {morph derivn n : p q / p + q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) *)
exact: linearD.
Qed.
Lemma derivn_sub n : {morph derivn n : p q / p - q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p (@GRing.opp poly_zmodType q)) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p (@GRing.opp poly_zmodType q)) *)
exact: linearB.
Qed.
Lemma derivnMn n m p : (p *+ m)^`(n) = p^`(n) *+ m.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n (@GRing.natmul poly_zmodType p m)) (@GRing.natmul poly_zmodType (derivn n p) m) *)
exact: linearMn.
Qed.
Lemma derivnMNn n m p : (p *- m)^`(n) = p^`(n) *- m.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType p m))) (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType (derivn n p) m)) *)
exact: linearMNn.
Qed.
Lemma derivnN n : {morph derivn n : p / - p}.
Proof.
(* Goal: @morphism_1 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType p) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType p) *)
exact: linearN.
Qed.
Lemma derivnZ n : scalable (derivn n).
Proof.
(* Goal: @GRing.Linear.mixin_of R poly_lmodType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType))) (@GRing.scale R poly_lmodType) (derivn n) *)
exact: linearZZ.
Qed.
Lemma derivnXn m n : 'X^m^`(n) = 'X^(m - n) *+ m ^_ n.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n (@GRing.exp poly_ringType polyX m)) (@GRing.natmul (GRing.Ring.zmodType poly_ringType) (@GRing.exp poly_ringType polyX (subn m n)) (falling_factorial m n)) *)
apply/polyP=>i; rewrite coef_derivn coefMn !coefXn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (falling_factorial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (falling_factorial m n)) *)
case: (ltnP m n) => [lt_m_n | le_m_n].
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (falling_factorial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (falling_factorial m n)) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (falling_factorial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (falling_factorial m n)) *)
by rewrite eqn_leq leqNgt ltn_addr // mul0rn ffact_small.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (falling_factorial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (falling_factorial m n)) *)
by rewrite -{1 3}(subnKC le_m_n) eqn_add2l; case: eqP => [->|]; rewrite ?mul0rn.
Qed.
Lemma derivnMXaddC n p c :
(p * 'X + c%:P)^`(n.+1) = p^`(n) *+ n.+1 + p^`(n.+1) * 'X.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn (S n) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c))) (@GRing.add poly_zmodType (@GRing.natmul poly_zmodType (derivn n p) (S n)) (@GRing.mul poly_ringType (derivn (S n) p) polyX)) *)
elim: n => [|n IHn]; first by rewrite derivn1 derivMXaddC.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn (S (S n)) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType p polyX) (polyC c))) (@GRing.add poly_zmodType (@GRing.natmul poly_zmodType (derivn (S n) p) (S (S n))) (@GRing.mul poly_ringType (derivn (S (S n)) p) polyX)) *)
rewrite derivnS IHn derivD derivM derivX mulr1 derivMn -!derivnS.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.add poly_zmodType (@GRing.natmul poly_zmodType (derivn (S n) p) (S n)) (@GRing.add (GRing.Ring.zmodType poly_ringType) (@GRing.mul poly_ringType (derivn (S (S n)) p) polyX) (derivn (S n) p))) (@GRing.add poly_zmodType (@GRing.natmul poly_zmodType (derivn (S n) p) (S (S n))) (@GRing.mul poly_ringType (derivn (S (S n)) p) polyX)) *)
by rewrite addrA addrAC -mulrSr.
Qed.
Lemma derivn_poly0 p n : size p <= n -> p^`(n) = 0.
Proof.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) n), @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n p) (GRing.zero poly_zmodType) *)
move=> le_p_n; apply/polyP=> i; rewrite coef_derivn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (addn n i)) (falling_factorial (addn n i) n)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (GRing.zero poly_zmodType)) i) *)
rewrite nth_default; first by rewrite mul0rn coef0.
(* Goal: is_true (leq (@size (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@polyseq R p)) (addn n i)) *)
by apply: leq_trans le_p_n _; apply leq_addr.
Qed.
Lemma lt_size_deriv (p : {poly R}) : p != 0 -> size p^`() < size p.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op poly_eqType p (GRing.zero poly_zmodType))), is_true (leq (S (@size (GRing.Ring.sort R) (@polyseq R (deriv p)))) (@size (GRing.Ring.sort R) (@polyseq R p))) *)
by move=> /polySpred->; apply: size_poly.
Qed.
Definition nderivn n p := \poly_(i < size p - n) (p`_(n + i) *+ 'C(n + i, n)).
Local Notation "a ^`N ( n )" := (nderivn n a) : ring_scope.
Lemma coef_nderivn n p i : p^`N(n)`_i = p`_(n + i) *+ 'C(n + i, n).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (nderivn n p)) i) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (addn n i)) (binomial (addn n i) n)) *)
rewrite coef_poly ltn_subRL; case: leqP => // le_p_ni.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (addn n i)) (binomial (addn n i) n)) *)
by rewrite nth_default ?mul0rn.
Qed.
Lemma nderivn_def n p : p^`(n) = p^`N(n) *+ n`!.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (derivn n p) (@GRing.natmul poly_zmodType (nderivn n p) (factorial n)) *)
by apply/polyP=> i; rewrite coefMn coef_nderivn coef_derivn -mulrnA bin_ffact.
Qed.
Lemma polyOver_nderivn S (ringS : semiringPred S) (kS : keyed_pred ringS) :
{in polyOver kS, forall p n, p^`N(n) \in polyOver kS}.
Proof.
(* Goal: @prop_in1 (@poly_of R (Phant (GRing.Ring.sort R))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => forall n : nat, is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))))) (inPhantom (forall (p : @poly_of R (Phant (GRing.Ring.sort R))) (n : nat), is_true (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (polyOver (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))))) *)
move=> p /polyOverP Sp /= n; apply/polyOverP=> i.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (nderivn n p)) i) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) *)
by rewrite coef_nderivn rpredMn.
Qed.
Lemma nderivn0 p : p^`N(0) = p.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn O p) p *)
by rewrite -[p^`N(0)](nderivn_def 0).
Qed.
Lemma nderivn1 p : p^`N(1) = p^`().
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn (S O) p) (deriv p) *)
by rewrite -[p^`N(1)](nderivn_def 1).
Qed.
Lemma nderivnC c n : (c%:P)^`N(n) = if n == 0%N then c%:P else 0.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n (polyC c)) (if @eq_op nat_eqType n O then polyC c else GRing.zero poly_zmodType) *)
apply/polyP=> i; rewrite coef_nderivn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (polyC c)) (addn n i)) (binomial (addn n i) n)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (if @eq_op nat_eqType n O then polyC c else GRing.zero poly_zmodType)) i) *)
by case: n => [|n]; rewrite ?bin0 // coef0 coefC mul0rn.
Qed.
Lemma nderivnXn m n : 'X^m^`N(n) = 'X^(m - n) *+ 'C(m, n).
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n (@GRing.exp poly_ringType polyX m)) (@GRing.natmul (GRing.Ring.zmodType poly_ringType) (@GRing.exp poly_ringType polyX (subn m n)) (binomial m n)) *)
apply/polyP=> i; rewrite coef_nderivn coefMn !coefXn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (binomial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (binomial m n)) *)
have [lt_m_n | le_n_m] := ltnP m n.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (binomial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (binomial m n)) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (binomial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (binomial m n)) *)
by rewrite eqn_leq leqNgt ltn_addr // mul0rn bin_small.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (addn n i) m))) (binomial (addn n i) n)) (@GRing.natmul (GRing.Ring.zmodType R) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType i (subn m n)))) (binomial m n)) *)
by rewrite -{1 3}(subnKC le_n_m) eqn_add2l; case: eqP => [->|]; rewrite ?mul0rn.
Qed.
Fact nderivn_is_linear n : linear (nderivn n).
Proof.
(* Goal: @GRing.Linear.axiom R poly_lmodType poly_zmodType (@GRing.scale R poly_lmodType) (nderivn n) (@GRing.Scale.scale_law R poly_lmodType) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType)))) (@GRing.scale R poly_lmodType)) *)
move=> k p q; apply/polyP=> i.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (nderivn n (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType))) (@GRing.scale R poly_lmodType k p) q))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add poly_zmodType (@GRing.scale R poly_lmodType k (nderivn n p)) (nderivn n q))) i) *)
by rewrite !(coef_nderivn, coefD, coefZ) mulrnDl mulrnAr.
Qed.
Canonical nderivn_additive n := Additive(nderivn_is_linear n).
Canonical nderivn_linear n := Linear (nderivn_is_linear n).
Lemma nderivnD n : {morph nderivn n : p q / p + q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p q) *)
exact: linearD.
Qed.
Lemma nderivnB n : {morph nderivn n : p q / p - q}.
Proof.
(* Goal: @morphism_2 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p (@GRing.opp poly_zmodType q)) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.add poly_zmodType p (@GRing.opp poly_zmodType q)) *)
exact: linearB.
Qed.
Lemma nderivnMn n m p : (p *+ m)^`N(n) = p^`N(n) *+ m.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n (@GRing.natmul poly_zmodType p m)) (@GRing.natmul poly_zmodType (nderivn n p) m) *)
exact: linearMn.
Qed.
Lemma nderivnMNn n m p : (p *- m)^`N(n) = p^`N(n) *- m.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType p m))) (@GRing.opp poly_zmodType (@GRing.natmul poly_zmodType (nderivn n p) m)) *)
exact: linearMNn.
Qed.
Lemma nderivnN n : {morph nderivn n : p / - p}.
Proof.
(* Goal: @morphism_1 (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType p) (fun p : @poly_of R (Phant (GRing.Ring.sort R)) => @GRing.opp poly_zmodType p) *)
exact: linearN.
Qed.
Lemma nderivnZ n : scalable (nderivn n).
Proof.
(* Goal: @GRing.Linear.mixin_of R poly_lmodType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) poly_lmodType) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) poly_lmodType))) (@GRing.scale R poly_lmodType) (nderivn n) *)
exact: linearZZ.
Qed.
Lemma nderivnMXaddC n p c :
(p * 'X + c%:P)^`N(n.+1) = p^`N(n) + p^`N(n.+1) * 'X.
Lemma nderivn_poly0 p n : size p <= n -> p^`N(n) = 0.
Proof.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) n), @eq (@poly_of R (Phant (GRing.Ring.sort R))) (nderivn n p) (GRing.zero poly_zmodType) *)
move=> le_p_n; apply/polyP=> i; rewrite coef_nderivn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (addn n i)) (binomial (addn n i) n)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (GRing.zero poly_zmodType)) i) *)
rewrite nth_default; first by rewrite mul0rn coef0.
(* Goal: is_true (leq (@size (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@polyseq R p)) (addn n i)) *)
by apply: leq_trans le_p_n _; apply leq_addr.
Qed.
Lemma nderiv_taylor p x h :
GRing.comm x h -> p.[x + h] = \sum_(i < size p) p^`N(i).[x] * h ^+ i.
Lemma nderiv_taylor_wide n p x h :
GRing.comm x h -> size p <= n ->
Proof.
(* Goal: forall (_ : @GRing.comm R x h) (_ : is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) n)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (horner p (@GRing.add (GRing.Ring.zmodType R) x h)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (horner (nderivn (@nat_of_ord n i) p) x) (@GRing.exp R h (@nat_of_ord n i))))) *)
move/nderiv_taylor=> -> le_p_n.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (horner (nderivn (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i) p) x) (@GRing.exp R h (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (horner (nderivn (@nat_of_ord n i) p) x) (@GRing.exp R h (@nat_of_ord n i))))) *)
rewrite (big_ord_widen n (fun i => p^`N(i).[x] * h ^+ i)) // big_mkcond.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Ring.sort R) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Ring.sort R) (Finite.sort (ordinal_finType n)) i (@Monoid.operator (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (GRing.add_monoid (GRing.Ring.zmodType R))) true (if leq (S (@nat_of_ord n i)) (@size (GRing.Ring.sort R) (@polyseq R p)) then @GRing.mul R (horner (nderivn (@nat_of_ord n i) p) x) (@GRing.exp R h (@nat_of_ord n i)) else GRing.zero (GRing.Ring.zmodType R)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal n) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (horner (nderivn (@nat_of_ord n i) p) x) (@GRing.exp R h (@nat_of_ord n i))))) *)
apply: eq_bigr => i _; case: leqP => // /nderivn_poly0->.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@GRing.mul R (horner (GRing.zero poly_zmodType) x) (@GRing.exp R h (@nat_of_ord n i))) *)
by rewrite horner0 simp.
Qed.
End PolynomialTheory.
Prenex Implicits polyC polyCK Poly polyseqK lead_coef root horner polyOver.
Arguments monic {R}.
Notation "\poly_ ( i < n ) E" := (poly n (fun i => E)) : ring_scope.
Notation "c %:P" := (polyC c) : ring_scope.
Notation "'X" := (polyX _) : ring_scope.
Notation "''X^' n" := ('X ^+ n) : ring_scope.
Notation "p .[ x ]" := (horner p x) : ring_scope.
Notation "n .-unity_root" := (root_of_unity n) : ring_scope.
Notation "n .-primitive_root" := (primitive_root_of_unity n) : ring_scope.
Notation "a ^` ()" := (deriv a) : ring_scope.
Notation "a ^` ( n )" := (derivn n a) : ring_scope.
Notation "a ^`N ( n )" := (nderivn n a) : ring_scope.
Arguments monicP {R p}.
Arguments rootP {R p x}.
Arguments rootPf {R p x}.
Arguments rootPt {R p x}.
Arguments unity_rootP {R n z}.
Arguments polyOverP {R S0 addS kS p}.
Arguments polyC_inj {R} [x1 x2] eq_x12P.
Canonical polynomial_countZmodType (R : countRingType) :=
[countZmodType of polynomial R].
Canonical poly_countZmodType (R : countRingType) := [countZmodType of {poly R}].
Canonical polynomial_countRingType (R : countRingType) :=
[countRingType of polynomial R].
Canonical poly_countRingType (R : countRingType) := [countRingType of {poly R}].
Section MapPoly.
Section Definitions.
Variables (aR rR : ringType) (f : aR -> rR).
Definition map_poly (p : {poly aR}) := \poly_(i < size p) f p`_i.
Lemma map_polyE p : map_poly p = Poly (map f p).
Definition commr_rmorph u := forall x, GRing.comm u (f x).
Definition horner_morph u of commr_rmorph u := fun p => (map_poly p).[u].
End Definitions.
Variables aR rR : ringType.
Section Combinatorial.
Variables (iR : ringType) (f : aR -> rR).
Local Notation "p ^f" := (map_poly f p) : ring_scope.
Lemma map_poly0 : 0^f = 0.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR f (GRing.zero (poly_zmodType aR))) (GRing.zero (poly_zmodType rR)) *)
by rewrite map_polyE polyseq0.
Qed.
Lemma eq_map_poly (g : aR -> rR) : f =1 g -> map_poly f =1 map_poly g.
Proof.
(* Goal: forall _ : @eqfun (GRing.Ring.sort rR) (GRing.Ring.sort aR) f g, @eqfun (@poly_of rR (Phant (GRing.Ring.sort rR))) (@poly_of aR (Phant (GRing.Ring.sort aR))) (@map_poly aR rR f) (@map_poly aR rR g) *)
by move=> eq_fg p; rewrite !map_polyE (eq_map eq_fg).
Qed.
Lemma map_poly_id g (p : {poly iR}) :
{in (p : seq iR), g =1 id} -> map_poly g p = p.
Proof.
(* Goal: forall _ : @prop_in1 (Equality.sort (GRing.Ring.eqType iR)) (@mem (Equality.sort (GRing.Ring.eqType iR)) (seq_predType (GRing.Ring.eqType iR)) (@polyseq iR p : list (GRing.Ring.sort iR))) (fun x : Equality.sort (GRing.Ring.eqType iR) => @eq (Equality.sort (GRing.Ring.eqType iR)) (g x) ((fun x0 : Equality.sort (GRing.Ring.eqType iR) => x0) x)) (inPhantom (@eqfun (Equality.sort (GRing.Ring.eqType iR)) (Equality.sort (GRing.Ring.eqType iR)) g (fun x : Equality.sort (GRing.Ring.eqType iR) => x))), @eq (@poly_of iR (Phant (GRing.Ring.sort iR))) (@map_poly iR iR g p) p *)
by move=> g_id; rewrite map_polyE map_id_in ?polyseqK.
Qed.
Lemma coef_map_id0 p i : f 0 = 0 -> (p^f)`_i = f p`_i.
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort rR) (f (GRing.zero (GRing.Ring.zmodType aR))) (GRing.zero (GRing.Ring.zmodType rR)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR f p)) i) (f (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.zero (GRing.Ring.zmodType aR)) (@polyseq aR p) i)) *)
by move=> f0; rewrite coef_poly; case: ltnP => // le_p_i; rewrite nth_default.
Qed.
Lemma map_Poly_id0 s : f 0 = 0 -> (Poly s)^f = Poly (map f s).
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort rR) (f (GRing.zero (GRing.Ring.zmodType aR))) (GRing.zero (GRing.Ring.zmodType rR)), @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR f (@Poly aR s)) (@Poly rR (@map (GRing.Ring.sort aR) (GRing.Ring.sort rR) f s)) *)
move=> f0; apply/polyP=> j; rewrite coef_map_id0 ?coef_Poly //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (f (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.zero (GRing.Ring.zmodType aR)) s j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@map (GRing.Ring.sort aR) (GRing.Ring.sort rR) f s) j) *)
have [/(nth_map 0 0)->// | le_s_j] := ltnP j (size s).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (f (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.zero (GRing.Ring.zmodType aR)) s j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@map (GRing.Ring.sort aR) (GRing.Ring.sort rR) f s) j) *)
by rewrite !nth_default ?size_map.
Qed.
Lemma map_poly_comp_id0 (g : iR -> aR) p :
f 0 = 0 -> map_poly (f \o g) p = (map_poly g p)^f.
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort rR) (f (GRing.zero (GRing.Ring.zmodType aR))) (GRing.zero (GRing.Ring.zmodType rR)), @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly iR rR (@funcomp (GRing.Ring.sort rR) (GRing.Ring.sort aR) (GRing.Ring.sort iR) tt f g) p) (@map_poly aR rR f (@map_poly iR aR g p)) *)
by move=> f0; rewrite map_polyE map_comp -map_Poly_id0 -?map_polyE.
Qed.
Lemma size_map_poly_id0 p : f (lead_coef p) != 0 -> size p^f = size p.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType rR) (f (@lead_coef aR p)) (GRing.zero (GRing.Ring.zmodType rR)))), @eq nat (@size (GRing.Ring.sort rR) (@polyseq rR (@map_poly aR rR f p))) (@size (GRing.Ring.sort aR) (@polyseq aR p)) *)
by move=> nz_fp; apply: size_poly_eq.
Qed.
Lemma map_poly_eq0_id0 p : f (lead_coef p) != 0 -> (p^f == 0) = (p == 0).
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType rR) (f (@lead_coef aR p)) (GRing.zero (GRing.Ring.zmodType rR)))), @eq bool (@eq_op (poly_eqType rR) (@map_poly aR rR f p) (GRing.zero (poly_zmodType rR))) (@eq_op (poly_eqType aR) p (GRing.zero (poly_zmodType aR))) *)
by rewrite -!size_poly_eq0 => /size_map_poly_id0->.
Qed.
Lemma lead_coef_map_id0 p :
f 0 = 0 -> f (lead_coef p) != 0 -> lead_coef p^f = f (lead_coef p).
Proof.
(* Goal: forall (_ : @eq (GRing.Ring.sort rR) (f (GRing.zero (GRing.Ring.zmodType aR))) (GRing.zero (GRing.Ring.zmodType rR))) (_ : is_true (negb (@eq_op (GRing.Ring.eqType rR) (f (@lead_coef aR p)) (GRing.zero (GRing.Ring.zmodType rR))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@lead_coef rR (@map_poly aR rR f p)) (f (@lead_coef aR p)) *)
by move=> f0 nz_fp; rewrite lead_coefE coef_map_id0 ?size_map_poly_id0.
Qed.
Hypotheses (inj_f : injective f) (f_0 : f 0 = 0).
Lemma size_map_inj_poly p : size p^f = size p.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort rR) (@polyseq rR (@map_poly aR rR f p))) (@size (GRing.Ring.sort aR) (@polyseq aR p)) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite map_poly0 !size_poly0.
(* Goal: @eq nat (@size (GRing.Ring.sort rR) (@polyseq rR (@map_poly aR rR f p))) (@size (GRing.Ring.sort aR) (@polyseq aR p)) *)
by rewrite size_map_poly_id0 // -f_0 (inj_eq inj_f) lead_coef_eq0.
Qed.
Lemma map_inj_poly : injective (map_poly f).
Lemma lead_coef_map_inj p : lead_coef p^f = f (lead_coef p).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@lead_coef rR (@map_poly aR rR f p)) (f (@lead_coef aR p)) *)
by rewrite !lead_coefE size_map_inj_poly coef_map_id0.
Qed.
End Combinatorial.
Lemma map_polyK (f : aR -> rR) g :
cancel g f -> f 0 = 0 -> cancel (map_poly g) (map_poly f).
Proof.
(* Goal: forall (_ : @cancel (GRing.Ring.sort aR) (GRing.Ring.sort rR) g f) (_ : @eq (GRing.Ring.sort rR) (f (GRing.zero (GRing.Ring.zmodType aR))) (GRing.zero (GRing.Ring.zmodType rR))), @cancel (@poly_of aR (Phant (GRing.Ring.sort aR))) (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly rR aR g) (@map_poly aR rR f) *)
by move=> gK f_0 p; rewrite /= -map_poly_comp_id0 ?map_poly_id // => x _ //=.
Qed.
Section Additive.
Variables (iR : ringType) (f : {additive aR -> rR}).
Local Notation "p ^f" := (map_poly (GRing.Additive.apply f) p) : ring_scope.
Lemma coef_map p i : p^f`_i = f p`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) i) (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.zero (GRing.Ring.zmodType aR)) (@polyseq aR p) i)) *)
exact: coef_map_id0 (raddf0 f).
Qed.
Lemma map_Poly s : (Poly s)^f = Poly (map f s).
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@Poly aR s)) (@Poly rR (@map (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) s)) *)
exact: map_Poly_id0 (raddf0 f).
Qed.
Lemma map_poly_comp (g : iR -> aR) p :
map_poly (f \o g) p = map_poly f (map_poly g p).
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly iR rR (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Ring.sort iR) tt (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) g) p) (@map_poly aR rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@map_poly iR aR g p)) *)
exact: map_poly_comp_id0 (raddf0 f).
Qed.
Fact map_poly_is_additive : additive (map_poly f).
Proof.
(* Goal: @GRing.Additive.axiom (poly_zmodType aR) (poly_zmodType rR) (@map_poly aR rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f)) *)
by move=> p q; apply/polyP=> i; rewrite !(coef_map, coefB) raddfB.
Qed.
Canonical map_poly_additive := Additive map_poly_is_additive.
Lemma map_polyC a : (a%:P)^f = (f a)%:P.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@polyC aR a)) (@polyC rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f a)) *)
by apply/polyP=> i; rewrite !(coef_map, coefC) -!mulrb raddfMn.
Qed.
Lemma lead_coef_map_eq p :
f (lead_coef p) != 0 -> lead_coef p^f = f (lead_coef p).
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType rR)) (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@lead_coef aR p)) (GRing.zero (GRing.Ring.zmodType rR)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@lead_coef rR (@map_poly aR rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@lead_coef aR p)) *)
exact: lead_coef_map_id0 (raddf0 f).
Qed.
End Additive.
Variable f : {rmorphism aR -> rR}.
Implicit Types p : {poly aR}.
Local Notation "p ^f" := (map_poly (GRing.RMorphism.apply f) p) : ring_scope.
Fact map_poly_is_rmorphism : rmorphism (map_poly f).
Proof.
(* Goal: @GRing.RMorphism.class_of (poly_ringType aR) (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f)) *)
split; first exact: map_poly_is_additive.
(* Goal: @GRing.RMorphism.mixin_of (poly_ringType aR) (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f)) *)
split=> [p q|]; apply/polyP=> i; last first.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.mul (poly_ringType aR) p q))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@GRing.mul (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q))) i) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (GRing.one (poly_ringType aR)))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (GRing.one (poly_ringType rR))) i) *)
by rewrite !(coef_map, coef1) /= rmorph_nat.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.mul (poly_ringType aR) p q))) i) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@GRing.mul (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q))) i) *)
rewrite coef_map /= !coefM /= !rmorph_sum; apply: eq_bigr => j _.
(* Goal: @eq (GRing.Ring.sort rR) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@GRing.mul aR (@nth (GRing.Ring.sort aR) (GRing.zero (GRing.Ring.zmodType aR)) (@polyseq aR p) (@nat_of_ord (S i) j)) (@nth (GRing.Ring.sort aR) (GRing.zero (GRing.Ring.zmodType aR)) (@polyseq aR q) (subn i (@nat_of_ord (S i) j))))) (@GRing.mul rR (@nth (GRing.Ring.sort rR) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) (@nat_of_ord (S i) j)) (@nth (GRing.Ring.sort rR) (GRing.zero (GRing.Ring.zmodType rR)) (@polyseq rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q)) (subn i (@nat_of_ord (S i) j)))) *)
by rewrite !coef_map rmorphM.
Qed.
Canonical map_poly_rmorphism := RMorphism map_poly_is_rmorphism.
Lemma map_polyZ c p : (c *: p)^f = f c *: p^f.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.scale aR (poly_lmodType aR) c p)) (@GRing.scale rR (poly_lmodType rR) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f c) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) *)
by apply/polyP=> i; rewrite !(coef_map, coefZ) /= rmorphM.
Qed.
Canonical map_poly_linear :=
AddLinear (map_polyZ : scalable_for (f \; *:%R) (map_poly f)).
Canonical map_poly_lrmorphism := [lrmorphism of map_poly f].
Lemma map_polyX : ('X)^f = 'X.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (polyX aR)) (polyX rR) *)
by apply/polyP=> i; rewrite coef_map !coefX /= rmorph_nat.
Qed.
Lemma map_polyXn n : ('X^n)^f = 'X^n.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.exp (poly_ringType aR) (polyX aR) n)) (@GRing.exp (poly_ringType rR) (polyX rR) n) *)
by rewrite rmorphX /= map_polyX.
Qed.
Lemma monic_map p : p \is monic -> p^f \is monic.
Proof.
(* Goal: forall _ : is_true (@in_mem (@poly_of aR (Phant (GRing.Ring.sort aR))) p (@mem (@poly_of aR (Phant (GRing.Ring.sort aR))) (predPredType (@poly_of aR (Phant (GRing.Ring.sort aR)))) (@has_quality O (@poly_of aR (Phant (GRing.Ring.sort aR))) (@monic aR)))), is_true (@in_mem (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@mem (@poly_of rR (Phant (GRing.Ring.sort rR))) (predPredType (@poly_of rR (Phant (GRing.Ring.sort rR)))) (@has_quality O (@poly_of rR (Phant (GRing.Ring.sort rR))) (@monic rR)))) *)
move/monicP=> mon_p; rewrite monicE.
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType rR)) (@lead_coef rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) (GRing.one rR)) *)
by rewrite lead_coef_map_eq mon_p /= rmorph1 ?oner_neq0.
Qed.
Lemma horner_map p x : p^f.[f x] = f p.[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@horner aR p x)) *)
elim/poly_ind: p => [|p c IHp]; first by rewrite !(rmorph0, horner0).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.add (GRing.Ring.zmodType (poly_ringType aR)) (@GRing.mul (poly_ringType aR) p (polyX aR)) (@polyC aR c))) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@horner aR (@GRing.add (GRing.Ring.zmodType (poly_ringType aR)) (@GRing.mul (poly_ringType aR) p (polyX aR)) (@polyC aR c)) x)) *)
rewrite hornerMXaddC !rmorphD !rmorphM /=.
(* Goal: @eq (GRing.Ring.sort rR) (@horner rR (@GRing.add (GRing.Ring.zmodType (poly_ringType rR)) (@GRing.mul (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (polyX aR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@polyC aR c))) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x)) (@GRing.add (GRing.Ring.zmodType rR) (@GRing.mul rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f (@horner aR p x)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f c)) *)
by rewrite map_polyX map_polyC hornerMXaddC IHp.
Qed.
Lemma map_comm_poly p x : comm_poly p x -> comm_poly p^f (f x).
Proof.
(* Goal: forall _ : @comm_poly aR p x, @comm_poly rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x) *)
by rewrite /comm_poly horner_map -!rmorphM // => ->.
Qed.
Lemma map_comm_coef p x : comm_coef p x -> comm_coef p^f (f x).
Proof.
(* Goal: forall _ : @comm_coef aR p x, @comm_coef rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x) *)
by move=> cpx i; rewrite coef_map -!rmorphM ?cpx.
Qed.
Lemma rmorph_root p x : root p x -> root p^f (f x).
Proof.
(* Goal: forall _ : is_true (@root aR p x), is_true (@root rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f x)) *)
by move/eqP=> px0; rewrite rootE horner_map px0 rmorph0.
Qed.
Lemma rmorph_unity_root n z : n.-unity_root z -> n.-unity_root (f z).
Proof.
(* Goal: forall _ : is_true (@root_of_unity aR n z), is_true (@root_of_unity rR n (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f z)) *)
move/rmorph_root; rewrite rootE rmorphB hornerD hornerN.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType rR)) (@GRing.add (GRing.Ring.zmodType rR) (@horner rR (@GRing.RMorphism.apply (poly_ringType aR) (poly_ringType rR) (Phant (forall _ : GRing.Ring.sort (poly_ringType aR), GRing.Ring.sort (poly_ringType rR))) map_poly_rmorphism (@GRing.exp (poly_ringType aR) (polyX aR) n)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f z)) (@GRing.opp (GRing.Ring.zmodType rR) (@horner rR (@GRing.RMorphism.apply (poly_ringType aR) (poly_ringType rR) (Phant (forall _ : GRing.Ring.sort (poly_ringType aR), GRing.Ring.sort (poly_ringType rR))) map_poly_rmorphism (GRing.one (poly_ringType aR))) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f z)))) (GRing.zero (GRing.Ring.zmodType rR))), is_true (@root_of_unity rR n (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f z)) *)
by rewrite /= map_polyXn rmorph1 hornerC hornerXn subr_eq0 unity_rootE.
Qed.
Section HornerMorph.
Variable u : rR.
Hypothesis cfu : commr_rmorph f u.
Lemma horner_morphC a : horner_morph cfu a%:P = f a.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@horner_morph aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) u cfu (@polyC aR a)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f a) *)
by rewrite /horner_morph map_polyC hornerC.
Qed.
Lemma horner_morphX : horner_morph cfu 'X = u.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@horner_morph aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) u cfu (polyX aR)) u *)
by rewrite /horner_morph map_polyX hornerX.
Qed.
Fact horner_is_lrmorphism : lrmorphism_for (f \; *%R) (horner_morph cfu).
Proof.
(* Goal: @GRing.LRMorphism.class_of aR (poly_lalgType aR) rR (@catcomp (forall _ : GRing.Ring.sort rR, GRing.Ring.sort rR) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) tt (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.mul rR)) (@horner_morph aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) u cfu) *)
rewrite /horner_morph; split=> [|c p]; last by rewrite linearZ hornerZ.
(* Goal: @GRing.RMorphism.class_of (@GRing.Lalgebra.ringType aR (Phant (GRing.Ring.sort aR)) (poly_lalgType aR)) rR (fun p : @poly_of aR (Phant (GRing.Ring.sort aR)) => @horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) u) *)
split=> [p q|]; first by rewrite /horner_morph rmorphB hornerD hornerN.
(* Goal: @GRing.RMorphism.mixin_of (@GRing.Lalgebra.ringType aR (Phant (GRing.Ring.sort aR)) (poly_lalgType aR)) rR (fun p : @poly_of aR (Phant (GRing.Ring.sort aR)) => @horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) u) *)
split=> [p q|]; last by rewrite /horner_morph rmorph1 hornerC.
(* Goal: @eq (GRing.Ring.sort rR) (@horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.mul (@GRing.Lalgebra.ringType aR (Phant (GRing.Ring.sort aR)) (poly_lalgType aR)) p q)) u) (@GRing.mul rR (@horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) u) (@horner rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q) u)) *)
rewrite /horner_morph rmorphM /= hornerM_comm //.
(* Goal: @comm_poly rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q) u *)
by apply: comm_coef_poly => i; rewrite coef_map cfu.
Qed.
Canonical horner_additive := Additive horner_is_lrmorphism.
Canonical horner_rmorphism := RMorphism horner_is_lrmorphism.
Canonical horner_linear := AddLinear horner_is_lrmorphism.
Canonical horner_lrmorphism := [lrmorphism of horner_morph cfu].
End HornerMorph.
Lemma deriv_map p : p^f^`() = (p^`())^f.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@deriv rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@deriv aR p)) *)
by apply/polyP => i; rewrite !(coef_map, coef_deriv) //= rmorphMn.
Qed.
Lemma derivn_map p n : p^f^`(n) = (p^`(n))^f.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@derivn rR n (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@derivn aR n p)) *)
by apply/polyP => i; rewrite !(coef_map, coef_derivn) //= rmorphMn.
Qed.
Lemma nderivn_map p n : p^f^`N(n) = (p^`N(n))^f.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@nderivn rR n (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@nderivn aR n p)) *)
by apply/polyP => i; rewrite !(coef_map, coef_nderivn) //= rmorphMn.
Qed.
End MapPoly.
Section MorphPoly.
Variable (aR rR : ringType) (pf : {rmorphism {poly aR} -> rR}).
Lemma poly_morphX_comm : commr_rmorph (pf \o polyC) (pf 'X).
Proof.
(* Goal: @commr_rmorph aR rR (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType aR))) (GRing.Ring.sort aR) tt (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf) (@polyC aR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf (polyX aR)) *)
by move=> a; rewrite /GRing.comm /= -!rmorphM // commr_polyX.
Qed.
Lemma poly_initial : pf =1 horner_morph poly_morphX_comm.
Proof.
(* Goal: @eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType aR))) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf) (@horner_morph aR rR (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType aR))) (GRing.Ring.sort aR) tt (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf) (@polyC aR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf (polyX aR)) poly_morphX_comm) *)
apply: poly_ind => [|p a IHp]; first by rewrite !rmorph0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf (@GRing.add (GRing.Ring.zmodType (poly_ringType aR)) (@GRing.mul (poly_ringType aR) p (polyX aR)) (@polyC aR a))) (@horner_morph aR rR (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType aR))) (GRing.Ring.sort aR) tt (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf) (@polyC aR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) pf (polyX aR)) poly_morphX_comm (@GRing.add (GRing.Ring.zmodType (poly_ringType aR)) (@GRing.mul (poly_ringType aR) p (polyX aR)) (@polyC aR a))) *)
by rewrite !rmorphD !rmorphM /= -{}IHp horner_morphC ?horner_morphX.
Qed.
End MorphPoly.
Notation "p ^:P" := (map_poly polyC p) : ring_scope.
Section PolyCompose.
Variable R : ringType.
Implicit Types p q : {poly R}.
Definition comp_poly q p := p^:P.[q].
Local Notation "p \Po q" := (comp_poly q p) : ring_scope.
Lemma size_map_polyC p : size p^:P = size p.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort (poly_ringType R)) (@polyseq (poly_ringType R) (@map_poly R (poly_ringType R) (@polyC R) p))) (@size (GRing.Ring.sort R) (@polyseq R p)) *)
exact/(size_map_inj_poly polyC_inj).
Qed.
Lemma map_polyC_eq0 p : (p^:P == 0) = (p == 0).
Proof.
(* Goal: @eq bool (@eq_op (poly_eqType (poly_ringType R)) (@map_poly R (poly_ringType R) (@polyC R) p) (GRing.zero (poly_zmodType (poly_ringType R)))) (@eq_op (poly_eqType R) p (GRing.zero (poly_zmodType R))) *)
by rewrite -!size_poly_eq0 size_map_polyC.
Qed.
Lemma root_polyC p x : root p^:P x%:P = root p x.
Proof.
(* Goal: @eq bool (@root (poly_ringType R) (@map_poly R (poly_ringType R) (@polyC R) p) (@polyC R x)) (@root R p x) *)
by rewrite rootE horner_map polyC_eq0.
Qed.
Lemma comp_polyE p q : p \Po q = \sum_(i < size p) p`_i *: q^+i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly q p) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))))) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))))) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))))) true (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp (poly_ringType R) q (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))))) *)
by rewrite [p \Po q]horner_poly; apply: eq_bigr => i _; rewrite mul_polyC.
Qed.
Lemma coef_comp_poly p q n :
(p \Po q)`_n = \sum_(i < size p) p`_i * (q ^+ i)`_n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (comp_poly q p)) n) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (@size (GRing.Ring.sort R) (@polyseq R p)))) (fun i : ordinal (@size (GRing.Ring.sort R) (@polyseq R p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (@size (GRing.Ring.sort R) (@polyseq R p))) i (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.exp (poly_ringType R) q (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))) n)))) *)
by rewrite comp_polyE coef_sum; apply: eq_bigr => i; rewrite coefZ.
Qed.
Lemma polyOver_comp S (ringS : semiringPred S) (kS : keyed_pred ringS) :
{in polyOver kS &, forall p q, p \Po q \in polyOver kS}.
Proof.
(* Goal: @prop_in2 (@poly_of R (Phant (GRing.Ring.sort R))) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))) (fun p q : @poly_of R (Phant (GRing.Ring.sort R)) => is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly q p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))))) (inPhantom (forall p q : @poly_of R (Phant (GRing.Ring.sort R)), is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly q p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality (Datatypes.S O) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))))))) *)
move=> p q /polyOverP Sp Sq; rewrite comp_polyE rpred_sum // => i _.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp (poly_ringType R) q (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (@has_quality (Datatypes.S O) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) (@GRing.Pred.add_key (GRing.Ring.zmodType (poly_ringType R)) (@has_quality (Datatypes.S O) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) (@polyOver_addrPred R S (@GRing.Pred.semiring_add R S ringS) kS)) (@keyed_qualifier_keyed (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (Datatypes.S O) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)) (@GRing.Pred.add_key (GRing.Ring.zmodType (poly_ringType R)) (@has_quality (Datatypes.S O) (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (@polyOver R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS))) (@polyOver_addrPred R S (@GRing.Pred.semiring_add R S ringS) kS)) (@polyOver_keyed R (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType R)) S (@GRing.Pred.add_key (GRing.Ring.zmodType R) S (@GRing.Pred.semiring_add R S ringS)) kS)))))) *)
by rewrite polyOverZ ?rpredX.
Qed.
Lemma comp_polyCr p c : p \Po c%:P = p.[c]%:P.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (@polyC R c) p) (@polyC R (@horner R p c)) *)
exact: horner_map.
Qed.
Lemma comp_poly0r p : p \Po 0 = (p`_0)%:P.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (GRing.zero (poly_zmodType R)) p) (@polyC R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) O)) *)
by rewrite comp_polyCr horner_coef0.
Qed.
Lemma comp_polyC c p : c%:P \Po p = c%:P.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly p (@polyC R c)) (@polyC R c) *)
by rewrite /(_ \Po p) map_polyC hornerC.
Qed.
Fact comp_poly_is_linear p : linear (comp_poly p).
Proof.
(* Goal: @GRing.Linear.axiom R (poly_lmodType R) (GRing.Ring.zmodType (poly_ringType R)) (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (comp_poly p) (@GRing.Scale.scale_law R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R))) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))))) (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)))) *)
move=> a q r.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly p (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (poly_lmodType R)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (poly_lmodType R)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (poly_lmodType R)))) (@GRing.scale R (poly_lmodType R) a q) r)) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)) a (comp_poly p q)) (comp_poly p r)) *)
by rewrite /comp_poly rmorphD /= map_polyZ !hornerE_comm mul_polyC.
Qed.
Canonical comp_poly_additive p := Additive (comp_poly_is_linear p).
Canonical comp_poly_linear p := Linear (comp_poly_is_linear p).
Lemma comp_poly0 p : 0 \Po p = 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly p (GRing.zero (poly_zmodType R))) (GRing.zero (GRing.Ring.zmodType (poly_ringType R))) *)
exact: raddf0.
Qed.
Lemma comp_polyD p q r : (p + q) \Po r = (p \Po r) + (q \Po r).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly r (@GRing.add (poly_zmodType R) p q)) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (comp_poly r p) (comp_poly r q)) *)
exact: raddfD.
Qed.
Lemma comp_polyB p q r : (p - q) \Po r = (p \Po r) - (q \Po r).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly r (@GRing.add (poly_zmodType R) p (@GRing.opp (poly_zmodType R) q))) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (comp_poly r p) (@GRing.opp (GRing.Ring.zmodType (poly_ringType R)) (comp_poly r q))) *)
exact: raddfB.
Qed.
Lemma comp_polyZ c p q : (c *: p) \Po q = c *: (p \Po q).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly q (@GRing.scale R (poly_lmodType R) c p)) (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)) c (comp_poly q p)) *)
exact: linearZZ.
Qed.
Lemma comp_polyXr p : p \Po 'X = p.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (polyX R) p) p *)
by rewrite -{2}/(idfun p) poly_initial.
Qed.
Lemma comp_polyX p : 'X \Po p = p.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly p (polyX R)) p *)
by rewrite /(_ \Po p) map_polyX hornerX.
Qed.
Lemma comp_poly_MXaddC c p q : (p * 'X + c%:P) \Po q = (p \Po q) * q + c%:P.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly q (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@GRing.mul (poly_ringType R) p (polyX R)) (@polyC R c))) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@GRing.mul (poly_ringType R) (comp_poly q p) q) (@polyC R c)) *)
by rewrite /(_ \Po q) rmorphD rmorphM /= map_polyX map_polyC hornerMXaddC.
Qed.
Lemma comp_polyXaddC_K p z : (p \Po ('X + z%:P)) \Po ('X - z%:P) = p.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R z))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z)) p)) p *)
have addzK: ('X + z%:P) \Po ('X - z%:P) = 'X.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R z))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z)) p)) p *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R z))) (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z))) (polyX R) *)
by rewrite raddfD /= comp_polyC comp_polyX subrK.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R z))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z)) p)) p *)
elim/poly_ind: p => [|p c IHp]; first by rewrite !comp_poly0.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R z))) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z)) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@GRing.mul (poly_ringType R) p (polyX R)) (@polyC R c)))) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@GRing.mul (poly_ringType R) p (polyX R)) (@polyC R c)) *)
rewrite comp_poly_MXaddC linearD /= comp_polyC {1}/comp_poly rmorphM /=.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@horner (poly_ringType R) (@GRing.mul (poly_ringType (poly_ringType R)) (@map_poly R (poly_ringType R) (@polyC R) (comp_poly (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z)) p)) (@map_poly R (poly_ringType R) (@polyC R) (@GRing.add (poly_zmodType R) (polyX R) (@polyC R z)))) (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R z)))) (@polyC R c)) (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@GRing.mul (poly_ringType R) p (polyX R)) (@polyC R c)) *)
by rewrite hornerM_comm /comm_poly -!/(_ \Po _) ?IHp ?addzK ?commr_polyX.
Qed.
Lemma size_comp_poly_leq p q :
size (p \Po q) <= ((size p).-1 * (size q).-1).+1.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (comp_poly q p))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
rewrite comp_polyE (leq_trans (size_sum _ _ _)) //; apply/bigmax_leqP => i _.
(* Goal: is_true (leq (@size (GRing.Ring.sort R) (@polyseq R (@GRing.scale R (@GRing.Lalgebra.lmod_ringType R (Phant (GRing.Ring.sort R)) (poly_lalgType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i)) (@GRing.exp (poly_ringType R) q (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
rewrite (leq_trans (size_scale_leq _ _)) // (leq_trans (size_exp_leq _ _)) //.
(* Goal: is_true (leq (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R q))) (@nat_of_ord (@size (GRing.Ring.sort R) (@polyseq R p)) i))) (S (muln (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R q)))))) *)
by rewrite ltnS mulnC leq_mul // -{2}(subnKC (valP i)) leq_addr.
Qed.
End PolyCompose.
Notation "p \Po q" := (comp_poly q p) : ring_scope.
Lemma map_comp_poly (aR rR : ringType) (f : {rmorphism aR -> rR}) p q :
map_poly f (p \Po q) = map_poly f p \Po map_poly f q.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@comp_poly aR q p)) (@comp_poly rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) *)
elim/poly_ind: p => [|p a IHp]; first by rewrite !raddf0.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@comp_poly aR q (@GRing.add (GRing.Ring.zmodType (poly_ringType aR)) (@GRing.mul (poly_ringType aR) p (polyX aR)) (@polyC aR a)))) (@comp_poly rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@GRing.add (GRing.Ring.zmodType (poly_ringType aR)) (@GRing.mul (poly_ringType aR) p (polyX aR)) (@polyC aR a)))) *)
rewrite comp_poly_MXaddC !rmorphD !rmorphM /= !map_polyC map_polyX.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@GRing.add (GRing.Ring.zmodType (poly_ringType rR)) (@GRing.mul (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@comp_poly aR q p)) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q)) (@polyC rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) (@GRing.RMorphism.additive aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) a))) (@comp_poly rR (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) q) (@GRing.add (GRing.Ring.zmodType (poly_ringType rR)) (@GRing.mul (poly_ringType rR) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p) (polyX rR)) (@polyC rR (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) (@GRing.RMorphism.additive aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) a)))) *)
by rewrite comp_poly_MXaddC -IHp.
Qed.
Section PolynomialComRing.
Variable R : comRingType.
Implicit Types p q : {poly R}.
Fact poly_mul_comm p q : p * q = q * p.
Proof.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p q) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) q p) *)
apply/polyP=> i; rewrite coefM coefMr.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) p) (@nat_of_ord (S i) j)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) q) (subn i (@nat_of_ord (S i) j)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (Finite.sort (ordinal_finType (S i))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (index_enum (ordinal_finType (S i))) (fun j : ordinal (S i) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (ordinal (S i)) j (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType R))) true (@GRing.mul (GRing.ComRing.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) q) (subn i (@nat_of_ord (S i) j))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@polyseq (GRing.ComRing.ringType R) p) (@nat_of_ord (S i) j))))) *)
by apply: eq_bigr => j _; rewrite mulrC.
Qed.
Canonical poly_comRingType := Eval hnf in ComRingType {poly R} poly_mul_comm.
Canonical polynomial_comRingType :=
Eval hnf in ComRingType (polynomial R) poly_mul_comm.
Canonical poly_algType := Eval hnf in CommAlgType R {poly R}.
Canonical polynomial_algType :=
Eval hnf in [algType R of polynomial R for poly_algType].
Lemma hornerM p q x : (p * q).[x] = p.[x] * q.[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@horner (GRing.ComRing.ringType R) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p q) x) (@GRing.mul (GRing.ComRing.ringType R) (@horner (GRing.ComRing.ringType R) p x) (@horner (GRing.ComRing.ringType R) q x)) *)
by rewrite hornerM_comm //; apply: mulrC.
Qed.
Lemma horner_exp p x n : (p ^+ n).[x] = p.[x] ^+ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@horner (GRing.ComRing.ringType R) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) p n) x) (@GRing.exp (GRing.ComRing.ringType R) (@horner (GRing.ComRing.ringType R) p x) n) *)
by rewrite horner_exp_comm //; apply: mulrC.
Qed.
Lemma horner_prod I r (P : pred I) (F : I -> {poly R}) x :
(\prod_(i <- r | P i) F i).[x] = \prod_(i <- r | P i) (F i).[x].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@horner (GRing.ComRing.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType R))) I (GRing.one (poly_ringType (GRing.ComRing.ringType R))) r (fun i : I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType R))) I i (@GRing.mul (poly_ringType (GRing.ComRing.ringType R))) (P i) (F i))) x) (@BigOp.bigop (GRing.Ring.sort (GRing.ComRing.ringType R)) I (GRing.one (GRing.ComRing.ringType R)) r (fun i : I => @BigBody (GRing.Ring.sort (GRing.ComRing.ringType R)) I i (@GRing.mul (GRing.ComRing.ringType R)) (P i) (@horner (GRing.ComRing.ringType R) (F i) x))) *)
by elim/big_rec2: _ => [|i _ p _ <-]; rewrite (hornerM, hornerC).
Qed.
Definition hornerE :=
(hornerD, hornerN, hornerX, hornerC, horner_cons,
simp, hornerCM, hornerZ, hornerM).
Definition horner_eval (x : R) := horner^~ x.
Fact horner_eval_is_lrmorphism x : lrmorphism_for *%R (horner_eval x).
Proof.
(* Goal: @GRing.LRMorphism.class_of (GRing.ComRing.ringType R) (poly_lalgType (GRing.ComRing.ringType R)) (GRing.ComRing.ringType R) (@GRing.mul (GRing.ComRing.ringType R)) (horner_eval x) *)
have cxid: commr_rmorph idfun x by apply: mulrC.
(* Goal: @GRing.LRMorphism.class_of (GRing.ComRing.ringType R) (poly_lalgType (GRing.ComRing.ringType R)) (GRing.ComRing.ringType R) (@GRing.mul (GRing.ComRing.ringType R)) (horner_eval x) *)
have evalE : horner_eval x =1 horner_morph cxid.
(* Goal: @GRing.LRMorphism.class_of (GRing.ComRing.ringType R) (poly_lalgType (GRing.ComRing.ringType R)) (GRing.ComRing.ringType R) (@GRing.mul (GRing.ComRing.ringType R)) (horner_eval x) *)
(* Goal: @eqfun (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R)))) (horner_eval x) (@horner_morph (GRing.ComRing.ringType R) (GRing.ComRing.ringType R) (@id_head (GRing.Ring.sort (GRing.ComRing.ringType R)) tt) x cxid) *)
by move=> p; congr _.[x]; rewrite map_poly_id.
(* Goal: @GRing.LRMorphism.class_of (GRing.ComRing.ringType R) (poly_lalgType (GRing.ComRing.ringType R)) (GRing.ComRing.ringType R) (@GRing.mul (GRing.ComRing.ringType R)) (horner_eval x) *)
split=> [|c p]; last by rewrite !evalE /= -linearZ.
(* Goal: @GRing.RMorphism.class_of (@GRing.Lalgebra.ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (poly_lalgType (GRing.ComRing.ringType R))) (GRing.ComRing.ringType R) (horner_eval x) *)
by do 2?split=> [p q|]; rewrite !evalE (rmorphB, rmorphM, rmorph1).
Qed.
Canonical horner_eval_additive x := Additive (horner_eval_is_lrmorphism x).
Canonical horner_eval_rmorphism x := RMorphism (horner_eval_is_lrmorphism x).
Canonical horner_eval_linear x := AddLinear (horner_eval_is_lrmorphism x).
Canonical horner_eval_lrmorphism x := [lrmorphism of horner_eval x].
Fact comp_poly_multiplicative q : multiplicative (comp_poly q).
Proof.
(* Goal: @GRing.RMorphism.mixin_of (poly_ringType (GRing.ComRing.ringType R)) (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) q) *)
split=> [p1 p2|]; last by rewrite comp_polyC.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType R))) (@comp_poly (GRing.ComRing.ringType R) q (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p1 p2)) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) q p1) (@comp_poly (GRing.ComRing.ringType R) q p2)) *)
by rewrite /comp_poly rmorphM hornerM_comm //; apply: mulrC.
Qed.
Canonical comp_poly_rmorphism q := AddRMorphism (comp_poly_multiplicative q).
Canonical comp_poly_lrmorphism q := [lrmorphism of comp_poly q].
Lemma comp_polyM p q r : (p * q) \Po r = (p \Po r) * (q \Po r).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@comp_poly (GRing.ComRing.ringType R) r (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p q)) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) r p) (@comp_poly (GRing.ComRing.ringType R) r q)) *)
exact: rmorphM.
Qed.
Lemma comp_polyA p q r : p \Po (q \Po r) = (p \Po q) \Po r.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@comp_poly (GRing.ComRing.ringType R) (@comp_poly (GRing.ComRing.ringType R) r q) p) (@comp_poly (GRing.ComRing.ringType R) r (@comp_poly (GRing.ComRing.ringType R) q p)) *)
elim/poly_ind: p => [|p c IHp]; first by rewrite !comp_polyC.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R)))) (@comp_poly (GRing.ComRing.ringType R) (@comp_poly (GRing.ComRing.ringType R) r q) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p (polyX (GRing.ComRing.ringType R))) (@polyC (GRing.ComRing.ringType R) c))) (@comp_poly (GRing.ComRing.ringType R) r (@comp_poly (GRing.ComRing.ringType R) q (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p (polyX (GRing.ComRing.ringType R))) (@polyC (GRing.ComRing.ringType R) c)))) *)
by rewrite !comp_polyD !comp_polyM !comp_polyX IHp !comp_polyC.
Qed.
Lemma horner_comp p q x : (p \Po q).[x] = p.[q.[x]].
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType R))) (@horner (GRing.ComRing.ringType R) (@comp_poly (GRing.ComRing.ringType R) q p) x) (@horner (GRing.ComRing.ringType R) p (@horner (GRing.ComRing.ringType R) q x)) *)
by apply: polyC_inj; rewrite -!comp_polyCr comp_polyA.
Qed.
Lemma root_comp p q x : root (p \Po q) x = root p (q.[x]).
Proof.
(* Goal: @eq bool (@root (GRing.ComRing.ringType R) (@comp_poly (GRing.ComRing.ringType R) q p) x) (@root (GRing.ComRing.ringType R) p (@horner (GRing.ComRing.ringType R) q x)) *)
by rewrite !rootE horner_comp.
Qed.
Lemma deriv_comp p q : (p \Po q) ^`() = (p ^`() \Po q) * q^`().
Proof.
(* Goal: @eq (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R)))) (@deriv (GRing.ComRing.ringType R) (@comp_poly (GRing.ComRing.ringType R) q p)) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) q (@deriv (GRing.ComRing.ringType R) p)) (@deriv (GRing.ComRing.ringType R) q)) *)
elim/poly_ind: p => [|p c IHp]; first by rewrite !(deriv0, comp_poly0) mul0r.
(* Goal: @eq (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R)))) (@deriv (GRing.ComRing.ringType R) (@comp_poly (GRing.ComRing.ringType R) q (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p (polyX (GRing.ComRing.ringType R))) (@polyC (GRing.ComRing.ringType R) c)))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) q (@deriv (GRing.ComRing.ringType R) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) p (polyX (GRing.ComRing.ringType R))) (@polyC (GRing.ComRing.ringType R) c)))) (@deriv (GRing.ComRing.ringType R) q)) *)
rewrite comp_poly_MXaddC derivD derivC derivM IHp derivMXaddC comp_polyD.
(* Goal: @eq (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R)))) (@GRing.add (poly_zmodType (GRing.ComRing.ringType R)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) q (@deriv (GRing.ComRing.ringType R) p)) (@deriv (GRing.ComRing.ringType R) q)) q) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@comp_poly (GRing.ComRing.ringType R) q p) (@deriv (GRing.ComRing.ringType R) q))) (GRing.zero (poly_zmodType (GRing.ComRing.ringType R)))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@comp_poly (GRing.ComRing.ringType R) q p) (@comp_poly (GRing.ComRing.ringType R) q (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@deriv (GRing.ComRing.ringType R) p) (polyX (GRing.ComRing.ringType R))))) (@deriv (GRing.ComRing.ringType R) q)) *)
by rewrite comp_polyM comp_polyX addr0 addrC mulrAC -mulrDl.
Qed.
Lemma deriv_exp p n : (p ^+ n)^`() = p^`() * p ^+ n.-1 *+ n.
Proof.
(* Goal: @eq (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R)))) (@deriv (GRing.ComRing.ringType R) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) p n)) (@GRing.natmul (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@deriv (GRing.ComRing.ringType R) p) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) p (Nat.pred n))) n) *)
elim: n => [|n IHn]; first by rewrite expr0 mulr0n derivC.
(* Goal: @eq (@poly_of (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R)))) (@deriv (GRing.ComRing.ringType R) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) p (S n))) (@GRing.natmul (GRing.Ring.zmodType (poly_ringType (GRing.ComRing.ringType R))) (@GRing.mul (poly_ringType (GRing.ComRing.ringType R)) (@deriv (GRing.ComRing.ringType R) p) (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) p (Nat.pred (S n)))) (S n)) *)
by rewrite exprS derivM {}IHn (mulrC p) mulrnAl -mulrA -exprSr mulrS; case n.
Qed.
Definition derivCE := (derivE, deriv_exp).
End PolynomialComRing.
Canonical polynomial_countComRingType (R : countComRingType) :=
[countComRingType of polynomial R].
Canonical poly_countComRingType (R : countComRingType) :=
[countComRingType of {poly R}].
Section PolynomialIdomain.
Variable R : idomainType.
Implicit Types (a b x y : R) (p q r m : {poly R}).
Lemma size_mul p q : p != 0 -> q != 0 -> size (p * q) = (size p + size q).-1.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) q (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q))) (Nat.pred (addn (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
by move=> nz_p nz_q; rewrite -size_proper_mul ?mulf_neq0 ?lead_coef_eq0.
Qed.
Fact poly_idomainAxiom p q : p * q = 0 -> (p == 0) || (q == 0).
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))), is_true (orb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) q (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))) *)
move=> pq0; apply/norP=> [[p_nz q_nz]]; move/eqP: (size_mul p_nz q_nz).
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q))) (Nat.pred (addn (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))))), False *)
by rewrite eq_sym pq0 size_poly0 (polySpred p_nz) (polySpred q_nz) addnS.
Qed.
Definition poly_unit : pred {poly R} :=
fun p => (size p == 1%N) && (p`_0 \in GRing.unit).
Definition poly_inv p := if p \in poly_unit then (p`_0)^-1%:P else p.
Fact poly_mulVp : {in poly_unit, left_inverse 1 poly_inv *%R}.
Proof.
(* Goal: @prop_in1 (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (predPredType (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))) poly_unit) (fun x : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) => @eq (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (poly_inv x) x) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))))) (inPhantom (@left_inverse (@poly_of (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))))) (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) poly_inv (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))))) *)
move=> p Up; rewrite /poly_inv Up.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (@polyC (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@GRing.inv (GRing.IntegralDomain.unitRingType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) O))) p) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) *)
by case/andP: Up => /size_poly1P[c _ ->]; rewrite coefC -polyC_mul => /mulVr->.
Qed.
Fact poly_intro_unit p q : q * p = 1 -> p \in poly_unit.
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) q p) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))), is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) p (@mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (predPredType (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))) poly_unit)) *)
move=> pq1; apply/andP; split; last first.
(* Goal: is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) *)
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) O) (@mem (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R)) (@GRing.unit (GRing.IntegralDomain.unitRingType R))))) *)
apply/unitrP; exists q`_0.
(* Goal: is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) *)
(* Goal: and (@eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (@GRing.mul (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) O) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) O)) (GRing.one (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) (@eq (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))) (@GRing.mul (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) O) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) O)) (GRing.one (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)))) *)
by rewrite 2!mulrC -!/(coefp 0 _) -rmorphM pq1 rmorph1.
(* Goal: is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) *)
have: size (q * p) == 1%N by rewrite pq1 size_poly1.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) q p))) (S O)), is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite mulr0 size_poly0.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) q p))) (S O)), is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) *)
have [-> | nz_q] := eqVneq q 0; first by rewrite mul0r size_poly0.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) q p))) (S O)), is_true (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) *)
rewrite size_mul // (polySpred nz_p) (polySpred nz_q) addnS addSn !eqSS.
(* Goal: forall _ : is_true (@eq_op nat_eqType (addn (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) O), is_true (@eq_op nat_eqType (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) O) *)
by rewrite addn_eq0 => /andP[].
Qed.
Fact poly_inv_out : {in [predC poly_unit], poly_inv =1 id}.
Proof.
(* Goal: @prop_in1 (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (simplPredType (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))) (@predC (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@pred_of_simpl (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@pred_of_mem_pred (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (predPredType (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)))) poly_unit))))) (fun x : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) => @eq (@poly_of (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))))) (poly_inv x) ((fun x0 : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) => x0) x)) (inPhantom (@eqfun (@poly_of (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R))))) (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) poly_inv (fun x : @poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) => x))) *)
by rewrite /poly_inv => p /negbTE/= ->.
Qed.
Definition poly_comUnitMixin :=
ComUnitRingMixin poly_mulVp poly_intro_unit poly_inv_out.
Canonical poly_unitRingType :=
Eval hnf in UnitRingType {poly R} poly_comUnitMixin.
Canonical polynomial_unitRingType :=
Eval hnf in [unitRingType of polynomial R for poly_unitRingType].
Canonical poly_unitAlgType := Eval hnf in [unitAlgType R of {poly R}].
Canonical polynomial_unitAlgType := Eval hnf in [unitAlgType R of polynomial R].
Canonical poly_comUnitRingType := Eval hnf in [comUnitRingType of {poly R}].
Canonical polynomial_comUnitRingType :=
Eval hnf in [comUnitRingType of polynomial R].
Canonical poly_idomainType :=
Eval hnf in IdomainType {poly R} poly_idomainAxiom.
Canonical polynomial_idomainType :=
Eval hnf in [idomainType of polynomial R for poly_idomainType].
Lemma poly_unitE p :
(p \in GRing.unit) = (size p == 1%N) && (p`_0 \in GRing.unit).
Proof.
(* Goal: @eq bool (@in_mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) p (@mem (GRing.UnitRing.sort poly_unitRingType) (predPredType (GRing.UnitRing.sort poly_unitRingType)) (@has_quality (S O) (GRing.UnitRing.sort poly_unitRingType) (@GRing.unit poly_unitRingType)))) (andb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) O) (@mem (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R)) (predPredType (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R))) (@has_quality (S O) (GRing.UnitRing.sort (GRing.IntegralDomain.unitRingType R)) (@GRing.unit (GRing.IntegralDomain.unitRingType R)))))) *)
by [].
Qed.
Lemma poly_invE p : p ^-1 = if p \in GRing.unit then (p`_0)^-1%:P else p.
Proof.
(* Goal: @eq (GRing.UnitRing.sort poly_unitRingType) (@GRing.inv poly_unitRingType p) (if @in_mem (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) p (@mem (GRing.UnitRing.sort poly_unitRingType) (predPredType (GRing.UnitRing.sort poly_unitRingType)) (@has_quality (S O) (GRing.UnitRing.sort poly_unitRingType) (@GRing.unit poly_unitRingType))) then @polyC (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@GRing.inv (GRing.IntegralDomain.unitRingType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) O)) else p) *)
by [].
Qed.
Lemma polyC_inv c : c%:P^-1 = (c^-1)%:P.
Proof.
(* Goal: @eq (GRing.UnitRing.sort poly_unitRingType) (@GRing.inv poly_unitRingType (@polyC (GRing.IntegralDomain.ringType R) c)) (@polyC (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@GRing.inv (GRing.IntegralDomain.unitRingType R) c)) *)
have [/rmorphV-> // | nUc] := boolP (c \in GRing.unit).
(* Goal: @eq (GRing.UnitRing.sort poly_unitRingType) (@GRing.inv poly_unitRingType (@polyC (GRing.IntegralDomain.ringType R) c)) (@polyC (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType R)) (@GRing.inv (GRing.IntegralDomain.unitRingType R) c)) *)
by rewrite !invr_out // poly_unitE coefC (negbTE nUc) andbF.
Qed.
Lemma rootM p q x : root (p * q) x = root p x || root q x.
Proof.
(* Goal: @eq bool (@root (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q) x) (orb (@root (GRing.IntegralDomain.ringType R) p x) (@root (GRing.IntegralDomain.ringType R) q x)) *)
by rewrite !rootE hornerM mulf_eq0.
Qed.
Lemma rootZ x a p : a != 0 -> root (a *: p) x = root p x.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.IntegralDomain.eqType R) a (GRing.zero (GRing.IntegralDomain.zmodType R)))), @eq bool (@root (GRing.IntegralDomain.ringType R) (@GRing.scale (GRing.IntegralDomain.ringType R) (poly_lmodType (GRing.IntegralDomain.ringType R)) a p) x) (@root (GRing.IntegralDomain.ringType R) p x) *)
by move=> nz_a; rewrite -mul_polyC rootM rootC (negPf nz_a).
Qed.
Lemma size_scale a p : a != 0 -> size (a *: p) = size p.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.IntegralDomain.eqType R) a (GRing.zero (GRing.IntegralDomain.zmodType R)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.scale (GRing.IntegralDomain.ringType R) (poly_lmodType (GRing.IntegralDomain.ringType R)) a p))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) *)
by move/lregP/lreg_size->.
Qed.
Lemma size_Cmul a p : a != 0 -> size (a%:P * p) = size p.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.IntegralDomain.eqType R) a (GRing.zero (GRing.IntegralDomain.zmodType R)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R) a) p))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) *)
by rewrite mul_polyC => /size_scale->.
Qed.
Lemma lead_coefM p q : lead_coef (p * q) = lead_coef p * lead_coef q.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) (@lead_coef (GRing.IntegralDomain.ringType R) q)) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite !(mul0r, lead_coef0).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) (@lead_coef (GRing.IntegralDomain.ringType R) q)) *)
have [-> | nz_q] := eqVneq q 0; first by rewrite !(mulr0, lead_coef0).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) (@lead_coef (GRing.IntegralDomain.ringType R) q)) *)
by rewrite lead_coef_proper_mul // mulf_neq0 ?lead_coef_eq0.
Qed.
Lemma lead_coefZ a p : lead_coef (a *: p) = a * lead_coef p.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@GRing.scale (GRing.IntegralDomain.ringType R) (poly_lmodType (GRing.IntegralDomain.ringType R)) a p)) (@GRing.mul (GRing.IntegralDomain.ringType R) a (@lead_coef (GRing.IntegralDomain.ringType R) p)) *)
by rewrite -mul_polyC lead_coefM lead_coefC.
Qed.
Lemma scale_poly_eq0 a p : (a *: p == 0) = (a == 0) || (p == 0).
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (poly_lmodType (GRing.IntegralDomain.ringType R))) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (poly_lmodType (GRing.IntegralDomain.ringType R))) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (poly_lmodType (GRing.IntegralDomain.ringType R)))))) (@GRing.scale (GRing.IntegralDomain.ringType R) (poly_lmodType (GRing.IntegralDomain.ringType R)) a p) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (poly_lmodType (GRing.IntegralDomain.ringType R))) (@GRing.Lmodule.base (GRing.IntegralDomain.ringType R) (@GRing.Lmodule.sort (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (poly_lmodType (GRing.IntegralDomain.ringType R))) (@GRing.Lmodule.class (GRing.IntegralDomain.ringType R) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType R))) (poly_lmodType (GRing.IntegralDomain.ringType R))))))) (orb (@eq_op (GRing.IntegralDomain.eqType R) a (GRing.zero (GRing.IntegralDomain.zmodType R))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))) *)
by rewrite -mul_polyC mulf_eq0 polyC_eq0.
Qed.
Lemma size_prod (I : finType) (P : pred I) (F : I -> {poly R}) :
(forall i, P i -> F i != 0) ->
size (\prod_(i | P i) F i) = ((\sum_(i | P i) size (F i)).+1 - #|P|)%N.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) (F i) (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (subn (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))))) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) P))) *)
move=> nzF; transitivity (\sum_(i | P i) (size (F i)).-1).+1; last first.
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))))))) *)
(* Goal: @eq nat (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))))))) (subn (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))))) (@card I (@mem (Finite.sort I) (predPredType (Finite.sort I)) P))) *)
apply: canRL (addKn _) _; rewrite addnS -sum1_card -big_split /=.
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))))))) *)
(* Goal: @eq nat (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (@in_mem (Finite.sort I) i (@mem (Finite.sort I) (predPredType (Finite.sort I)) P)) (addn (S O) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))))))) (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))))) *)
by congr _.+1; apply: eq_bigr => i /nzF/polySpred.
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S (@BigOp.bigop nat (Finite.sort I) O (index_enum I) (fun i : Finite.sort I => @BigBody nat (Finite.sort I) i addn (P i) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))))))) *)
elim/big_rec2: _ => [|i d p /nzF nzFi IHp]; first by rewrite size_poly1.
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) (F i) p))) (S (addn (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))) d)) *)
by rewrite size_mul // -?size_poly_eq0 IHp // addnS polySpred.
Qed.
Lemma size_prod_seq (I : eqType) (s : seq I) (F : I -> {poly R}) :
(forall i, i \in s -> F i != 0) ->
size (\prod_(i <- s) F i) = ((\sum_(i <- s) size (F i)).+1 - size s)%N.
Proof.
(* Goal: forall _ : forall (i : Equality.sort I) (_ : is_true (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s))), is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) (F i) (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Equality.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) s (fun i : Equality.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Equality.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) true (F i))))) (subn (S (@BigOp.bigop nat (Equality.sort I) O s (fun i : Equality.sort I => @BigBody nat (Equality.sort I) i addn true (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))))) (@size (Equality.sort I) s)) *)
move=> nzF; rewrite big_tnth size_prod; last by move=> i; rewrite nzF ?mem_tnth.
(* Goal: @eq nat (subn (S (@BigOp.bigop nat (Finite.sort (ordinal_finType (@size (Equality.sort I) s))) O (index_enum (ordinal_finType (@size (Equality.sort I) s))) (fun i : Finite.sort (ordinal_finType (@size (Equality.sort I) s)) => @BigBody nat (Finite.sort (ordinal_finType (@size (Equality.sort I) s))) i addn true (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F (@tnth (@size (Equality.sort I) s) (Equality.sort I) (@in_tuple (Equality.sort I) s) i))))))) (@card (ordinal_finType (@size (Equality.sort I) s)) (@mem (Finite.sort (ordinal_finType (@size (Equality.sort I) s))) (predPredType (Finite.sort (ordinal_finType (@size (Equality.sort I) s)))) (fun _ : Finite.sort (ordinal_finType (@size (Equality.sort I) s)) => true)))) (subn (S (@BigOp.bigop nat (Equality.sort I) O s (fun i : Equality.sort I => @BigBody nat (Equality.sort I) i addn true (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i)))))) (@size (Equality.sort I) s)) *)
by rewrite cardT /= size_enum_ord [in RHS]big_tnth.
Qed.
Lemma size_mul_eq1 p q :
(size (p * q) == 1%N) = ((size p == 1%N) && (size q == 1%N)).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q))) (S O)) (andb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S O))) *)
have [->|pNZ] := eqVneq p 0; first by rewrite mul0r size_poly0.
(* Goal: @eq bool (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q))) (S O)) (andb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S O))) *)
have [->|qNZ] := eqVneq q 0; first by rewrite mulr0 size_poly0 andbF.
(* Goal: @eq bool (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R)) p q))) (S O)) (andb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S O))) *)
rewrite size_mul //.
(* Goal: @eq bool (@eq_op nat_eqType (Nat.pred (addn (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) (S O)) (andb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S O)) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S O))) *)
by move: pNZ qNZ; rewrite -!size_poly_gt0; (do 2 case: size) => //= n [|[|]].
Qed.
Lemma size_prod_seq_eq1 (I : eqType) (s : seq I) (P : pred I) (F : I -> {poly R}) :
reflect (forall i, P i && (i \in s) -> size (F i) = 1%N)
(size (\prod_(i <- s | P i) F i) == 1%N).
Proof.
(* Goal: Bool.reflect (forall (i : Equality.sort I) (_ : is_true (andb (P i) (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O)) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Equality.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) s (fun i : Equality.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Equality.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S O)) *)
have -> : (size (\prod_(i <- s | P i) F i) == 1%N) = (all [pred i | P i ==> (size (F i) == 1%N)] s).
(* Goal: Bool.reflect (forall (i : Equality.sort I) (_ : is_true (andb (P i) (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O)) (@all (Equality.sort I) (@pred_of_simpl (Equality.sort I) (@SimplPred (Equality.sort I) (fun i : Equality.sort I => implb (P i) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))))) s) *)
(* Goal: @eq bool (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Equality.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) s (fun i : Equality.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Equality.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S O)) (@all (Equality.sort I) (@pred_of_simpl (Equality.sort I) (@SimplPred (Equality.sort I) (fun i : Equality.sort I => implb (P i) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))))) s) *)
elim: s => [|a s IHs /=]; first by rewrite big_nil size_poly1.
(* Goal: Bool.reflect (forall (i : Equality.sort I) (_ : is_true (andb (P i) (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O)) (@all (Equality.sort I) (@pred_of_simpl (Equality.sort I) (@SimplPred (Equality.sort I) (fun i : Equality.sort I => implb (P i) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))))) s) *)
(* Goal: @eq bool (@eq_op nat_eqType (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (Equality.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (@cons (Equality.sort I) a s) (fun i : Equality.sort I => @BigBody (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (Equality.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S O)) (andb (implb (P a) (@eq_op nat_eqType (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F a))) (S O))) (@all (Equality.sort I) (@pred_of_simpl (Equality.sort I) (@SimplPred (Equality.sort I) (fun i : Equality.sort I => implb (P i) (@eq_op nat_eqType (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))))) s)) *)
by rewrite big_cons; case: (P a) => //=; rewrite size_mul_eq1 IHs.
(* Goal: Bool.reflect (forall (i : Equality.sort I) (_ : is_true (andb (P i) (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O)) (@all (Equality.sort I) (@pred_of_simpl (Equality.sort I) (@SimplPred (Equality.sort I) (fun i : Equality.sort I => implb (P i) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))))) s) *)
apply: (iffP allP) => /= [/(_ _ _)/implyP /(_ _)/eqP|] sF_eq1 i.
(* Goal: forall _ : is_true (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s)), is_true (implb (P i) (@eq_op nat_eqType (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))) *)
(* Goal: forall _ : is_true (andb (P i) (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s))), @eq nat (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O) *)
by move=> /andP[Pi si]; rewrite sF_eq1.
(* Goal: forall _ : is_true (@in_mem (Equality.sort I) i (@mem (Equality.sort I) (seq_predType I) s)), is_true (implb (P i) (@eq_op nat_eqType (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O))) *)
by move=> si; apply/implyP => Pi; rewrite sF_eq1 ?Pi.
Qed.
Lemma size_prod_eq1 (I : finType) (P : pred I) (F : I -> {poly R}) :
reflect (forall i, P i -> size (F i) = 1%N)
(size (\prod_(i | P i) F i) == 1%N).
Proof.
(* Goal: Bool.reflect (forall (i : Finite.sort I) (_ : is_true (P i)), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O)) (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (Finite.sort I) i (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) (P i) (F i))))) (S O)) *)
apply: (iffP (size_prod_seq_eq1 _ _ _)) => Hi i.
(* Goal: forall _ : is_true (andb (P i) (@in_mem (Equality.sort (Finite.eqType I)) i (@mem (Equality.sort (Finite.eqType I)) (seq_predType (Finite.eqType I)) (index_enum I)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O) *)
(* Goal: forall _ : is_true (P i), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O) *)
by move=> Pi; apply: Hi; rewrite Pi /= mem_index_enum.
(* Goal: forall _ : is_true (andb (P i) (@in_mem (Equality.sort (Finite.eqType I)) i (@mem (Equality.sort (Finite.eqType I)) (seq_predType (Finite.eqType I)) (index_enum I)))), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (F i))) (S O) *)
by rewrite mem_index_enum andbT; apply: Hi.
Qed.
Lemma size_exp p n : (size (p ^+ n)).-1 = ((size p).-1 * n)%N.
Proof.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p n)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) n) *)
elim: n => [|n IHn]; first by rewrite size_poly1 muln0.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p (S n))))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (S n)) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite exprS mul0r size_poly0.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p (S n))))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (S n)) *)
rewrite exprS size_mul ?expf_neq0 // mulnS -{}IHn.
(* Goal: @eq nat (Nat.pred (Nat.pred (addn (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p n)))))) (addn (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p n))))) *)
by rewrite polySpred // [size (p ^+ n)]polySpred ?expf_neq0 ?addnS.
Qed.
Lemma lead_coef_exp p n : lead_coef (p ^+ n) = lead_coef p ^+ n.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p n)) (@GRing.exp (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) n) *)
elim: n => [|n IHn]; first by rewrite !expr0 lead_coef1.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) p (S n))) (@GRing.exp (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) (S n)) *)
by rewrite !exprS lead_coefM IHn.
Qed.
Lemma root_prod_XsubC rs x :
root (\prod_(a <- rs) ('X - a%:P)) x = (x \in rs).
Proof.
(* Goal: @eq bool (@root (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) rs (fun a : GRing.Ring.sort (GRing.IntegralDomain.ringType R) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) a (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) true (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R)) (polyX (GRing.IntegralDomain.ringType R)) (@GRing.opp (poly_zmodType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R) a))))) x) (@in_mem (GRing.IntegralDomain.sort R) x (@mem (Equality.sort (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) (seq_predType (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) rs)) *)
elim: rs => [|a rs IHrs]; first by rewrite rootE big_nil hornerC oner_eq0.
(* Goal: @eq bool (@root (GRing.IntegralDomain.ringType R) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (GRing.one (poly_ringType (GRing.IntegralDomain.ringType R))) (@cons (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) a rs) (fun a : GRing.Ring.sort (GRing.IntegralDomain.ringType R) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.IntegralDomain.ringType R))) (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) a (@GRing.mul (poly_ringType (GRing.IntegralDomain.ringType R))) true (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R)) (polyX (GRing.IntegralDomain.ringType R)) (@GRing.opp (poly_zmodType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R) a))))) x) (@in_mem (GRing.IntegralDomain.sort R) x (@mem (Equality.sort (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) (seq_predType (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) (@cons (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) a rs))) *)
by rewrite big_cons rootM IHrs root_XsubC.
Qed.
Lemma root_exp_XsubC n a x : root (('X - a%:P) ^+ n.+1) x = (x == a).
Proof.
(* Goal: @eq bool (@root (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R)) (polyX (GRing.IntegralDomain.ringType R)) (@GRing.opp (poly_zmodType (GRing.IntegralDomain.ringType R)) (@polyC (GRing.IntegralDomain.ringType R) a))) (S n)) x) (@eq_op (GRing.IntegralDomain.eqType R) x a) *)
by rewrite rootE horner_exp expf_eq0 [_ == 0]root_XsubC.
Qed.
Lemma size_comp_poly p q :
(size (p \Po q)).-1 = ((size p).-1 * (size q).-1)%N.
Proof.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite comp_poly0 size_poly0.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
have [/size1_polyC-> | nc_q] := leqP (size q) 1.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) (@polyC (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) O)) p)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@polyC (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) O)))))) *)
by rewrite comp_polyCr !size_polyC -!sub1b -!subnS muln0.
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
have nz_q: q != 0 by rewrite -size_poly_eq0 -(subnKC nc_q).
(* Goal: @eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p)))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
rewrite mulnC comp_polyE (polySpred nz_p) /= big_ord_recr /= addrC.
(* Goal: @eq nat (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R)) (@GRing.scale (GRing.IntegralDomain.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) (poly_lalgType (GRing.IntegralDomain.ringType R))) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (@BigOp.bigop (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (GRing.zero (@GRing.Zmodule.Pack (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@GRing.Zmodule.Class (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@Choice.Class (polynomial (GRing.IntegralDomain.ringType R)) (polynomial_eqMixin (GRing.IntegralDomain.ringType R)) (polynomial_choiceMixin (GRing.IntegralDomain.ringType R))) (poly_zmodMixin (GRing.IntegralDomain.ringType R))))) (index_enum (ordinal_finType (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (fun i : ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) => @BigBody (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) i (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R))) true (@GRing.scale (GRing.IntegralDomain.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) (poly_lalgType (GRing.IntegralDomain.ringType R))) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i))))))))) (muln (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) q))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) *)
rewrite size_addl size_scale ?lead_coef_eq0 ?size_exp //=.
(* Goal: is_true (leq (S (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (GRing.zero (@GRing.Zmodule.Pack (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@GRing.Zmodule.Class (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@Choice.Class (polynomial (GRing.IntegralDomain.ringType R)) (polynomial_eqMixin (GRing.IntegralDomain.ringType R)) (polynomial_choiceMixin (GRing.IntegralDomain.ringType R))) (poly_zmodMixin (GRing.IntegralDomain.ringType R))))) (index_enum (ordinal_finType (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (fun i : ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) => @BigBody (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) i (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R))) true (@GRing.scale (GRing.IntegralDomain.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) (poly_lalgType (GRing.IntegralDomain.ringType R))) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)))))))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))))) *)
rewrite [X in _ < X]polySpred ?expf_neq0 // ltnS size_exp.
(* Goal: is_true (leq (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) (@BigOp.bigop (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (GRing.zero (@GRing.Zmodule.Pack (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@GRing.Zmodule.Class (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (@Choice.Class (polynomial (GRing.IntegralDomain.ringType R)) (polynomial_eqMixin (GRing.IntegralDomain.ringType R)) (polynomial_choiceMixin (GRing.IntegralDomain.ringType R))) (poly_zmodMixin (GRing.IntegralDomain.ringType R))))) (index_enum (ordinal_finType (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (fun i : ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) => @BigBody (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) (ordinal (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) i (@GRing.add (poly_zmodType (GRing.IntegralDomain.ringType R))) true (@GRing.scale (GRing.IntegralDomain.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) (poly_lalgType (GRing.IntegralDomain.ringType R))) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i))))))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
rewrite (leq_trans (size_sum _ _ _)) //; apply/bigmax_leqP => i _.
(* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.scale (GRing.IntegralDomain.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R)) (poly_lalgType (GRing.IntegralDomain.ringType R))) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i))))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
rewrite (leq_trans (size_scale_leq _ _)) // polySpred ?expf_neq0 //.
(* Goal: is_true (leq (S (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)))))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
by rewrite size_exp -(subnKC nc_q) ltn_pmul2l.
Qed.
Lemma lead_coef_comp p q : size q > 1 ->
lead_coef (p \Po q) = (lead_coef p) * lead_coef q ^+ (size p).-1.
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p)) (@GRing.mul (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) (@GRing.exp (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) q) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
move=> q_gt1; rewrite !lead_coefE coef_comp_poly size_comp_poly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (index_enum (ordinal_finType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (fun i : ordinal (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (ordinal (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) i (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) true (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) i)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) i))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (@GRing.exp (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
have [->|nz_p] := eqVneq p 0; first by rewrite size_poly0 big_ord0 coef0 mul0r.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (index_enum (ordinal_finType (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (fun i : ordinal (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (ordinal (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) i (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) true (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) i)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) i))) (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (@GRing.exp (GRing.IntegralDomain.ringType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
rewrite polySpred //= big_ord_recr /= big1 ?add0r => [|i _].
(* Goal: @eq (GRing.IntegralDomain.sort R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i))) (muln (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) q)))))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *)
(* Goal: @eq (GRing.IntegralDomain.sort R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (muln (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) q)))))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (@GRing.exp (GRing.IntegralDomain.ringType R) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) q) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) q)))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))))) *)
by rewrite -!lead_coefE -lead_coef_exp !lead_coefE size_exp mulnC.
(* Goal: @eq (GRing.IntegralDomain.sort R) (@GRing.mul (GRing.IntegralDomain.ringType R) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) p) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i)) (@nth (GRing.IntegralDomain.sort R) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@polyseq (GRing.IntegralDomain.ringType R) (@GRing.exp (poly_ringType (GRing.IntegralDomain.ringType R)) q (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i))) (muln (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) q)))))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) *)
rewrite [X in _ * X]nth_default ?mulr0 ?(leq_trans (size_exp_leq _ _)) //.
(* Goal: is_true (leq (S (muln (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))) (@nat_of_ord (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) i))) (muln (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) (Nat.pred (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) q))))) *)
by rewrite mulnC ltn_mul2r -subn1 subn_gt0 q_gt1 /=.
Qed.
Lemma comp_poly_eq0 p q : size q > 1 -> (p \Po q == 0) = (p == 0).
Proof.
(* Goal: forall _ : is_true (leq (S (S O)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))), @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))) (@comp_poly (GRing.IntegralDomain.ringType R) q p) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R))))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) *)
move=> sq_gt1; rewrite -!lead_coef_eq0 lead_coef_comp //.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@GRing.mul (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) p) (@GRing.exp (GRing.IntegralDomain.ringType R) (@lead_coef (GRing.IntegralDomain.ringType R) q) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R))) (@lead_coef (GRing.IntegralDomain.ringType R) p) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType R)))) *)
rewrite mulf_eq0 expf_eq0 !lead_coef_eq0 -[q == 0]size_poly_leq0.
(* Goal: @eq bool (orb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) (andb (leq (S O) (Nat.pred (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)))) (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) O))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) *)
by rewrite [_ <= 0]leqNgt (leq_ltn_trans _ sq_gt1) ?andbF ?orbF.
Qed.
Lemma size_comp_poly2 p q : size q = 2 -> size (p \Po q) = size p.
Proof.
(* Goal: forall _ : @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S (S O)), @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) *)
move=> sq2; have [->|pN0] := eqVneq p 0; first by rewrite comp_polyC.
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) (@comp_poly (GRing.IntegralDomain.ringType R) q p))) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) *)
by rewrite polySpred ?size_comp_poly ?comp_poly_eq0 ?sq2 // muln1 polySpred.
Qed.
Lemma comp_poly2_eq0 p q : size q = 2 -> (p \Po q == 0) = (p == 0).
Proof.
(* Goal: forall _ : @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)) (S (S O)), @eq bool (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R)))) (@comp_poly (GRing.IntegralDomain.ringType R) q p) (GRing.zero (GRing.Ring.zmodType (poly_ringType (GRing.IntegralDomain.ringType R))))) (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))) *)
by rewrite -!size_poly_eq0 => /size_comp_poly2->.
Qed.
Theorem max_poly_roots p rs :
p != 0 -> all (root p) rs -> uniq rs -> size rs < size p.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.IntegralDomain.ringType R)) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R)))))) (_ : is_true (@all (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@root (GRing.IntegralDomain.ringType R) p) rs)) (_ : is_true (@uniq (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) rs)), is_true (leq (S (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) rs)) (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p))) *)
elim: rs p => [p pn0 _ _ | r rs ihrs p pn0] /=; first by rewrite size_poly_gt0.
(* Goal: forall (_ : is_true (andb (@root (GRing.IntegralDomain.ringType R) p r) (@all (GRing.IntegralDomain.sort R) (@root (GRing.IntegralDomain.ringType R) p) rs))) (_ : is_true (andb (negb (@in_mem (GRing.IntegralDomain.sort R) r (@mem (GRing.IntegralDomain.sort R) (seq_predType (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) rs))) (@uniq (GRing.Ring.eqType (GRing.IntegralDomain.ringType R)) rs))), is_true (leq (S (S (@size (GRing.IntegralDomain.sort R) rs))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) *)
case/andP => rpr arrs /andP [rnrs urs]; case/factor_theorem: rpr => q epq.
(* Goal: is_true (leq (S (S (@size (GRing.IntegralDomain.sort R) rs))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) *)
case: (altP (q =P 0)) => [q0 | ?]; first by move: pn0; rewrite epq q0 mul0r eqxx.
(* Goal: is_true (leq (S (S (@size (GRing.IntegralDomain.sort R) rs))) (@size (GRing.IntegralDomain.sort R) (@polyseq (GRing.IntegralDomain.ringType R) p))) *)
have -> : size p = (size q).+1.
(* Goal: is_true (leq (S (S (@size (GRing.IntegralDomain.sort R) rs))) (S (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (S (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q))) *)
by rewrite epq size_Mmonic ?monicXsubC // size_XsubC addnC.
(* Goal: is_true (leq (S (S (@size (GRing.IntegralDomain.sort R) rs))) (S (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) q)))) *)
suff /eq_in_all h : {in rs, root q =1 root p} by apply: ihrs => //; rewrite h.
(* Goal: @prop_in1 (Equality.sort (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) (@mem (Equality.sort (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) (seq_predType (GRing.Ring.eqType (GRing.IntegralDomain.ringType R))) rs) (fun x : GRing.Ring.sort (GRing.IntegralDomain.ringType R) => @eq bool (@root (GRing.IntegralDomain.ringType R) q x) (@root (GRing.IntegralDomain.ringType R) p x)) (inPhantom (@eqfun bool (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@root (GRing.IntegralDomain.ringType R) q) (@root (GRing.IntegralDomain.ringType R) p))) *)
move=> x xrs; rewrite epq rootM root_XsubC orbC; case: (altP (x =P r)) => // exr.
(* Goal: @eq bool (@root (GRing.IntegralDomain.ringType R) q x) (orb true (@root (GRing.IntegralDomain.ringType R) q x)) *)
by move: rnrs; rewrite -exr xrs.
Qed.
Lemma roots_geq_poly_eq0 p (rs : seq R) : all (root p) rs -> uniq rs ->
(size rs >= size p)%N -> p = 0.
Proof.
(* Goal: forall (_ : is_true (@all (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@root (GRing.IntegralDomain.ringType R) p) rs)) (_ : is_true (@uniq (GRing.IntegralDomain.eqType R) rs)) (_ : is_true (leq (@size (GRing.Ring.sort (GRing.IntegralDomain.ringType R)) (@polyseq (GRing.IntegralDomain.ringType R) p)) (@size (GRing.IntegralDomain.sort R) rs))), @eq (@poly_of (GRing.IntegralDomain.ringType R) (Phant (GRing.IntegralDomain.sort R))) p (GRing.zero (poly_zmodType (GRing.IntegralDomain.ringType R))) *)
by move=> ??; apply: contraTeq => ?; rewrite leqNgt max_poly_roots.
Qed.
End PolynomialIdomain.
Canonical polynomial_countUnitRingType (R : countIdomainType) :=
[countUnitRingType of polynomial R].
Canonical poly_countUnitRingType (R : countIdomainType) :=
[countUnitRingType of {poly R}].
Canonical polynomial_countComUnitRingType (R : countIdomainType) :=
[countComUnitRingType of polynomial R].
Canonical poly_countComUnitRingType (R : countIdomainType) :=
[countComUnitRingType of {poly R}].
Canonical polynomial_countIdomainType (R : countIdomainType) :=
[countIdomainType of polynomial R].
Canonical poly_countIdomainType (R : countIdomainType) :=
[countIdomainType of {poly R}].
Section MapFieldPoly.
Variables (F : fieldType) (R : ringType) (f : {rmorphism F -> R}).
Local Notation "p ^f" := (map_poly f p) : ring_scope.
Lemma size_map_poly p : size p^f = size p.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p))) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite rmorph0 !size_poly0.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p))) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) *)
by rewrite size_poly_eq // fmorph_eq0 // lead_coef_eq0.
Qed.
Lemma lead_coef_map p : lead_coef p^f = f (lead_coef p).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@lead_coef R (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p)) (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f (@lead_coef (GRing.Field.ringType F) p)) *)
have [-> | nz_p] := eqVneq p 0; first by rewrite !(rmorph0, lead_coef0).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@lead_coef R (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p)) (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f (@lead_coef (GRing.Field.ringType F) p)) *)
by rewrite lead_coef_map_eq // fmorph_eq0 // lead_coef_eq0.
Qed.
Lemma map_poly_eq0 p : (p^f == 0) = (p == 0).
Proof.
(* Goal: @eq bool (@eq_op (poly_eqType R) (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p) (GRing.zero (poly_zmodType R))) (@eq_op (poly_eqType (GRing.Field.ringType F)) p (GRing.zero (poly_zmodType (GRing.Field.ringType F)))) *)
by rewrite -!size_poly_eq0 size_map_poly.
Qed.
Lemma map_poly_inj : injective (map_poly f).
Proof.
(* Goal: @injective (@poly_of R (Phant (GRing.Ring.sort R))) (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f)) *)
move=> p q eqfpq; apply/eqP; rewrite -subr_eq0 -map_poly_eq0.
(* Goal: is_true (@eq_op (poly_eqType R) (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) (@GRing.add (poly_zmodType (GRing.Field.ringType F)) p (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) q))) (GRing.zero (poly_zmodType R))) *)
by rewrite rmorphB /= eqfpq subrr.
Qed.
Lemma map_monic p : (p^f \is monic) = (p \is monic).
Proof.
(* Goal: @eq bool (@in_mem (@poly_of R (Phant (GRing.Ring.sort R))) (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p) (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) (@monic R)))) (@in_mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) p (@mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (predPredType (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))))) (@has_quality O (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (@monic (GRing.Field.ringType F))))) *)
by rewrite monicE lead_coef_map fmorph_eq1.
Qed.
Lemma map_poly_com p x : comm_poly p^f (f x).
Proof.
(* Goal: @comm_poly R (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p) (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f x) *)
exact: map_comm_poly (mulrC x _).
Qed.
Lemma fmorph_root p x : root p^f (f x) = root p x.
Proof.
(* Goal: @eq bool (@root R (@map_poly (GRing.Field.ringType F) R (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f) p) (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f x)) (@root (GRing.Field.ringType F) p x) *)
by rewrite rootE horner_map // fmorph_eq0.
Qed.
Lemma fmorph_unity_root n z : n.-unity_root (f z) = n.-unity_root z.
Proof.
(* Goal: @eq bool (@root_of_unity R n (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f z)) (@root_of_unity (GRing.Field.ringType F) n z) *)
by rewrite !unity_rootE -(inj_eq (fmorph_inj f)) rmorphX ?rmorph1.
Qed.
Lemma fmorph_primitive_root n z :
n.-primitive_root (f z) = n.-primitive_root z.
Proof.
(* Goal: @eq bool (@primitive_root_of_unity R n (@GRing.RMorphism.apply (GRing.Field.ringType F) R (Phant (forall _ : GRing.Field.sort F, GRing.Ring.sort R)) f z)) (@primitive_root_of_unity (GRing.Field.ringType F) n z) *)
by congr (_ && _); apply: eq_forallb => i; rewrite fmorph_unity_root.
Qed.
End MapFieldPoly.
Arguments map_poly_inj {F R} f [p1 p2] : rename.
Section MaxRoots.
Variable R : unitRingType.
Implicit Types (x y : R) (rs : seq R) (p : {poly R}).
Definition diff_roots (x y : R) := (x * y == y * x) && (y - x \in GRing.unit).
Fixpoint uniq_roots rs :=
if rs is x :: rs' then all (diff_roots x) rs' && uniq_roots rs' else true.
Lemma uniq_roots_prod_XsubC p rs :
all (root p) rs -> uniq_roots rs ->
exists q, p = q * \prod_(z <- rs) ('X - z%:P).
Proof.
(* Goal: forall (_ : is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@root (GRing.UnitRing.ringType R) p) rs)) (_ : is_true (uniq_roots rs)), @ex (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (fun q : GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R)) => @eq (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) p (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) rs (fun z : GRing.UnitRing.sort R => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z))))))) *)
elim: rs => [|z rs IHrs] /=; first by rewrite big_nil; exists p; rewrite mulr1.
(* Goal: forall (_ : is_true (andb (@root (GRing.UnitRing.ringType R) p z) (@all (GRing.UnitRing.sort R) (@root (GRing.UnitRing.ringType R) p) rs))) (_ : is_true (andb (@all (GRing.UnitRing.sort R) (diff_roots z) rs) (uniq_roots rs))), @ex (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (fun q : @poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R)) => @eq (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) p (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) (@cons (GRing.UnitRing.sort R) z rs) (fun z : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z))))))) *)
case/andP=> rpz rprs /andP[drs urs]; case: IHrs => {urs rprs}// q def_p.
(* Goal: @ex (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (fun q : @poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R)) => @eq (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) p (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) (@cons (GRing.UnitRing.sort R) z rs) (fun z : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z))))))) *)
have [|q' def_q] := factor_theorem q z _; last first.
(* Goal: is_true (@root (GRing.UnitRing.ringType R) q z) *)
(* Goal: @ex (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (fun q : @poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R)) => @eq (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) p (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) (@cons (GRing.UnitRing.sort R) z rs) (fun z : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z))))))) *)
by exists q'; rewrite big_cons mulrA -def_q.
(* Goal: is_true (@root (GRing.UnitRing.ringType R) q z) *)
rewrite {p}def_p in rpz.
(* Goal: is_true (@root (GRing.UnitRing.ringType R) q z) *)
elim/last_ind: rs drs rpz => [|rs t IHrs] /=; first by rewrite big_nil mulr1.
(* Goal: forall (_ : is_true (@all (GRing.UnitRing.sort R) (diff_roots z) (@rcons (GRing.UnitRing.sort R) rs t))) (_ : is_true (@root (GRing.UnitRing.ringType R) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) (@rcons (GRing.UnitRing.sort R) rs t) (fun z : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z)))))) z)), is_true (@root (GRing.UnitRing.ringType R) q z) *)
rewrite all_rcons => /andP[/andP[/eqP czt Uzt] /IHrs {IHrs}IHrs].
(* Goal: forall _ : is_true (@root (GRing.UnitRing.ringType R) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) (@rcons (GRing.UnitRing.sort R) rs t) (fun z : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z)))))) z), is_true (@root (GRing.UnitRing.ringType R) q z) *)
rewrite -cats1 big_cat big_seq1 /= mulrA rootE hornerM_comm; last first.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (@GRing.mul (GRing.UnitRing.ringType R) (@horner (GRing.UnitRing.ringType R) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) rs (fun i : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) i (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) i)))))) z) (@horner (GRing.UnitRing.ringType R) (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) t))) z)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType R)))), is_true (@root (GRing.UnitRing.ringType R) q z) *)
(* Goal: @comm_poly (GRing.UnitRing.ringType R) (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) t))) z *)
by rewrite /comm_poly hornerXsubC mulrBl mulrBr czt.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (@GRing.mul (GRing.UnitRing.ringType R) (@horner (GRing.UnitRing.ringType R) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) rs (fun i : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) i (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) i)))))) z) (@horner (GRing.UnitRing.ringType R) (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) t))) z)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType R)))), is_true (@root (GRing.UnitRing.ringType R) q z) *)
rewrite hornerXsubC -opprB mulrN oppr_eq0 -(mul0r (t - z)).
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (@GRing.mul (GRing.UnitRing.ringType R) (@horner (GRing.UnitRing.ringType R) (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R)) q (@BigOp.bigop (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) rs (fun i : GRing.UnitRing.sort R => @BigBody (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) (GRing.UnitRing.sort R) i (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) i)))))) z) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) t (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType R)) z))) (@GRing.mul (GRing.UnitRing.ringType R) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (@GRing.add (GRing.UnitRing.zmodType R) t (@GRing.opp (GRing.UnitRing.zmodType R) z)))), is_true (@root (GRing.UnitRing.ringType R) q z) *)
by rewrite (inj_eq (mulIr Uzt)) => /IHrs.
Qed.
Theorem max_ring_poly_roots p rs :
p != 0 -> all (root p) rs -> uniq_roots rs -> size rs < size p.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.UnitRing.ringType R)) p (GRing.zero (poly_zmodType (GRing.UnitRing.ringType R)))))) (_ : is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@root (GRing.UnitRing.ringType R) p) rs)) (_ : is_true (uniq_roots rs)), is_true (leq (S (@size (GRing.UnitRing.sort R) rs)) (@size (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@polyseq (GRing.UnitRing.ringType R) p))) *)
move=> nz_p _ /(@uniq_roots_prod_XsubC p)[// | q def_p]; rewrite def_p in nz_p *.
have nz_q: q != 0 by apply: contraNneq nz_p => ->; rewrite mul0r.
rewrite size_Mmonic ?monic_prod_XsubC // (polySpred nz_q) addSn /=.
by rewrite size_prod_XsubC leq_addl.
Qed.
Qed.
Lemma all_roots_prod_XsubC p rs :
size p = (size rs).+1 -> all (root p) rs -> uniq_roots rs ->
Proof.
(* Goal: forall (_ : @eq nat (@size (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@polyseq (GRing.UnitRing.ringType R) p)) (S (@size (GRing.UnitRing.sort R) rs))) (_ : is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType R)) (@root (GRing.UnitRing.ringType R) p) rs)) (_ : is_true (uniq_roots rs)), @eq (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) p (@GRing.scale (GRing.UnitRing.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType R))) (poly_lalgType (GRing.UnitRing.ringType R))) (@lead_coef (GRing.UnitRing.ringType R) p) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) rs (fun z : GRing.UnitRing.sort R => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z)))))) *)
move=> size_p /uniq_roots_prod_XsubC def_p Urs.
(* Goal: @eq (@poly_of (GRing.UnitRing.ringType R) (Phant (GRing.UnitRing.sort R))) p (@GRing.scale (GRing.UnitRing.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType R) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType R))) (poly_lalgType (GRing.UnitRing.ringType R))) (@lead_coef (GRing.UnitRing.ringType R) p) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (GRing.UnitRing.sort R) (GRing.one (poly_ringType (GRing.UnitRing.ringType R))) rs (fun z : GRing.UnitRing.sort R => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType R))) (GRing.UnitRing.sort R) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType R))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType R)) (polyX (GRing.UnitRing.ringType R)) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType R)) (@polyC (GRing.UnitRing.ringType R) z)))))) *)
case/def_p: Urs => q -> {p def_p} in size_p *.
have [q0 | nz_q] := eqVneq q 0; first by rewrite q0 mul0r size_poly0 in size_p.
have{q nz_q size_p} /size_poly1P[c _ ->]: size q == 1%N.
rewrite -(eqn_add2r (size rs)) add1n -size_p.
by rewrite size_Mmonic ?monic_prod_XsubC // size_prod_XsubC addnS.
by rewrite lead_coef_Mmonic ?monic_prod_XsubC // lead_coefC mul_polyC.
Qed.
Qed.
End MaxRoots.
Section FieldRoots.
Variable F : fieldType.
Implicit Types (p : {poly F}) (rs : seq F).
Lemma poly2_root p : size p = 2 -> {r | root p r}.
Proof.
(* Goal: forall _ : @eq nat (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (S (S O)), @sig (GRing.Ring.sort (GRing.Field.ringType F)) (fun r : GRing.Ring.sort (GRing.Field.ringType F) => is_true (@root (GRing.Field.ringType F) p r)) *)
case: p => [[|p0 [|p1 []]] //= nz_p1]; exists (- p0 / p1).
(* Goal: is_true (@root (GRing.Field.ringType F) (@Polynomial (GRing.Field.ringType F) (@cons (GRing.Field.sort F) p0 (@cons (GRing.Field.sort F) p1 (@nil (GRing.Field.sort F)))) nz_p1) (@GRing.mul (GRing.Field.ringType F) (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType F)) p0) (@GRing.inv (GRing.Field.unitRingType F) p1))) *)
by rewrite /root addr_eq0 /= mul0r add0r mulrC divfK ?opprK.
Qed.
Lemma uniq_rootsE rs : uniq_roots rs = uniq rs.
Proof.
(* Goal: @eq bool (@uniq_roots (GRing.Field.unitRingType F) rs) (@uniq (GRing.Field.eqType F) rs) *)
elim: rs => //= r rs ->; congr (_ && _); rewrite -has_pred1 -all_predC.
(* Goal: @eq bool (@all (GRing.Field.sort F) (@diff_roots (GRing.Field.unitRingType F) r) rs) (@all (Equality.sort (GRing.Field.eqType F)) (@pred_of_simpl (Equality.sort (GRing.Field.eqType F)) (@predC (Equality.sort (GRing.Field.eqType F)) (@pred_of_simpl (Equality.sort (GRing.Field.eqType F)) (@pred1 (GRing.Field.eqType F) r)))) rs) *)
by apply: eq_all => t; rewrite /diff_roots mulrC eqxx unitfE subr_eq0.
Qed.
Section UnityRoots.
Variable n : nat.
Lemma max_unity_roots rs :
n > 0 -> all n.-unity_root rs -> uniq rs -> size rs <= n.
Proof.
(* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (@all (GRing.Ring.sort (GRing.Field.ringType F)) (@root_of_unity (GRing.Field.ringType F) n) rs)) (_ : is_true (@uniq (GRing.Field.eqType F) rs)), is_true (leq (@size (GRing.Field.sort F) rs) n) *)
move=> n_gt0 rs_n_1 Urs; have szPn := size_Xn_sub_1 F n_gt0.
(* Goal: is_true (leq (@size (GRing.Field.sort F) rs) n) *)
by rewrite -ltnS -szPn max_poly_roots -?size_poly_eq0 ?szPn.
Qed.
Lemma mem_unity_roots rs :
n > 0 -> all n.-unity_root rs -> uniq rs -> size rs = n ->
Proof.
(* Goal: forall (_ : is_true (leq (S O) n)) (_ : is_true (@all (GRing.Ring.sort (GRing.Field.ringType F)) (@root_of_unity (GRing.Field.ringType F) n) rs)) (_ : is_true (@uniq (GRing.Field.eqType F) rs)) (_ : @eq nat (@size (GRing.Field.sort F) rs) n), @eq_mem (GRing.Ring.sort (GRing.Field.ringType F)) (@mem (GRing.Ring.sort (GRing.Field.ringType F)) (predPredType (GRing.Ring.sort (GRing.Field.ringType F))) (@root_of_unity (GRing.Field.ringType F) n)) (@mem (Equality.sort (GRing.Field.eqType F)) (seq_predType (GRing.Field.eqType F)) rs) *)
move=> n_gt0 rs_n_1 Urs sz_rs_n x; rewrite -topredE /=.
(* Goal: @eq bool (@root_of_unity (GRing.Field.ringType F) n x) (@in_mem (GRing.Field.sort F) x (@mem (GRing.Field.sort F) (seq_predType (GRing.Field.eqType F)) rs)) *)
apply/idP/idP=> xn1; last exact: (allP rs_n_1).
(* Goal: is_true (@in_mem (GRing.Field.sort F) x (@mem (GRing.Field.sort F) (seq_predType (GRing.Field.eqType F)) rs)) *)
apply: contraFT (ltnn n) => not_rs_x.
(* Goal: is_true (leq (S n) n) *)
by rewrite -{1}sz_rs_n (@max_unity_roots (x :: rs)) //= ?xn1 ?not_rs_x.
Qed.
Variable z : F.
Hypothesis prim_z : n.-primitive_root z.
Let zn := [seq z ^+ i | i <- index_iota 0 n].
Lemma factor_Xn_sub_1 : \prod_(0 <= i < n) ('X - (z ^+ i)%:P) = 'X^n - 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) nat (GRing.one (poly_ringType (GRing.Field.ringType F))) (index_iota O n) (fun i : nat => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) nat i (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) (@GRing.exp (GRing.Field.ringType F) z i)))))) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (@GRing.exp (poly_ringType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (GRing.one (poly_ringType (GRing.Field.ringType F))))) *)
transitivity (\prod_(w <- zn) ('X - w%:P)); first by rewrite big_map.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (@GRing.exp (poly_ringType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (GRing.one (poly_ringType (GRing.Field.ringType F))))) *)
have n_gt0: n > 0 := prim_order_gt0 prim_z.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (@GRing.exp (poly_ringType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (GRing.one (poly_ringType (GRing.Field.ringType F))))) *)
rewrite (@all_roots_prod_XsubC _ ('X^n - 1) zn); first 1 last.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
(* Goal: is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) zn) *)
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))))))) (S (@size (GRing.UnitRing.sort (GRing.Field.unitRingType F)) zn)) *)
-
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
(* Goal: is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) zn) *)
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyseq (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))))))) (S (@size (GRing.UnitRing.sort (GRing.Field.unitRingType F)) zn)) *)
by rewrite size_Xn_sub_1 // size_map size_iota subn0.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
(* Goal: is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) zn) *)
-
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
(* Goal: is_true (@all (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@root (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) zn) *)
apply/allP=> _ /mapP[i _ ->] /=; rewrite rootE !hornerE hornerXn.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.exp (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.exp (GRing.Field.ringType F) z i) n) (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))) *)
by rewrite exprAC (prim_expr_order prim_z) expr1n subrr.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
-
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: is_true (@uniq_roots (GRing.Field.unitRingType F) zn) *)
rewrite uniq_rootsE map_inj_in_uniq ?iota_uniq // => i j.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: forall (_ : is_true (@in_mem (Equality.sort nat_eqType) i (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (index_iota O n)))) (_ : is_true (@in_mem (Equality.sort nat_eqType) j (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (index_iota O n)))) (_ : @eq (Equality.sort (GRing.Field.eqType F)) (@GRing.exp (GRing.Field.ringType F) z i) (@GRing.exp (GRing.Field.ringType F) z j)), @eq (Equality.sort nat_eqType) i j *)
rewrite !mem_index_iota => ltin ltjn /eqP.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
(* Goal: forall _ : is_true (@eq_op (GRing.Field.eqType F) (@GRing.exp (GRing.Field.ringType F) z i) (@GRing.exp (GRing.Field.ringType F) z j)), @eq (Equality.sort nat_eqType) i j *)
by rewrite (eq_prim_root_expr prim_z) !modn_small // => /eqP.
(* Goal: @eq (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) (GRing.one (poly_ringType (GRing.Field.ringType F))) zn (fun w : GRing.Ring.sort (GRing.Field.ringType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.Field.ringType F))) (GRing.Ring.sort (GRing.Field.ringType F)) w (@GRing.mul (poly_ringType (GRing.Field.ringType F))) true (@GRing.add (poly_zmodType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) (@GRing.opp (poly_zmodType (GRing.Field.ringType F)) (@polyC (GRing.Field.ringType F) w))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.Lalgebra.lmod_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (poly_lalgType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@lead_coef (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (@GRing.exp (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))))))) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) (GRing.one (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) zn (fun z : GRing.UnitRing.sort (GRing.Field.unitRingType F) => @BigBody (GRing.Ring.sort (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) (GRing.UnitRing.sort (GRing.Field.unitRingType F)) z (@GRing.mul (poly_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)))) true (@GRing.add (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (polyX (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.opp (poly_zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@polyC (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) z)))))) *)
by rewrite (monicP (monic_Xn_sub_1 F n_gt0)) scale1r.
Qed.
Lemma prim_rootP x : x ^+ n = 1 -> {i : 'I_n | x = z ^+ i}.
Proof.
(* Goal: forall _ : @eq (GRing.Ring.sort (GRing.Field.ringType F)) (@GRing.exp (GRing.Field.ringType F) x n) (GRing.one (GRing.Field.ringType F)), @sig (ordinal n) (fun i : ordinal n => @eq (GRing.Ring.sort (GRing.Field.ringType F)) x (@GRing.exp (GRing.Field.ringType F) z (@nat_of_ord n i))) *)
move=> xn1; pose logx := [pred i : 'I_n | x == z ^+ i].
(* Goal: @sig (ordinal n) (fun i : ordinal n => @eq (GRing.Ring.sort (GRing.Field.ringType F)) x (@GRing.exp (GRing.Field.ringType F) z (@nat_of_ord n i))) *)
case: (pickP logx) => [i /eqP-> | no_i]; first by exists i.
(* Goal: @sig (ordinal n) (fun i : ordinal n => @eq (GRing.Ring.sort (GRing.Field.ringType F)) x (@GRing.exp (GRing.Field.ringType F) z (@nat_of_ord n i))) *)
case: notF; suffices{no_i}: x \in zn.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType F)) x (@mem (Equality.sort (GRing.Ring.eqType (GRing.Field.ringType F))) (seq_predType (GRing.Ring.eqType (GRing.Field.ringType F))) zn)) *)
(* Goal: forall _ : is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType F)) x (@mem (Equality.sort (GRing.Ring.eqType (GRing.Field.ringType F))) (seq_predType (GRing.Ring.eqType (GRing.Field.ringType F))) zn)), is_true false *)
case/mapP=> i; rewrite mem_index_iota => lt_i_n def_x.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType F)) x (@mem (Equality.sort (GRing.Ring.eqType (GRing.Field.ringType F))) (seq_predType (GRing.Ring.eqType (GRing.Field.ringType F))) zn)) *)
(* Goal: is_true false *)
by rewrite -(no_i (Ordinal lt_i_n)) /= -def_x.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType F)) x (@mem (Equality.sort (GRing.Ring.eqType (GRing.Field.ringType F))) (seq_predType (GRing.Ring.eqType (GRing.Field.ringType F))) zn)) *)
rewrite -root_prod_XsubC big_map factor_Xn_sub_1.
(* Goal: is_true (@root (GRing.IntegralDomain.ringType (GRing.Field.idomainType F)) (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (@GRing.exp (poly_ringType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) n) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (GRing.one (poly_ringType (GRing.Field.ringType F))))) x) *)
by rewrite [root _ x]unity_rootE xn1.
Qed.
End UnityRoots.
End FieldRoots.
Section MapPolyRoots.
Variables (F : fieldType) (R : unitRingType) (f : {rmorphism F -> R}).
Lemma map_diff_roots x y : diff_roots (f x) (f y) = (x != y).
Proof.
(* Goal: @eq bool (@diff_roots R (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f x) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f y)) (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F))) x y)) *)
rewrite /diff_roots -rmorphB // fmorph_unit // subr_eq0 //.
(* Goal: @eq bool (andb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType R)) (@GRing.mul (GRing.UnitRing.ringType R) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f x) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f y)) (@GRing.mul (GRing.UnitRing.ringType R) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f y) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f x))) (negb (@eq_op (GRing.Zmodule.eqType (GRing.Field.zmodType F)) y x))) (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F))) x y)) *)
by rewrite rmorph_comm // eqxx eq_sym.
Qed.
Lemma map_uniq_roots s : uniq_roots (map f s) = uniq s.
Proof.
(* Goal: @eq bool (@uniq_roots R (@map (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType R))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f) s)) (@uniq (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F))) s) *)
elim: s => //= x s ->; congr (_ && _); elim: s => //= y s ->.
(* Goal: @eq bool (andb (@diff_roots R (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f x) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.UnitRing.ringType R) (Phant (forall _ : GRing.Field.sort F, GRing.UnitRing.sort R)) f y)) (negb (@in_mem (GRing.Field.sort F) x (@mem (GRing.Field.sort F) (seq_predType (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F)))) s)))) (negb (@in_mem (GRing.Field.sort F) x (@mem (GRing.Field.sort F) (seq_predType (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (@cons (GRing.Field.sort F) y s)))) *)
by rewrite map_diff_roots -negb_or.
Qed.
End MapPolyRoots.
Section AutPolyRoot.
Variable F : fieldType.
Implicit Types u v : {rmorphism F -> F}.
Lemma aut_prim_rootP u z n :
n.-primitive_root z -> {k | coprime k n & u z = z ^+ k}.
Proof.
(* Goal: forall _ : is_true (@primitive_root_of_unity (GRing.Field.ringType F) n z), @sig2 nat (fun k : nat => is_true (coprime k n)) (fun k : nat => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z) (@GRing.exp (GRing.Field.ringType F) z k)) *)
move=> prim_z; have:= prim_z; rewrite -(fmorph_primitive_root u) => prim_uz.
(* Goal: @sig2 nat (fun k : nat => is_true (coprime k n)) (fun k : nat => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z) (@GRing.exp (GRing.Field.ringType F) z k)) *)
have [[k _] /= def_uz] := prim_rootP prim_z (prim_expr_order prim_uz).
(* Goal: @sig2 nat (fun k : nat => is_true (coprime k n)) (fun k : nat => @eq (GRing.Field.sort F) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z) (@GRing.exp (GRing.Field.ringType F) z k)) *)
by exists k; rewrite // -(prim_root_exp_coprime _ prim_z) -def_uz.
Qed.
Lemma aut_unity_rootP u z n : n > 0 -> z ^+ n = 1 -> {k | u z = z ^+ k}.
Proof.
(* Goal: forall (_ : is_true (leq (S O) n)) (_ : @eq (GRing.Ring.sort (GRing.Field.ringType F)) (@GRing.exp (GRing.Field.ringType F) z n) (GRing.one (GRing.Field.ringType F))), @sig nat (fun k : nat => @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z) (@GRing.exp (GRing.Field.ringType F) z k)) *)
by move=> _ /prim_order_exists[// | m /(aut_prim_rootP u)[k]]; exists k.
Qed.
Lemma aut_unity_rootC u v z n : n > 0 -> z ^+ n = 1 -> u (v z) = v (u z).
Proof.
(* Goal: forall (_ : is_true (leq (S O) n)) (_ : @eq (GRing.Ring.sort (GRing.Field.ringType F)) (@GRing.exp (GRing.Field.ringType F) z n) (GRing.one (GRing.Field.ringType F))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) v z)) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) v (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z)) *)
move=> n_gt0 /(aut_unity_rootP _ n_gt0) def_z.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) v z)) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) v (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z)) *)
have [[i def_uz] [j def_vz]] := (def_z u, def_z v).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) v z)) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) v (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType F) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort F)) u z)) *)
by rewrite !(def_uz, def_vz, rmorphX) exprAC.
Qed.
End AutPolyRoot.
Module UnityRootTheory.
Notation "n .-unity_root" := (root_of_unity n) : unity_root_scope.
Notation "n .-primitive_root" := (primitive_root_of_unity n) : unity_root_scope.
Open Scope unity_root_scope.
Definition unity_rootE := unity_rootE.
Definition unity_rootP := @unity_rootP.
Arguments unity_rootP {R n z}.
Definition prim_order_exists := prim_order_exists.
Notation prim_order_gt0 := prim_order_gt0.
Notation prim_expr_order := prim_expr_order.
Definition prim_expr_mod := prim_expr_mod.
Definition prim_order_dvd := prim_order_dvd.
Definition eq_prim_root_expr := eq_prim_root_expr.
Definition rmorph_unity_root := rmorph_unity_root.
Definition fmorph_unity_root := fmorph_unity_root.
Definition fmorph_primitive_root := fmorph_primitive_root.
Definition max_unity_roots := max_unity_roots.
Definition mem_unity_roots := mem_unity_roots.
Definition prim_rootP := prim_rootP.
End UnityRootTheory.
Section DecField.
Variable F : decFieldType.
Lemma dec_factor_theorem (p : {poly F}) :
{s : seq F & {q : {poly F} | p = q * \prod_(x <- s) ('X - x%:P)
/\ (q != 0 -> forall x, ~~ root q x)}}.
Proof.
(* Goal: @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
pose polyT (p : seq F) := (foldr (fun c f => f * 'X_0 + c%:T) (0%R)%:T p)%T.
(* Goal: @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
have eval_polyT (q : {poly F}) x : GRing.eval [:: x] (polyT q) = q.[x].
(* Goal: @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
(* Goal: @eq (GRing.UnitRing.sort (GRing.DecidableField.unitRingType F)) (@GRing.eval (GRing.DecidableField.unitRingType F) (@cons (GRing.UnitRing.sort (GRing.DecidableField.unitRingType F)) x (@nil (GRing.UnitRing.sort (GRing.DecidableField.unitRingType F)))) (polyT (@polyseq (GRing.DecidableField.ringType F) q))) (@horner (GRing.DecidableField.ringType F) q x) *)
by rewrite /horner; elim: (val q) => //= ? ? ->.
(* Goal: @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
elim: size {-2}p (leqnn (size p)) => {p} [p|n IHn p].
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort (GRing.DecidableField.ringType F)) (@polyseq (GRing.DecidableField.ringType F) p)) (S n)), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort (GRing.DecidableField.ringType F)) (@polyseq (GRing.DecidableField.ringType F) p)) O), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
by move=> /size_poly_leq0P->; exists [::], 0; rewrite mul0r eqxx.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort (GRing.DecidableField.ringType F)) (@polyseq (GRing.DecidableField.ringType F) p)) (S n)), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.Ring.sort (GRing.DecidableField.ringType F)), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
have /decPcases /= := @satP F [::] ('exists 'X_0, polyT p == 0%T).
(* Goal: forall (_ : if @GRing.sat F (@nil (GRing.DecidableField.sort F)) (@GRing.Exists (GRing.DecidableField.sort F) O (@GRing.Equal (GRing.DecidableField.sort F) (polyT (@polyseq (GRing.DecidableField.ringType F) p)) (GRing.NatConst (GRing.DecidableField.sort F) O))) then @ex (GRing.DecidableField.sort F) (fun x : GRing.DecidableField.sort F => @eq (GRing.DecidableField.sort F) (@GRing.eval (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))) (@cons (GRing.DecidableField.sort F) x (@nil (GRing.DecidableField.sort F))) (polyT (@polyseq (GRing.DecidableField.ringType F) p))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) (GRing.one (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) O)) else not (@ex (GRing.DecidableField.sort F) (fun x : GRing.DecidableField.sort F => @eq (GRing.DecidableField.sort F) (@GRing.eval (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))) (@cons (GRing.DecidableField.sort F) x (@nil (GRing.DecidableField.sort F))) (polyT (@polyseq (GRing.DecidableField.ringType F) p))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) (GRing.one (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) O)))) (_ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) p)) (S n))), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
case: ifP => [_ /sig_eqW[x]|_ noroot]; last first.
(* Goal: forall (_ : @eq (Equality.sort (GRing.DecidableField.eqType F)) (@GRing.eval (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))) (@cons (GRing.DecidableField.sort F) x (@nil (GRing.DecidableField.sort F))) (polyT (@polyseq (GRing.DecidableField.ringType F) p))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) (GRing.one (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) O)) (_ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) p)) (S n))), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
(* Goal: forall _ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) p)) (S n)), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
exists [::], p; rewrite big_nil mulr1; split => // p_neq0 x.
(* Goal: forall (_ : @eq (Equality.sort (GRing.DecidableField.eqType F)) (@GRing.eval (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))) (@cons (GRing.DecidableField.sort F) x (@nil (GRing.DecidableField.sort F))) (polyT (@polyseq (GRing.DecidableField.ringType F) p))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) (GRing.one (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) O)) (_ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) p)) (S n))), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
(* Goal: is_true (negb (@root (GRing.DecidableField.ringType F) p x)) *)
by apply/negP=> /rootP rpx; apply noroot; exists x; rewrite eval_polyT.
(* Goal: forall (_ : @eq (Equality.sort (GRing.DecidableField.eqType F)) (@GRing.eval (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))) (@cons (GRing.DecidableField.sort F) x (@nil (GRing.DecidableField.sort F))) (polyT (@polyseq (GRing.DecidableField.ringType F) p))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) (GRing.one (GRing.UnitRing.ringType (@GRing.UnitRing.Pack (GRing.DecidableField.sort F) (@GRing.ComUnitRing.base2 (GRing.DecidableField.sort F) (@GRing.IntegralDomain.base (GRing.DecidableField.sort F) (@GRing.Field.base (GRing.DecidableField.sort F) (@GRing.DecidableField.base (GRing.DecidableField.sort F) (GRing.DecidableField.class F)))))))) O)) (_ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) p)) (S n))), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) p (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q x))))) *)
rewrite eval_polyT => /rootP /factor_theorem /sig_eqW [q ->].
(* Goal: forall _ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))))) (S n)), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q0 : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q0 (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q0 (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q0 x))))) *)
have [->|q_neq0] := eqVneq q 0; first by exists [::], 0; rewrite !mul0r eqxx.
(* Goal: forall _ : is_true (leq (@size (GRing.DecidableField.sort F) (@polyseq (GRing.DecidableField.ringType F) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))))) (S n)), @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q0 : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q0 (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q0 (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q0 x))))) *)
rewrite size_mul ?polyXsubC_eq0 // ?size_XsubC addn2 /= ltnS => sq_le_n.
(* Goal: @sigT (list (GRing.DecidableField.sort F)) (fun s : list (GRing.DecidableField.sort F) => @sig (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (fun q0 : @poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F)) => and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) q0 (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) q0 (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) q0 x))))) *)
have [] // := IHn q => s [r [-> nr]]; exists (s ++ [::x]), r.
(* Goal: and (@eq (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) r (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) s (fun x : GRing.DecidableField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.DecidableField.ringType F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))))) (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x)))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F)) r (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType F))) (@cat (GRing.DecidableField.sort F) s (@cons (Choice.sort (GRing.DecidableField.choiceType F)) x (@nil (Choice.sort (GRing.DecidableField.choiceType F))))) (fun x : GRing.DecidableField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType F) (Phant (GRing.DecidableField.sort F))) (GRing.DecidableField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType F))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType F)) (polyX (GRing.DecidableField.ringType F)) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType F)) (@polyC (GRing.DecidableField.ringType F) x))))))) (forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType F)) r (GRing.zero (poly_zmodType (GRing.DecidableField.ringType F)))))) (x : GRing.DecidableField.sort F), is_true (negb (@root (GRing.DecidableField.ringType F) r x))) *)
by rewrite big_cat /= big_seq1 mulrA.
Qed.
End DecField.
Module PreClosedField.
Section UseAxiom.
Variable F : fieldType.
Hypothesis closedF : GRing.ClosedField.axiom F.
Implicit Type p : {poly F}.
Lemma closed_rootP p : reflect (exists x, root p x) (size p != 1%N).
Proof.
(* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (@root (GRing.Field.ringType F) p x))) (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (S O))) *)
have [-> | nz_p] := eqVneq p 0.
(* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (@root (GRing.Field.ringType F) p x))) (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (S O))) *)
(* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (@root (GRing.Field.ringType F) (GRing.zero (poly_zmodType (GRing.Field.ringType F))) x))) (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) (GRing.zero (poly_zmodType (GRing.Field.ringType F))))) (S O))) *)
by rewrite size_poly0; left; exists 0; rewrite root0.
(* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (@root (GRing.Field.ringType F) p x))) (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) (S O))) *)
rewrite neq_ltn {1}polySpred //=.
(* Goal: Bool.reflect (@ex (GRing.Field.sort F) (fun x : GRing.Field.sort F => is_true (@root (GRing.Field.ringType F) p x))) (leq (S (S O)) (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p))) *)
apply: (iffP idP) => [p_gt1 | [a]]; last exact: root_size_gt1.
(* Goal: @ex (GRing.Field.sort F) (fun x : GRing.Field.sort F => is_true (@root (GRing.Field.ringType F) p x)) *)
pose n := (size p).-1; have n_gt0: n > 0 by rewrite -ltnS -polySpred.
(* Goal: @ex (GRing.Field.sort F) (fun x : GRing.Field.sort F => is_true (@root (GRing.Field.ringType F) p x)) *)
have [a Dan] := closedF (fun i => - p`_i / lead_coef p) n_gt0.
(* Goal: @ex (GRing.Field.sort F) (fun x : GRing.Field.sort F => is_true (@root (GRing.Field.ringType F) p x)) *)
exists a; apply/rootP; rewrite horner_coef polySpred // big_ord_recr /= -/n.
(* Goal: @eq (GRing.Field.sort F) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F)) (@BigOp.bigop (GRing.Field.sort F) (ordinal n) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (GRing.Field.sort F) (ordinal n) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F))) true (@GRing.mul (GRing.Field.ringType F) (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) (@nat_of_ord n i)) (@GRing.exp (GRing.Field.ringType F) a (@nat_of_ord n i))))) (@GRing.mul (GRing.Field.ringType F) (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) n) (@GRing.exp (GRing.Field.ringType F) a n))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) *)
rewrite {}Dan mulr_sumr -big_split big1 //= => i _.
(* Goal: @eq (GRing.Field.sort F) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F)) (@GRing.mul (GRing.Field.ringType F) (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) (@nat_of_ord n i)) (@GRing.exp (GRing.Field.ringType F) a (@nat_of_ord n i))) (@GRing.mul (GRing.Field.ringType F) (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) n) (@GRing.mul (GRing.Field.ringType F) (@GRing.mul (GRing.Field.ringType F) (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType F)) (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) (@nat_of_ord n i))) (@GRing.inv (GRing.Field.unitRingType F) (@lead_coef (GRing.Field.ringType F) p))) (@GRing.exp (GRing.Field.ringType F) a (@nat_of_ord n i))))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) *)
by rewrite -!mulrA mulrCA mulNr mulVKf ?subrr ?lead_coef_eq0.
Qed.
Lemma closed_nonrootP p : reflect (exists x, ~~ root p x) (p != 0).
Proof.
(* Goal: Bool.reflect (@ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x)))) (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) p (GRing.zero (poly_zmodType (GRing.Field.ringType F))))) *)
apply: (iffP idP) => [nz_p | [x]]; last first.
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x))) *)
(* Goal: forall _ : is_true (negb (@root (GRing.Field.ringType F) p x)), is_true (negb (@eq_op (poly_eqType (GRing.Field.ringType F)) p (GRing.zero (poly_zmodType (GRing.Field.ringType F))))) *)
by apply: contraNneq => ->; apply: root0.
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x))) *)
have [[x /rootP p1x0]|] := altP (closed_rootP (p - 1)).
(* Goal: forall _ : is_true (negb (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) (@GRing.add (poly_zmodType (GRing.Field.ringType F)) p (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (GRing.one (poly_ringType (GRing.Field.ringType F))))))) (S O)))), @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x))) *)
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x))) *)
by exists x; rewrite -[p](subrK 1) /root hornerD p1x0 add0r hornerC oner_eq0.
(* Goal: forall _ : is_true (negb (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) (@GRing.add (poly_zmodType (GRing.Field.ringType F)) p (@GRing.opp (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (GRing.one (poly_ringType (GRing.Field.ringType F))))))) (S O)))), @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x))) *)
rewrite negbK => /size_poly1P[c _ /(canRL (subrK 1)) Dp].
(* Goal: @ex (GRing.Ring.sort (GRing.Field.ringType F)) (fun x : GRing.Ring.sort (GRing.Field.ringType F) => is_true (negb (@root (GRing.Field.ringType F) p x))) *)
by exists 0; rewrite Dp -raddfD polyC_eq0 rootC in nz_p *.
Qed.
Qed.
End UseAxiom.
End PreClosedField.
Section ClosedField.
Variable F : closedFieldType.
Implicit Type p : {poly F}.
Let closedF := @solve_monicpoly F.
Lemma closed_rootP p : reflect (exists x, root p x) (size p != 1%N).
Lemma closed_nonrootP p : reflect (exists x, ~~ root p x) (p != 0).
Lemma closed_field_poly_normal p :
{r : seq F | p = lead_coef p *: \prod_(z <- r) ('X - z%:P)}.
Proof.
(* Goal: @sig (list (GRing.ClosedField.sort F)) (fun r : list (GRing.ClosedField.sort F) => @eq (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) p (@GRing.scale (GRing.ClosedField.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType F) (Phant (GRing.Ring.sort (GRing.ClosedField.ringType F))) (poly_lalgType (GRing.ClosedField.ringType F))) (@lead_coef (GRing.ClosedField.ringType F) p) (@BigOp.bigop (GRing.Ring.sort (poly_ringType (GRing.ClosedField.ringType F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.ClosedField.ringType F))) r (fun z : GRing.ClosedField.sort F => @BigBody (GRing.Ring.sort (poly_ringType (GRing.ClosedField.ringType F))) (GRing.ClosedField.sort F) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType F))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType F)) (polyX (GRing.ClosedField.ringType F)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType F)) (@polyC (GRing.ClosedField.ringType F) z))))))) *)
apply: sig_eqW; have [r [q [->]]] /= := dec_factor_theorem p.
(* Goal: forall _ : forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))))))) (x : GRing.ClosedField.sort F), is_true (negb (@root (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) q x)), @ex (list (GRing.ClosedField.sort F)) (fun x : list (GRing.ClosedField.sort F) => @eq (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x0 : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x0 (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x0)))))) (@GRing.scale (GRing.ClosedField.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F)) (poly_lalgType (GRing.ClosedField.ringType F))) (@lead_coef (GRing.ClosedField.ringType F) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x0 : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x0 (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x0))))))) (@BigOp.bigop (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.ClosedField.ringType F))) x (fun z : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType F))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType F)) (polyX (GRing.ClosedField.ringType F)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType F)) (@polyC (GRing.ClosedField.ringType F) z))))))) *)
have [->|] := altP eqP; first by exists [::]; rewrite mul0r lead_coef0 scale0r.
(* Goal: forall (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))))))) (_ : forall (_ : is_true (negb false)) (x : GRing.ClosedField.sort F), is_true (negb (@root (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) q x))), @ex (list (GRing.ClosedField.sort F)) (fun x : list (GRing.ClosedField.sort F) => @eq (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x0 : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x0 (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x0)))))) (@GRing.scale (GRing.ClosedField.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F)) (poly_lalgType (GRing.ClosedField.ringType F))) (@lead_coef (GRing.ClosedField.ringType F) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x0 : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x0 (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x0))))))) (@BigOp.bigop (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.ClosedField.ringType F))) x (fun z : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType F))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType F)) (polyX (GRing.ClosedField.ringType F)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType F)) (@polyC (GRing.ClosedField.ringType F) z))))))) *)
have [[x rqx ? /(_ isT x) /negP /(_ rqx)] //|] := altP (closed_rootP q).
(* Goal: forall (_ : is_true (negb (negb (@eq_op nat_eqType (@size (GRing.Ring.sort (GRing.ClosedField.ringType F)) (@polyseq (GRing.ClosedField.ringType F) q)) (S O))))) (_ : is_true (negb (@eq_op (poly_eqType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (GRing.zero (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))))))) (_ : forall (_ : is_true (negb false)) (x : GRing.ClosedField.sort F), is_true (negb (@root (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) q x))), @ex (list (GRing.ClosedField.sort F)) (fun x : list (GRing.ClosedField.sort F) => @eq (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x0 : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x0 (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x0)))))) (@GRing.scale (GRing.ClosedField.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F)) (poly_lalgType (GRing.ClosedField.ringType F))) (@lead_coef (GRing.ClosedField.ringType F) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) q (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x0 : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x0 (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x0))))))) (@BigOp.bigop (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.ClosedField.ringType F))) x (fun z : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType F))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType F)) (polyX (GRing.ClosedField.ringType F)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType F)) (@polyC (GRing.ClosedField.ringType F) z))))))) *)
rewrite negbK => /size_poly1P [c c_neq0-> _ _]; exists r.
(* Goal: @eq (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.ClosedField.ringType F) c) (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x)))))) (@GRing.scale (GRing.ClosedField.ringType F) (@GRing.Lalgebra.lmod_ringType (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F)) (poly_lalgType (GRing.ClosedField.ringType F))) (@lead_coef (GRing.ClosedField.ringType F) (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.ClosedField.ringType F) c) (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x))))))) (@BigOp.bigop (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.ClosedField.ringType F))) r (fun z : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.ClosedField.ringType F) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) z (@GRing.mul (poly_ringType (GRing.ClosedField.ringType F))) true (@GRing.add (poly_zmodType (GRing.ClosedField.ringType F)) (polyX (GRing.ClosedField.ringType F)) (@GRing.opp (poly_zmodType (GRing.ClosedField.ringType F)) (@polyC (GRing.ClosedField.ringType F) z)))))) *)
rewrite mul_polyC lead_coefZ (monicP _) ?mulr1 //.
(* Goal: is_true (@in_mem (@poly_of (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F))))) (@BigOp.bigop (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) (GRing.one (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) r (fun x : GRing.ClosedField.sort F => @BigBody (@poly_of (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) (Phant (GRing.ClosedField.sort F))) (GRing.ClosedField.sort F) x (@GRing.mul (poly_ringType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)))) true (@GRing.add (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (polyX (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@GRing.opp (poly_zmodType (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F))) (@polyC (GRing.DecidableField.ringType (GRing.ClosedField.decFieldType F)) x))))) (@mem (@poly_of (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F))))) (predPredType (@poly_of (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F)))))) (@has_quality O (@poly_of (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F)) (Phant (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F))))) (@monic (GRing.IntegralDomain.ringType (GRing.ClosedField.idomainType F)))))) *)
by rewrite monic_prod => // i; rewrite monicXsubC.
Qed.
End ClosedField.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Categories.
Section Def.
Lemma comp_map_map_compatible :
forall E F G : Setoid, fun2_compatible (comp_map_map (E:=E) (F:=F) (G:=G)).
Proof.
(* Goal: forall E F G : Setoid, @fun2_compatible (MAP F G) (MAP E F) (MAP E G) (@comp_map_map E F G) *)
intros E F G; red in |- *.
(* Goal: forall (x x' : Carrier (MAP F G)) (y y' : Carrier (MAP E F)) (_ : @Equal (MAP F G) x x') (_ : @Equal (MAP E F) y y'), @Equal (MAP E G) (@comp_map_map E F G x y) (@comp_map_map E F G x' y') *)
auto with algebra.
Qed.
Definition SET : category.
Proof.
(* Goal: category *)
apply (Build_category (Ob:=Setoid) (Hom:=MAP) (Hom_comp:=fun E F G : Setoid => uncurry (comp_map_map_compatible (E:=E) (F:=F) (G:=G))) (Hom_id:=Id)); red in |- *; simpl in |- *; unfold Map_eq in |- *; auto with algebra.
Qed.
End Def. |
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Sgroup_cat.
Section Unit.
Variable E : SET.
Variable f : law_of_composition E.
Variable e : E.
Definition unit_r := forall x : E, Equal (f (couple x e)) x.
Definition unit_l := forall x : E, Equal (f (couple e x)) x.
End Unit.
Record monoid_on (A : sgroup) : Type :=
{monoid_unit : A;
monoid_unit_r_prf : unit_r (sgroup_law_map A) monoid_unit;
monoid_unit_l_prf : unit_l (sgroup_law_map A) monoid_unit}.
Record monoid : Type :=
{monoid_sgroup :> sgroup; monoid_on_def :> monoid_on monoid_sgroup}.
Coercion Build_monoid : monoid_on >-> monoid.
Section Hom.
Variable E F : monoid.
Definition monoid_hom_prop (f : E -> F) :=
Equal (f (monoid_unit E)) (monoid_unit F).
Record monoid_hom : Type :=
{monoid_sgroup_hom :> sgroup_hom E F;
monoid_hom_prf : monoid_hom_prop monoid_sgroup_hom}.
End Hom.
Definition monoid_hom_comp :
forall E F G : monoid, monoid_hom F G -> monoid_hom E F -> monoid_hom E G.
Proof.
(* Goal: forall (E F G : monoid) (_ : monoid_hom F G) (_ : monoid_hom E F), monoid_hom E G *)
intros E F G g f; try assumption.
(* Goal: monoid_hom E G *)
apply (Build_monoid_hom (E:=E) (F:=G) (monoid_sgroup_hom:=sgroup_hom_comp g f)).
(* Goal: @monoid_hom_prop E G (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup G) (@sgroup_hom_comp (monoid_sgroup E) (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g) (@monoid_sgroup_hom E F f)))) *)
unfold monoid_hom_prop in |- *; auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup G) (@sgroup_hom_comp (monoid_sgroup E) (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g) (@monoid_sgroup_hom E F f))) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@comp_map_fun (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
unfold comp_map_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E)))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
apply Trans with (Ap (sgroup_map g) (monoid_unit F)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@monoid_unit (monoid_sgroup F) (monoid_on_def F))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E)))) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@monoid_unit (monoid_sgroup F) (monoid_on_def F))) *)
cut (Equal (Ap (sgroup_map (monoid_sgroup_hom f)) (monoid_unit E)) (monoid_unit F)).
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@monoid_unit (monoid_sgroup F) (monoid_on_def F))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup F)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup F) (monoid_on_def F)) *)
(* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup F)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup F) (monoid_on_def F)), @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E)))) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@monoid_unit (monoid_sgroup F) (monoid_on_def F))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@monoid_unit (monoid_sgroup F) (monoid_on_def F))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup F)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup F)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup F) (@monoid_sgroup_hom E F f)) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup F) (monoid_on_def F)) *)
apply (monoid_hom_prf f).
(* Goal: @Equal (sgroup_set (monoid_sgroup G)) (@Ap (sgroup_set (monoid_sgroup F)) (sgroup_set (monoid_sgroup G)) (@sgroup_map (monoid_sgroup F) (monoid_sgroup G) (@monoid_sgroup_hom F G g)) (@monoid_unit (monoid_sgroup F) (monoid_on_def F))) (@monoid_unit (monoid_sgroup G) (monoid_on_def G)) *)
apply (monoid_hom_prf g).
Qed.
Definition monoid_id : forall E : monoid, monoid_hom E E.
Proof.
(* Goal: forall E : monoid, monoid_hom E E *)
intros E; try assumption.
(* Goal: monoid_hom E E *)
apply (Build_monoid_hom (monoid_sgroup_hom:=sgroup_id E)).
(* Goal: @monoid_hom_prop E E (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup E)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup E) (sgroup_id (monoid_sgroup E)))) *)
red in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup E)) (@Ap (sgroup_set (monoid_sgroup E)) (sgroup_set (monoid_sgroup E)) (@sgroup_map (monoid_sgroup E) (monoid_sgroup E) (sgroup_id (monoid_sgroup E))) (@monoid_unit (monoid_sgroup E) (monoid_on_def E))) (@monoid_unit (monoid_sgroup E) (monoid_on_def E)) *)
simpl in |- *; auto with algebra.
Qed.
Definition MONOID : category.
Proof.
(* Goal: category *)
apply (subcat (C:=SGROUP) (C':=monoid) (i:=monoid_sgroup) (homC':=fun E F : monoid => Build_subtype_image (E:=Hom (c:=SGROUP) E F) (subtype_image_carrier:=monoid_hom E F) (monoid_sgroup_hom (E:=E) (F:=F))) (CompC':=monoid_hom_comp) (idC':=monoid_id)).
(* Goal: forall (a b c : monoid) (g : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) b c)) (f : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) a b)), @Equal (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (monoid_hom a c) (@monoid_sgroup_hom a c)) (@monoid_hom_comp a b c g f)) (@comp_hom SGROUP (monoid_sgroup a) (monoid_sgroup b) (monoid_sgroup c) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (monoid_hom b c) (@monoid_sgroup_hom b c)) g) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (monoid_hom a b) (@monoid_sgroup_hom a b)) f)) *)
(* Goal: forall a : monoid, @Equal (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup a)) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup a)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup a)) (monoid_hom a a) (@monoid_sgroup_hom a a)) (monoid_id a)) (@Hom_id SGROUP (monoid_sgroup a)) *)
simpl in |- *.
(* Goal: forall (a b c : monoid) (g : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) b c)) (f : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) a b)), @Equal (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (monoid_hom a c) (@monoid_sgroup_hom a c)) (@monoid_hom_comp a b c g f)) (@comp_hom SGROUP (monoid_sgroup a) (monoid_sgroup b) (monoid_sgroup c) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (monoid_hom b c) (@monoid_sgroup_hom b c)) g) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (monoid_hom a b) (@monoid_sgroup_hom a b)) f)) *)
(* Goal: forall a : monoid, @Map_eq (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup a)) (Id (sgroup_set (monoid_sgroup a))) (Id (sgroup_set (monoid_sgroup a))) *)
intros a; try assumption.
(* Goal: forall (a b c : monoid) (g : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) b c)) (f : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) a b)), @Equal (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (monoid_hom a c) (@monoid_sgroup_hom a c)) (@monoid_hom_comp a b c g f)) (@comp_hom SGROUP (monoid_sgroup a) (monoid_sgroup b) (monoid_sgroup c) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (monoid_hom b c) (@monoid_sgroup_hom b c)) g) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (monoid_hom a b) (@monoid_sgroup_hom a b)) f)) *)
(* Goal: @Map_eq (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup a)) (Id (sgroup_set (monoid_sgroup a))) (Id (sgroup_set (monoid_sgroup a))) *)
red in |- *.
(* Goal: forall (a b c : monoid) (g : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) b c)) (f : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) a b)), @Equal (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (monoid_hom a c) (@monoid_sgroup_hom a c)) (@monoid_hom_comp a b c g f)) (@comp_hom SGROUP (monoid_sgroup a) (monoid_sgroup b) (monoid_sgroup c) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (monoid_hom b c) (@monoid_sgroup_hom b c)) g) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (monoid_hom a b) (@monoid_sgroup_hom a b)) f)) *)
(* Goal: forall x : Carrier (sgroup_set (monoid_sgroup a)), @Equal (sgroup_set (monoid_sgroup a)) (@Ap (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup a)) (Id (sgroup_set (monoid_sgroup a))) x) (@Ap (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup a)) (Id (sgroup_set (monoid_sgroup a))) x) *)
auto with algebra.
(* Goal: forall (a b c : monoid) (g : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) b c)) (f : Carrier (@subcat_Hom SGROUP monoid monoid_sgroup (fun E F : monoid => @Build_subtype_image (@Hom SGROUP (monoid_sgroup E) (monoid_sgroup F)) (monoid_hom E F) (@monoid_sgroup_hom E F)) a b)), @Equal (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup c)) (monoid_hom a c) (@monoid_sgroup_hom a c)) (@monoid_hom_comp a b c g f)) (@comp_hom SGROUP (monoid_sgroup a) (monoid_sgroup b) (monoid_sgroup c) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup b) (monoid_sgroup c)) (monoid_hom b c) (@monoid_sgroup_hom b c)) g) (@subtype_image_inj (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (@Build_subtype_image (@Hom SGROUP (monoid_sgroup a) (monoid_sgroup b)) (monoid_hom a b) (@monoid_sgroup_hom a b)) f)) *)
simpl in |- *.
(* Goal: forall (a b c : monoid) (g : monoid_hom b c) (f : monoid_hom a b), @Map_eq (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup c)) (@comp_map_map (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup b)) (sgroup_set (monoid_sgroup c)) (@sgroup_map (monoid_sgroup b) (monoid_sgroup c) (@monoid_sgroup_hom b c g)) (@sgroup_map (monoid_sgroup a) (monoid_sgroup b) (@monoid_sgroup_hom a b f))) (@comp_map_map (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup b)) (sgroup_set (monoid_sgroup c)) (@sgroup_map (monoid_sgroup b) (monoid_sgroup c) (@monoid_sgroup_hom b c g)) (@sgroup_map (monoid_sgroup a) (monoid_sgroup b) (@monoid_sgroup_hom a b f))) *)
intros a b c g f; try assumption.
(* Goal: @Map_eq (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup c)) (@comp_map_map (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup b)) (sgroup_set (monoid_sgroup c)) (@sgroup_map (monoid_sgroup b) (monoid_sgroup c) (@monoid_sgroup_hom b c g)) (@sgroup_map (monoid_sgroup a) (monoid_sgroup b) (@monoid_sgroup_hom a b f))) (@comp_map_map (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup b)) (sgroup_set (monoid_sgroup c)) (@sgroup_map (monoid_sgroup b) (monoid_sgroup c) (@monoid_sgroup_hom b c g)) (@sgroup_map (monoid_sgroup a) (monoid_sgroup b) (@monoid_sgroup_hom a b f))) *)
red in |- *.
(* Goal: forall x : Carrier (sgroup_set (monoid_sgroup a)), @Equal (sgroup_set (monoid_sgroup c)) (@Ap (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup c)) (@comp_map_map (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup b)) (sgroup_set (monoid_sgroup c)) (@sgroup_map (monoid_sgroup b) (monoid_sgroup c) (@monoid_sgroup_hom b c g)) (@sgroup_map (monoid_sgroup a) (monoid_sgroup b) (@monoid_sgroup_hom a b f))) x) (@Ap (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup c)) (@comp_map_map (sgroup_set (monoid_sgroup a)) (sgroup_set (monoid_sgroup b)) (sgroup_set (monoid_sgroup c)) (@sgroup_map (monoid_sgroup b) (monoid_sgroup c) (@monoid_sgroup_hom b c g)) (@sgroup_map (monoid_sgroup a) (monoid_sgroup b) (@monoid_sgroup_hom a b f))) x) *)
auto with algebra.
Qed.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat div fintype bigop prime.
From mathcomp
Require Import finset fingroup morphism perm action quotient gproduct.
From mathcomp
Require Import cyclic center pgroup nilpotent sylow hall abelian.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Section Definitions.
Variable gT : finGroupType.
Implicit Types A G K H L : {set gT}.
Definition semiregular K H := {in H^#, forall x, 'C_K[x] = 1}.
Definition semiprime K H := {in H^#, forall x, 'C_K[x] = 'C_K(H)}.
Definition normedTI A G L := [&& A != set0, trivIset (A :^: G) & 'N_G(A) == L].
Definition Frobenius_group_with_complement G H := (H != G) && normedTI H^# G H.
Definition Frobenius_group G :=
[exists H : {group gT}, Frobenius_group_with_complement G H].
Definition Frobenius_group_with_kernel_and_complement G K H :=
(K ><| H == G) && Frobenius_group_with_complement G H.
Definition Frobenius_group_with_kernel G K :=
[exists H : {group gT}, Frobenius_group_with_kernel_and_complement G K H].
Section FrobeniusAction.
Variables G H : {set gT}.
Variables (sT : finType) (S : {set sT}) (to : {action gT &-> sT}).
Definition Frobenius_action :=
[/\ [faithful G, on S | to],
[transitive G, on S | to],
{in G^#, forall x, #|'Fix_(S | to)[x]| <= 1},
H != 1
& exists2 u, u \in S & H = 'C_G[u | to]].
End FrobeniusAction.
Variant has_Frobenius_action G H : Prop :=
HasFrobeniusAction sT S to of @Frobenius_action G H sT S to.
End Definitions.
Arguments semiregular {gT} K%g H%g.
Arguments semiprime {gT} K%g H%g.
Arguments normedTI {gT} A%g G%g L%g.
Arguments Frobenius_group_with_complement {gT} G%g H%g.
Arguments Frobenius_group {gT} G%g.
Arguments Frobenius_group_with_kernel {gT} G%g K%g.
Arguments Frobenius_group_with_kernel_and_complement {gT} G%g K%g H%g.
Arguments Frobenius_action {gT} G%g H%g {sT} S%g to%act.
Arguments has_Frobenius_action {gT} G%g H%g.
Notation "[ 'Frobenius' G 'with' 'complement' H ]" :=
(Frobenius_group_with_complement G H)
(at level 0, G at level 50, H at level 35,
format "[ 'Frobenius' G 'with' 'complement' H ]") : group_scope.
Notation "[ 'Frobenius' G 'with' 'kernel' K ]" :=
(Frobenius_group_with_kernel G K)
(at level 0, G at level 50, K at level 35,
format "[ 'Frobenius' G 'with' 'kernel' K ]") : group_scope.
Notation "[ 'Frobenius' G ]" :=
(Frobenius_group G)
(at level 0, G at level 50,
format "[ 'Frobenius' G ]") : group_scope.
Notation "[ 'Frobenius' G = K ><| H ]" :=
(Frobenius_group_with_kernel_and_complement G K H)
(at level 0, G at level 50, K, H at level 35,
format "[ 'Frobenius' G = K ><| H ]") : group_scope.
Section FrobeniusBasics.
Variable gT : finGroupType.
Implicit Types (A B : {set gT}) (G H K L R X : {group gT}).
Lemma semiregular1l H : semiregular 1 H.
Proof.
(* Goal: @semiregular gT (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@gval gT H) *)
by move=> x _ /=; rewrite setI1g.
Qed.
Lemma semiregular1r K : semiregular K 1.
Proof.
(* Goal: @semiregular gT (@gval gT K) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by move=> x; rewrite setDv inE.
Qed.
Lemma semiregular_sym H K : semiregular K H -> semiregular H K.
Proof.
(* Goal: forall _ : @semiregular gT (@gval gT K) (@gval gT H), @semiregular gT (@gval gT H) (@gval gT K) *)
move=> regH x /setD1P[ntx Kx]; apply: contraNeq ntx.
(* Goal: forall _ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))), is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
rewrite -subG1 -setD_eq0 -setIDAC => /set0Pn[y /setIP[Hy cxy]].
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
by rewrite (sameP eqP set1gP) -(regH y Hy) inE Kx cent1C.
Qed.
Lemma semiregularS K1 K2 A1 A2 :
K1 \subset K2 -> A1 \subset A2 -> semiregular K2 A2 -> semiregular K1 A1.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K2))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A2)))) (_ : @semiregular gT (@gval gT K2) A2), @semiregular gT (@gval gT K1) A1 *)
move=> sK12 sA12 regKA2 x /setD1P[ntx /(subsetP sA12)A2x].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply/trivgP; rewrite -(regKA2 x) ?inE ?ntx ?setSI.
Qed.
Lemma semiregular_prime H K : semiregular K H -> semiprime K H.
Proof.
(* Goal: forall _ : @semiregular gT (@gval gT K) (@gval gT H), @semiprime gT (@gval gT K) (@gval gT H) *)
move=> regH x Hx; apply/eqP; rewrite eqEsubset {1}regH // sub1G.
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) *)
by rewrite -cent_set1 setIS ?centS // sub1set; case/setD1P: Hx.
Qed.
Lemma semiprime_regular H K : semiprime K H -> 'C_K(H) = 1 -> semiregular K H.
Proof.
(* Goal: forall (_ : @semiprime gT (@gval gT K) (@gval gT H)) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))), @semiregular gT (@gval gT K) (@gval gT H) *)
by move=> prKH tiKcH x Hx; rewrite prKH.
Qed.
Lemma semiprimeS K1 K2 A1 A2 :
K1 \subset K2 -> A1 \subset A2 -> semiprime K2 A2 -> semiprime K1 A1.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K2))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A2)))) (_ : @semiprime gT (@gval gT K2) A2), @semiprime gT (@gval gT K1) A1 *)
move=> sK12 sA12 prKA2 x /setD1P[ntx A1x].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1) (@centraliser gT A1)) *)
apply/eqP; rewrite eqEsubset andbC -{1}cent_set1 setIS ?centS ?sub1set //=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K1) (@centraliser gT A1))))) *)
rewrite -(setIidPl sK12) -!setIA prKA2 ?setIS ?centS //.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) A2 (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))) *)
by rewrite !inE ntx (subsetP sA12).
Qed.
Lemma cent_semiprime H K X :
semiprime K H -> X \subset H -> X :!=: 1 -> 'C_K(X) = 'C_K(H).
Lemma stab_semiprime H K X :
semiprime K H -> X \subset K -> 'C_H(X) != 1 -> 'C_H(X) = H.
Proof.
(* Goal: forall (_ : @semiprime gT (@gval gT K) (@gval gT H)) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@centraliser gT (@gval gT X))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@centraliser gT (@gval gT X))) (@gval gT H) *)
move=> prKH sXK ntCHX; apply/setIidPl; rewrite centsC -subsetIidl.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X) (@centraliser gT (@gval gT H)))))) *)
rewrite -{2}(setIidPl sXK) -setIA -(cent_semiprime prKH _ ntCHX) ?subsetIl //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT X) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT (@setI_group gT H (@centraliser_group gT (@gval gT X)))))))))) *)
by rewrite !subsetI subxx sXK centsC subsetIr.
Qed.
Lemma cent_semiregular H K X :
semiregular K H -> X \subset H -> X :!=: 1 -> 'C_K(X) = 1.
Lemma regular_norm_dvd_pred K H :
H \subset 'N(K) -> semiregular K H -> #|H| %| #|K|.-1.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT K)))))) (_ : @semiregular gT (@gval gT K) (@gval gT H)), is_true (dvdn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (Nat.pred (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
move=> nKH regH; have actsH: [acts H, on K^# | 'J] by rewrite astabsJ normD1.
(* Goal: is_true (dvdn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (Nat.pred (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
rewrite (cardsD1 1 K) group1 -(acts_sum_card_orbit actsH) /=.
(* Goal: is_true (dvdn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@BigOp.bigop nat (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun T : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody nat (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) T addn (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) T (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT H)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) T)))))) *)
rewrite (eq_bigr (fun _ => #|H|)) ?sum_nat_const ?dvdn_mull //.
(* Goal: forall (i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (_ : is_true (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT H)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))))))), @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) i))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
move=> _ /imsetP[x /setIdP[ntx Kx] ->]; rewrite card_orbit astab1J.
(* Goal: @eq nat (@indexg gT (@gval gT H) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite ['C_H[x]](trivgP _) ?indexg1 //=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) *)
apply/subsetP=> y /setIP[Hy cxy]; apply: contraR ntx => nty.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) *)
by rewrite -[[set 1]](regH y) inE ?nty // Kx cent1C.
Qed.
Lemma regular_norm_coprime K H :
H \subset 'N(K) -> semiregular K H -> coprime #|K| #|H|.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT K)))))) (_ : @semiregular gT (@gval gT K) (@gval gT H)), is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
move=> nKH regH.
(* Goal: is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
by rewrite (coprime_dvdr (regular_norm_dvd_pred nKH regH)) ?coprimenP.
Qed.
Lemma semiregularJ K H x : semiregular K H -> semiregular (K :^ x) (H :^ x).
Proof.
(* Goal: forall _ : @semiregular gT (@gval gT K) (@gval gT H), @semiregular gT (@conjugate gT (@gval gT K) x) (@conjugate gT (@gval gT H) x) *)
move=> regH yx; rewrite -conjD1g => /imsetP[y Hy ->].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@gval gT K) x) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (@conjg gT y x)))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by rewrite cent1J -conjIg regH ?conjs1g.
Qed.
Lemma semiprimeJ K H x : semiprime K H -> semiprime (K :^ x) (H :^ x).
Proof.
(* Goal: forall _ : @semiprime gT (@gval gT K) (@gval gT H), @semiprime gT (@conjugate gT (@gval gT K) x) (@conjugate gT (@gval gT H) x) *)
move=> prH yx; rewrite -conjD1g => /imsetP[y Hy ->].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@gval gT K) x) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (@conjg gT y x)))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@gval gT K) x) (@centraliser gT (@conjugate gT (@gval gT H) x))) *)
by rewrite cent1J centJ -!conjIg prH.
Qed.
Lemma normedTI_P A G L :
reflect [/\ A != set0, L \subset 'N_G(A)
& {in G, forall g, ~~ [disjoint A & A :^ g] -> g \in L}]
(normedTI A G L).
Arguments normedTI_P {A G L}.
Lemma normedTI_memJ_P A G L :
reflect [/\ A != set0, L \subset G
& {in A & G, forall a g, (a ^ g \in A) = (g \in L)}]
(normedTI A G L).
Proof.
(* Goal: Bool.reflect (and3 (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) A (@set0 (FinGroup.arg_finType (FinGroup.base gT)))))) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun a g : FinGroup.arg_sort (FinGroup.base gT) => @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall a g : FinGroup.arg_sort (FinGroup.base gT), @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))))))) (@normedTI gT A (@gval gT G) (@gval gT L)) *)
apply: (iffP normedTI_P) => [[-> /subsetIP[sLG nAL] tiAG] | [-> sLG tiAG]].
(* Goal: and3 (is_true true) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A)))))) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => forall _ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall (g : FinGroup.arg_sort (FinGroup.base gT)) (_ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g)))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))))) *)
(* Goal: and3 (is_true true) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun a g : FinGroup.arg_sort (FinGroup.base gT) => @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall a g : FinGroup.arg_sort (FinGroup.base gT), @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))))) *)
split=> // a g Aa Gg; apply/idP/idP=> [Aag | Lg]; last first.
(* Goal: and3 (is_true true) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A)))))) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => forall _ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall (g : FinGroup.arg_sort (FinGroup.base gT)) (_ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g)))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))))) *)
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))) *)
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) *)
by rewrite memJ_norm ?(subsetP nAL).
(* Goal: and3 (is_true true) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A)))))) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => forall _ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall (g : FinGroup.arg_sort (FinGroup.base gT)) (_ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g)))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))))) *)
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))) *)
by apply/tiAG/pred0Pn=> //; exists (a ^ g)%g; rewrite /= Aag memJ_conjg.
(* Goal: and3 (is_true true) (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A)))))) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun g : FinGroup.arg_sort (FinGroup.base gT) => forall _ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall (g : FinGroup.arg_sort (FinGroup.base gT)) (_ : is_true (negb (@disjoint (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g)))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))))) *)
split=> // [ | g Gg /pred0Pn[ag /=]]; last first.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A))))) *)
(* Goal: forall _ : is_true (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) ag (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) ag (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT A g))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))) *)
by rewrite andbC => /andP[/imsetP[a Aa ->]]; rewrite tiAG.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A))))) *)
apply/subsetP=> g Lg; have Gg := subsetP sLG g Lg.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A))))) *)
by rewrite !inE Gg; apply/subsetP=> _ /imsetP[a Aa ->]; rewrite tiAG.
Qed.
Lemma partition_class_support A G :
A != set0 -> trivIset (A :^: G) -> partition (A :^: G) (class_support A G).
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) A (@set0 (FinGroup.arg_finType (FinGroup.base gT)))))) (_ : is_true (@trivIset (FinGroup.finType (FinGroup.base gT)) (@conjugates gT A (@gval gT G)))), is_true (@partition (FinGroup.finType (FinGroup.base gT)) (@conjugates gT A (@gval gT G)) (@class_support gT A (@gval gT G))) *)
rewrite /partition cover_imset -class_supportEr eqxx => nzA ->.
(* Goal: is_true (andb true (andb true (negb (@in_mem (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@set0 (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT A (@gval gT G)))))))) *)
by apply: contra nzA => /imsetP[x _ /eqP]; rewrite eq_sym -!cards_eq0 cardJg.
Qed.
Lemma partition_normedTI A G L :
normedTI A G L -> partition (A :^: G) (class_support A G).
Proof.
(* Goal: forall _ : is_true (@normedTI gT A (@gval gT G) (@gval gT L)), is_true (@partition (FinGroup.finType (FinGroup.base gT)) (@conjugates gT A (@gval gT G)) (@class_support gT A (@gval gT G))) *)
by case/and3P=> ntA tiAG _; apply: partition_class_support.
Qed.
Lemma card_support_normedTI A G L :
normedTI A G L -> #|class_support A G| = (#|A| * #|G : L|)%N.
Lemma normedTI_S A B G L :
A != set0 -> L \subset 'N(A) -> A \subset B -> normedTI B G L ->
normedTI A G L.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) A (@set0 (FinGroup.arg_finType (FinGroup.base gT)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT A))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)))) (_ : is_true (@normedTI gT B (@gval gT G) (@gval gT L))), is_true (@normedTI gT A (@gval gT G) (@gval gT L)) *)
move=> nzA /subsetP nAL /subsetP sAB /normedTI_memJ_P[nzB sLG tiB].
(* Goal: is_true (@normedTI gT A (@gval gT G) (@gval gT L)) *)
apply/normedTI_memJ_P; split=> // a x Aa Gx.
(* Goal: @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))) *)
by apply/idP/idP => [Aax | /nAL/memJ_norm-> //]; rewrite -(tiB a) ?sAB.
Qed.
Lemma cent1_normedTI A G L :
normedTI A G L -> {in A, forall x, 'C_G[x] \subset L}.
Proof.
(* Goal: forall _ : is_true (@normedTI gT A (@gval gT G) (@gval gT L)), @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L))))) (inPhantom (forall x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))))) *)
case/normedTI_memJ_P=> [_ _ tiAG] x Ax; apply/subsetP=> y /setIP[Gy cxy].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT L)))) *)
by rewrite -(tiAG x) // /(x ^ y) -(cent1P cxy) mulKg.
Qed.
Lemma Frobenius_actionP G H :
reflect (has_Frobenius_action G H) [Frobenius G with complement H].
Section FrobeniusProperties.
Variables G H K : {group gT}.
Hypothesis frobG : [Frobenius G = K ><| H].
Lemma FrobeniusWker : [Frobenius G with kernel K].
Proof.
(* Goal: is_true (@Frobenius_group_with_kernel gT (@gval gT G) (@gval gT K)) *)
by apply/existsP; exists H.
Qed.
Lemma FrobeniusWcompl : [Frobenius G with complement H].
Proof.
(* Goal: is_true (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT H)) *)
by case/andP: frobG.
Qed.
Lemma FrobeniusW : [Frobenius G].
Proof.
(* Goal: is_true (@Frobenius_group gT (@gval gT G)) *)
by apply/existsP; exists H; apply: FrobeniusWcompl.
Qed.
Lemma Frobenius_context :
[/\ K ><| H = G, K :!=: 1, H :!=: 1, K \proper G & H \proper G].
Proof.
(* Goal: and5 (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
have [/eqP defG neqHG ntH _] := and4P frobG; rewrite setD_eq0 subG1 in ntH.
(* Goal: and5 (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
have ntK: K :!=: 1 by apply: contraNneq neqHG => K1; rewrite -defG K1 sdprod1g.
(* Goal: and5 (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
rewrite properEcard properEneq neqHG; have /mulG_sub[-> ->] := sdprodW defG.
(* Goal: and5 (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (andb true (leq (S (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))))) (is_true (andb true true)) *)
by rewrite -(sdprod_card defG) ltn_Pmulr ?cardG_gt1.
Qed.
Lemma Frobenius_partition : partition (gval K |: (H^# :^: K)) G.
Proof.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))) (@gval gT G)) *)
have [/eqP defG _ tiHG] := and3P frobG; have [_ tiH1G /eqP defN] := and3P tiHG.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))) (@gval gT G)) *)
have [[_ /mulG_sub[sKG sHG] nKH tiKH] mulHK] := (sdprodP defG, sdprodWC defG).
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))) (@gval gT G)) *)
set HG := H^# :^: K; set KHG := _ |: _.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
have defHG: HG = H^# :^: G.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
(* Goal: @eq (@set_of (set_of_finType (FinGroup.finType (FinGroup.base gT))) (Phant (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))))) HG (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G)) *)
have: 'C_G[H^# | 'Js] * K = G by rewrite astab1Js defN mulHK.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
(* Goal: forall _ : @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@set1 (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))) (conjsg_action gT))) (@gval gT K)) (@gval gT G), @eq (@set_of (set_of_finType (FinGroup.finType (FinGroup.base gT))) (Phant (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))))) HG (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G)) *)
move/subgroup_transitiveP/atransP.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
(* Goal: forall _ : forall (s : @set_of (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (Phant (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))))) (_ : is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) s)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) s (conjsg_action gT))) (x : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (_ : is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) x (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) s)))), @eq (@set_of (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (Phant (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))))) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (conjsg_action gT) (@gval gT K) x) s, @eq (@set_of (set_of_finType (FinGroup.finType (FinGroup.base gT))) (Phant (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))))) HG (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G)) *)
by apply; rewrite ?atrans_orbit ?orbit_refl.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
have /and3P[defHK _ nzHG] := partition_normedTI tiHG.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
rewrite -defHG in defHK nzHG tiH1G.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
have [tiKHG HG'K]: trivIset KHG /\ gval K \notin HG.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
(* Goal: and (is_true (@trivIset (FinGroup.arg_finType (FinGroup.base gT)) KHG)) (is_true (negb (@in_mem (GroupSet.sort (FinGroup.base gT)) (@gval gT K) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) HG))))) *)
apply: trivIsetU1 => // _ /imsetP[x Kx ->]; rewrite -setI_eq0.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
(* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@conjugate gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) x)) (@set0 (FinGroup.arg_finType (FinGroup.base gT)))) *)
by rewrite -(conjGid Kx) -conjIg setIDA tiKH setDv conj0g.
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) KHG (@gval gT G)) *)
rewrite /partition andbC tiKHG !inE negb_or nzHG eq_sym -card_gt0 cardG_gt0 /=.
(* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@cover (FinGroup.arg_finType (FinGroup.base gT)) KHG) (@gval gT G)) *)
rewrite eqEcard; apply/andP; split.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cover (FinGroup.arg_finType (FinGroup.base gT)) KHG))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cover (FinGroup.arg_finType (FinGroup.base gT)) KHG))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
rewrite /cover big_setU1 //= subUset sKG -/(cover HG) (eqP defHK).
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cover (FinGroup.arg_finType (FinGroup.base gT)) KHG))))) *)
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@class_support gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
by rewrite class_support_subG // (subset_trans _ sHG) ?subD1set.
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cover (FinGroup.arg_finType (FinGroup.base gT)) KHG))))) *)
rewrite -(eqnP tiKHG) big_setU1 //= (eqnP tiH1G) (eqP defHK).
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (addn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class_support gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G))))))) *)
rewrite (card_support_normedTI tiHG) -(Lagrange sHG) (cardsD1 1) group1 mulSn.
(* Goal: is_true (leq (addn (@indexg gT (@gval gT G) (@gval gT H)) (muln (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@setD (FinGroup.finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))) (@indexg gT (@gval gT G) (@gval gT H)))) (addn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))) (@indexg gT (@gval gT G) (@gval gT H))))) *)
by rewrite leq_add2r -mulHK indexMg -indexgI tiKH indexg1.
Qed.
Lemma Frobenius_cent1_ker : {in K^#, forall x, 'C_G[x] \subset K}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (inPhantom (forall x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
have [/eqP defG _ /normedTI_memJ_P[_ _ tiHG]] := and3P frobG.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (inPhantom (forall x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
move=> x /setD1P[ntx Kx]; have [_ /mulG_sub[sKG _] _ tiKH] := sdprodP defG.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) *)
have [/eqP <- _ _] := and3P Frobenius_partition; rewrite big_distrl /=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K)))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) i (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) *)
apply/bigcupsP=> _ /setU1P[|/imsetP[y Ky]] ->; first exact: subsetIl.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) y) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) *)
apply: contraR ntx => /subsetPn[z]; rewrite inE mem_conjg => /andP[Hzy cxz] _.
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
rewrite -(conjg_eq1 x y^-1) -in_set1 -set1gE -tiKH inE andbC.
(* Goal: is_true (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@conjg gT x (@invg (FinGroup.base gT) y)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@conjg gT x (@invg (FinGroup.base gT) y)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) *)
rewrite -(tiHG _ _ Hzy) ?(subsetP sKG) ?in_group // Ky andbT -conjJg.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT (@conjg gT z x) (@invg (FinGroup.base gT) y)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))) *)
by rewrite /(z ^ x) (cent1P cxz) mulKg.
Qed.
Lemma Frobenius_reg_ker : semiregular K H.
Proof.
(* Goal: @semiregular gT (@gval gT K) (@gval gT H) *)
move=> x /setD1P[ntx Hx].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
apply/trivgP/subsetP=> y /setIP[Ky cxy]; apply: contraR ntx => nty.
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
have K1y: y \in K^# by rewrite inE nty.
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
have [/eqP/sdprod_context[_ sHG _ _ tiKH] _] := andP frobG.
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
suffices: x \in K :&: H by rewrite tiKH inE.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) *)
by rewrite inE (subsetP (Frobenius_cent1_ker K1y)) // inE cent1C (subsetP sHG).
Qed.
Lemma Frobenius_reg_compl : semiregular H K.
Proof.
(* Goal: @semiregular gT (@gval gT H) (@gval gT K) *)
by apply: semiregular_sym; apply: Frobenius_reg_ker.
Qed.
Lemma Frobenius_dvd_ker1 : #|H| %| #|K|.-1.
Lemma ltn_odd_Frobenius_ker : odd #|G| -> #|H|.*2 < #|K|.
Proof.
(* Goal: forall _ : is_true (odd (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (leq (S (double (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) *)
move/oddSg=> oddG.
(* Goal: is_true (leq (S (double (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) *)
have [/sdprodW/mulG_sub[sKG sHG] ntK _ _ _] := Frobenius_context.
(* Goal: is_true (leq (S (double (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) *)
by rewrite dvdn_double_ltn ?oddG ?cardG_gt1 ?Frobenius_dvd_ker1.
Qed.
Lemma Frobenius_index_dvd_ker1 : #|G : K| %| #|K|.-1.
Proof.
(* Goal: is_true (dvdn (@indexg gT (@gval gT G) (@gval gT K)) (Nat.pred (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
have[defG _ _ /andP[sKG _] _] := Frobenius_context.
(* Goal: is_true (dvdn (@indexg gT (@gval gT G) (@gval gT K)) (Nat.pred (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
by rewrite -divgS // -(sdprod_card defG) mulKn ?Frobenius_dvd_ker1.
Qed.
Lemma Frobenius_coprime : coprime #|K| #|H|.
Proof.
(* Goal: is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
by rewrite (coprime_dvdr Frobenius_dvd_ker1) ?coprimenP.
Qed.
Lemma Frobenius_trivg_cent : 'C_K(H) = 1.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by apply: (cent_semiregular Frobenius_reg_ker); case: Frobenius_context.
Qed.
Lemma Frobenius_index_coprime : coprime #|K| #|G : K|.
Proof.
(* Goal: is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@indexg gT (@gval gT G) (@gval gT K))) *)
by rewrite (coprime_dvdr Frobenius_index_dvd_ker1) ?coprimenP.
Qed.
Lemma Frobenius_ker_Hall : Hall G K.
Proof.
(* Goal: is_true (@Hall gT (@gval gT G) (@gval gT K)) *)
have [_ _ _ /andP[sKG _] _] := Frobenius_context.
(* Goal: is_true (@Hall gT (@gval gT G) (@gval gT K)) *)
by rewrite /Hall sKG Frobenius_index_coprime.
Qed.
Lemma Frobenius_compl_Hall : Hall G H.
Proof.
(* Goal: is_true (@Hall gT (@gval gT G) (@gval gT H)) *)
have [defG _ _ _ _] := Frobenius_context.
(* Goal: is_true (@Hall gT (@gval gT G) (@gval gT H)) *)
by rewrite -(sdprod_Hall defG) Frobenius_ker_Hall.
Qed.
End FrobeniusProperties.
Lemma normedTI_J x A G L : normedTI (A :^ x) (G :^ x) (L :^ x) = normedTI A G L.
Proof.
(* Goal: @eq bool (@normedTI gT (@conjugate gT A x) (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT L) x)) (@normedTI gT A (@gval gT G) (@gval gT L)) *)
rewrite {1}/normedTI normJ -conjIg -(conj0g x) !(can_eq (conjsgK x)).
(* Goal: @eq bool (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) A (@set0 (FinGroup.arg_finType (FinGroup.base gT))))) (andb (@trivIset (FinGroup.finType (FinGroup.base gT)) (@conjugates gT (@conjugate gT A x) (@conjugate gT (@gval gT G) x))) (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A)) (@gval gT L)))) (@normedTI gT A (@gval gT G) (@gval gT L)) *)
congr [&& _, _ == _ & _]; rewrite /cover (reindex_inj (@conjsg_inj _ x)).
(* Goal: @eq (Equality.sort nat_eqType) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@set0 (FinGroup.finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun j : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) j (@Monoid.operator (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@set0 (FinGroup.finType (FinGroup.base gT))) (@Monoid.com_operator (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@set0 (FinGroup.finType (FinGroup.base gT))) (setU_comoid (FinGroup.finType (FinGroup.base gT))))) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@conjugate gT j x) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT (@conjugate gT A x) (@conjugate gT (@gval gT G) x))))) (@conjugate gT j x)))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@set0 (FinGroup.finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun B : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) B (@setU (FinGroup.finType (FinGroup.base gT))) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) B (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT A (@gval gT G))))) B))))) *)
(* Goal: @eq (Equality.sort nat_eqType) (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun j : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) j (@Monoid.operator nat O (@Monoid.com_operator nat O addn_comoid)) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@conjugate gT j x) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT (@conjugate gT A x) (@conjugate gT (@gval gT G) x))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT j x)))))) (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun B : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) B addn (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) B (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT A (@gval gT G))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) B))))) *)
by apply: eq_big => Hy; rewrite ?orbit_conjsg ?cardJg.
(* Goal: @eq (Equality.sort nat_eqType) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@set0 (FinGroup.finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun j : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) j (@Monoid.operator (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@set0 (FinGroup.finType (FinGroup.base gT))) (@Monoid.com_operator (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@set0 (FinGroup.finType (FinGroup.base gT))) (setU_comoid (FinGroup.finType (FinGroup.base gT))))) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@conjugate gT j x) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT (@conjugate gT A x) (@conjugate gT (@gval gT G) x))))) (@conjugate gT j x)))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@set0 (FinGroup.finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun B : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) B (@setU (FinGroup.finType (FinGroup.base gT))) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) B (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT A (@gval gT G))))) B))))) *)
by rewrite bigcupJ cardJg (eq_bigl _ _ (orbit_conjsg _ _ _ _)).
Qed.
Lemma FrobeniusJcompl x G H :
[Frobenius G :^ x with complement H :^ x] = [Frobenius G with complement H].
Proof.
(* Goal: @eq bool (@Frobenius_group_with_complement gT (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT H) x)) (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT H)) *)
by congr (_ && _); rewrite ?(can_eq (conjsgK x)) // -conjD1g normedTI_J.
Qed.
Lemma FrobeniusJ x G K H :
[Frobenius G :^ x = K :^ x ><| H :^ x] = [Frobenius G = K ><| H].
Proof.
(* Goal: @eq bool (@Frobenius_group_with_kernel_and_complement gT (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT K) x) (@conjugate gT (@gval gT H) x)) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
by congr (_ && _); rewrite ?FrobeniusJcompl // -sdprodJ (can_eq (conjsgK x)).
Qed.
Lemma FrobeniusJker x G K :
[Frobenius G :^ x with kernel K :^ x] = [Frobenius G with kernel K].
Proof.
(* Goal: @eq bool (@Frobenius_group_with_kernel gT (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT K) x)) (@Frobenius_group_with_kernel gT (@gval gT G) (@gval gT K)) *)
apply/existsP/existsP=> [] [H]; last by exists (H :^ x)%G; rewrite FrobeniusJ.
(* Goal: forall _ : is_true (@Frobenius_group_with_kernel_and_complement gT (@conjugate gT (@gval gT G) x) (@conjugate gT (@gval gT K) x) (@gval gT H)), @ex (Finite.sort (group_of_finType gT)) (fun x : Finite.sort (group_of_finType gT) => is_true (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT x))) *)
by rewrite -(conjsgKV x H) FrobeniusJ; exists (H :^ x^-1)%G.
Qed.
Lemma FrobeniusJgroup x G : [Frobenius G :^ x] = [Frobenius G].
Proof.
(* Goal: @eq bool (@Frobenius_group gT (@conjugate gT (@gval gT G) x)) (@Frobenius_group gT (@gval gT G)) *)
apply/existsP/existsP=> [] [H].
(* Goal: forall _ : is_true (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT H)), @ex (Finite.sort (group_of_finType gT)) (fun x0 : Finite.sort (group_of_finType gT) => is_true (@Frobenius_group_with_complement gT (@conjugate gT (@gval gT G) x) (@gval gT x0))) *)
(* Goal: forall _ : is_true (@Frobenius_group_with_complement gT (@conjugate gT (@gval gT G) x) (@gval gT H)), @ex (Finite.sort (group_of_finType gT)) (fun x : Finite.sort (group_of_finType gT) => is_true (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT x))) *)
by rewrite -(conjsgKV x H) FrobeniusJcompl; exists (H :^ x^-1)%G.
(* Goal: forall _ : is_true (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT H)), @ex (Finite.sort (group_of_finType gT)) (fun x0 : Finite.sort (group_of_finType gT) => is_true (@Frobenius_group_with_complement gT (@conjugate gT (@gval gT G) x) (@gval gT x0))) *)
by exists (H :^ x)%G; rewrite FrobeniusJcompl.
Qed.
Lemma Frobenius_ker_dvd_ker1 G K :
[Frobenius G with kernel K] -> #|G : K| %| #|K|.-1.
Proof.
(* Goal: forall _ : is_true (@Frobenius_group_with_kernel gT (@gval gT G) (@gval gT K)), is_true (dvdn (@indexg gT (@gval gT G) (@gval gT K)) (Nat.pred (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))))) *)
by case/existsP=> H; apply: Frobenius_index_dvd_ker1.
Qed.
Lemma Frobenius_ker_coprime G K :
[Frobenius G with kernel K] -> coprime #|K| #|G : K|.
Proof.
(* Goal: forall _ : is_true (@Frobenius_group_with_kernel gT (@gval gT G) (@gval gT K)), is_true (coprime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@indexg gT (@gval gT G) (@gval gT K))) *)
by case/existsP=> H; apply: Frobenius_index_coprime.
Qed.
Lemma Frobenius_semiregularP G K H :
K ><| H = G -> K :!=: 1 -> H :!=: 1 ->
reflect (semiregular K H) [Frobenius G = K ><| H].
Proof.
(* Goal: forall (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))) (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))), Bool.reflect (@semiregular gT (@gval gT K) (@gval gT H)) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
move=> defG ntK ntH.
(* Goal: Bool.reflect (@semiregular gT (@gval gT K) (@gval gT H)) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
apply: (iffP idP) => [|regG]; first exact: Frobenius_reg_ker.
(* Goal: is_true (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
have [nsKG sHG defKH nKH tiKH]:= sdprod_context defG; have [sKG _]:= andP nsKG.
(* Goal: is_true (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
apply/and3P; split; first by rewrite defG.
(* Goal: is_true (@normedTI gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G) (@gval gT H)) *)
(* Goal: is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (@gval gT G))) *)
by rewrite eqEcard sHG -(sdprod_card defG) -ltnNge ltn_Pmull ?cardG_gt1.
(* Goal: is_true (@normedTI gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT G) (@gval gT H)) *)
apply/normedTI_memJ_P; rewrite setD_eq0 subG1 sHG -defKH -(normC nKH).
(* Goal: and3 (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true true) (@prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))) (fun a g : FinGroup.arg_sort (FinGroup.base gT) => @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (inPhantom (forall a g : FinGroup.arg_sort (FinGroup.base gT), @eq bool (@in_mem (FinGroup.sort (FinGroup.base gT)) (@conjg gT a g) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) g (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))))) *)
split=> // z _ /setD1P[ntz Hz] /mulsgP[y x Hy Kx ->]; rewrite groupMl // !inE.
(* Goal: @eq bool (andb (negb (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) (@conjg gT z (@mulg (FinGroup.base gT) y x)) (oneg (FinGroup.base gT)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@conjg gT z (@mulg (FinGroup.base gT) y x)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite conjg_eq1 ntz; apply/idP/idP=> [Hzxy | Hx]; last by rewrite !in_group.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
apply: (subsetP (sub1G H)); have Hzy: z ^ y \in H by apply: groupJ.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) *)
rewrite -(regG (z ^ y)); last by apply/setD1P; rewrite conjg_eq1.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (@conjg gT z y))))))) *)
rewrite inE Kx cent1C (sameP cent1P commgP) -in_set1 -[[set 1]]tiKH inE /=.
(* Goal: is_true (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@conjg gT z y) x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@commg gT (@conjg gT z y) x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
rewrite andbC groupM ?groupV -?conjgM //= commgEr groupMr //.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT (@invg (FinGroup.base gT) x) (@conjg gT z y)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) *)
by rewrite memJ_norm ?(subsetP nKH) ?groupV.
Qed.
Lemma prime_FrobeniusP G K H :
K :!=: 1 -> prime #|H| ->
reflect (K ><| H = G /\ 'C_K(H) = 1) [Frobenius G = K ><| H].
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))) (_ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))), Bool.reflect (and (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
move=> ntK H_pr; have ntH: H :!=: 1 by rewrite -cardG_gt1 prime_gt1.
(* Goal: Bool.reflect (and (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
have [defG | not_sdG] := eqVneq (K ><| H) G; last first.
(* Goal: Bool.reflect (and (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
(* Goal: Bool.reflect (and (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
by apply: (iffP andP) => [] [defG]; rewrite defG ?eqxx in not_sdG.
(* Goal: Bool.reflect (and (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)) *)
apply: (iffP (Frobenius_semiregularP defG ntK ntH)) => [regH | [_ regH x]].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
(* Goal: and (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *)
split=> //; have [x defH] := cyclicP (prime_cyclic H_pr).
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@centraliser gT (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
by rewrite defH cent_cycle regH // !inE defH cycle_id andbT -cycle_eq1 -defH.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT))))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
case/setD1P=> nt_x Hx; apply/trivgP; rewrite -regH setIS //= -cent_cycle.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@cycle gT x)))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H))))) *)
by rewrite centS // prime_meetG // (setIidPr _) ?cycle_eq1 ?cycle_subG.
Qed.
Lemma Frobenius_subl G K K1 H :
K1 :!=: 1 -> K1 \subset K -> H \subset 'N(K1) -> [Frobenius G = K ><| H] ->
[Frobenius K1 <*> H = K1 ><| H].
Lemma Frobenius_subr G K H H1 :
H1 :!=: 1 -> H1 \subset H -> [Frobenius G = K ><| H] ->
[Frobenius K <*> H1 = K ><| H1].
Lemma Frobenius_kerP G K :
reflect [/\ K :!=: 1, K \proper G, K <| G
& {in K^#, forall x, 'C_G[x] \subset K}]
[Frobenius G with kernel K].
Lemma set_Frobenius_compl G K H :
K ><| H = G -> [Frobenius G with kernel K] -> [Frobenius G = K ><| H].
Lemma Frobenius_kerS G K G1 :
G1 \subset G -> K \proper G1 ->
[Frobenius G with kernel K] -> [Frobenius G1 with kernel K].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G1))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G1))))) (_ : is_true (@Frobenius_group_with_kernel gT (@gval gT G) (@gval gT K))), is_true (@Frobenius_group_with_kernel gT (@gval gT G1) (@gval gT K)) *)
move=> sG1G ltKG1 /Frobenius_kerP[ntK _ /andP[_ nKG] regKG].
(* Goal: is_true (@Frobenius_group_with_kernel gT (@gval gT G1) (@gval gT K)) *)
apply/Frobenius_kerP; rewrite /normal proper_sub // (subset_trans sG1G) //.
(* Goal: and4 (is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT K) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (is_true (@proper (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G1))))) (is_true (andb true true)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G1) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (inPhantom (forall x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G1) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))))) *)
by split=> // x /regKG; apply: subset_trans; rewrite setSI.
Qed.
Lemma Frobenius_action_kernel_def G H K sT S to :
K ><| H = G -> @Frobenius_action _ G H sT S to ->
K :=: 1 :|: [set x in G | 'Fix_(S | to)[x] == set0].
Proof.
(* Goal: forall (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (semidirect_product gT (@gval gT K) (@gval gT H)) (@gval gT G)) (_ : @Frobenius_action gT (@gval gT G) (@gval gT H) sT S to), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@setU (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))))) *)
move=> defG FrobG.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@setU (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))))) *)
have partG: partition (gval K |: (H^# :^: K)) G.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@setU (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))))) *)
(* Goal: is_true (@partition (FinGroup.arg_finType (FinGroup.base gT)) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))) (@gval gT G)) *)
apply: Frobenius_partition; apply/andP; rewrite defG; split=> //.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@setU (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))))) *)
(* Goal: is_true (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT H)) *)
by apply/Frobenius_actionP; apply: HasFrobeniusAction FrobG.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@setU (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))))) *)
have{FrobG} [ffulG transG regG ntH [u Su defH]]:= FrobG.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT K) (@setU (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))))) *)
apply/setP=> x; rewrite !inE; have [-> | ntx] := altP eqP; first exact: group1.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (orb false (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT)))) *)
rewrite /= -(cover_partition partG) /cover.
(* Goal: @eq bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun B : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) B (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) B (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K)))))) B))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) *)
have neKHy y: gval K <> H^# :^ y.
(* Goal: @eq bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun B : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) B (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) B (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K)))))) B))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) *)
(* Goal: not (@eq (GroupSet.sort (FinGroup.base gT)) (@gval gT K) (@conjugate gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) y)) *)
by move/setP/(_ 1); rewrite group1 conjD1g setD11.
(* Goal: @eq bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun B : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) B (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) B (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@setU (group_set_finType (FinGroup.base gT)) (@set1 (group_set_finType (FinGroup.base gT)) (@gval gT K)) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K)))))) B))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) *)
rewrite big_setU1 /= ?inE; last by apply/imsetP=> [[y _ /neKHy]].
(* Goal: @eq bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (andb (orb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i)))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) *)
have [nsKG sHG _ _ tiKH] := sdprod_context defG; have [sKG nKG]:= andP nsKG.
(* Goal: @eq bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (andb (orb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i)))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) *)
symmetry; case Kx: (x \in K) => /=.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) false *)
(* Goal: @eq bool (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT)) true *)
apply/set0Pn=> [[v /setIP[Sv]]]; have [y Gy ->] := atransP2 transG Su Sv.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) false *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to u y) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))), False *)
rewrite -sub1set -astabC sub1set astab1_act mem_conjg => Hxy.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) false *)
(* Goal: False *)
case/negP: ntx; rewrite -in_set1 -(conjgKV y x) -mem_conjgV conjs1g -tiKH.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) false *)
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT x (@invg (FinGroup.base gT) y)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K) (@gval gT H))))) *)
by rewrite defH setIA inE -mem_conjg (setIidPl sKG) (normsP nKG) ?Kx.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set0 (FinGroup.arg_finType (FinGroup.base gT))) (index_enum (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (fun i : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@setU (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) i (@mem (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (predPredType (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@conjugates gT (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@set1 (FinGroup.finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))) (@gval gT K))))) i))))) (@eq_op (set_of_eqType sT) (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))) (@set0 sT))) false *)
apply/andP=> [[/bigcupP[_ /imsetP[y Ky ->] Hyx] /set0Pn[]]]; exists (to u y).
(* Goal: is_true (@in_mem (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to u y) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@setI sT S (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) *)
rewrite inE (actsP (atrans_acts transG)) ?(subsetP sKG) // Su.
(* Goal: is_true (andb true (@in_mem (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to u y) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) *)
rewrite -sub1set -astabC sub1set astab1_act.
(* Goal: is_true (andb true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT u) to) y))))) *)
by rewrite conjD1g defH conjIg !inE in Hyx; case/and3P: Hyx.
Qed.
End FrobeniusBasics.
Arguments normedTI_P {gT A G L}.
Arguments normedTI_memJ_P {gT A G L}.
Arguments Frobenius_kerP {gT G K}.
Lemma Frobenius_coprime_quotient (gT : finGroupType) (G K H N : {group gT}) :
K ><| H = G -> N <| G -> coprime #|K| #|H| /\ H :!=: 1%g ->
N \proper K /\ {in H^#, forall x, 'C_K[x] \subset N} ->
[Frobenius G / N = (K / N) ><| (H / N)]%g.
Section InjmFrobenius.
Variables (gT rT : finGroupType) (D G : {group gT}) (f : {morphism D >-> rT}).
Implicit Types (H K : {group gT}) (sGD : G \subset D) (injf : 'injm f).
Lemma injm_Frobenius_compl H sGD injf :
[Frobenius G with complement H] -> [Frobenius f @* G with complement f @* H].
Proof.
(* Goal: forall _ : is_true (@Frobenius_group_with_complement gT (@gval gT G) (@gval gT H)), is_true (@Frobenius_group_with_complement rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) *)
case/andP=> neqGH /normedTI_P[nzH /subsetIP[sHG _] tiHG].
(* Goal: is_true (@Frobenius_group_with_complement rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) *)
have sHD := subset_trans sHG sGD; have sH1D := subset_trans (subD1set H 1) sHD.
(* Goal: is_true (@Frobenius_group_with_complement rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) *)
apply/andP; rewrite (can_in_eq (injmK injf)) //; split=> //.
(* Goal: is_true (@normedTI rT (@setD (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT)))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) *)
apply/normedTI_P; rewrite normD1 -injmD1 // -!cards_eq0 card_injm // in nzH *.
rewrite subsetI normG morphimS //; split=> // _ /morphimP[x Dx Gx ->] ti'fHx.
rewrite mem_morphim ?tiHG //; apply: contra ti'fHx; rewrite -!setI_eq0 => tiHx.
by rewrite -morphimJ // -injmI ?conj_subG // (eqP tiHx) morphim0.
Qed.
Qed.
Lemma injm_Frobenius H K sGD injf :
[Frobenius G = K ><| H] -> [Frobenius f @* G = f @* K ><| f @* H].
Proof.
(* Goal: forall _ : is_true (@Frobenius_group_with_kernel_and_complement gT (@gval gT G) (@gval gT K) (@gval gT H)), is_true (@Frobenius_group_with_kernel_and_complement rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT K)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) *)
case/andP=> /eqP defG frobG.
(* Goal: is_true (@Frobenius_group_with_kernel_and_complement rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT K)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) *)
by apply/andP; rewrite (injm_sdprod _ injf defG) // eqxx injm_Frobenius_compl.
Qed.
Lemma injm_Frobenius_ker K sGD injf :
[Frobenius G with kernel K] -> [Frobenius f @* G with kernel f @* K].
Lemma injm_Frobenius_group sGD injf : [Frobenius G] -> [Frobenius f @* G].
Proof.
(* Goal: forall _ : is_true (@Frobenius_group gT (@gval gT G)), is_true (@Frobenius_group rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
case/existsP=> H frobG; apply/existsP; exists (f @* H)%G.
(* Goal: is_true (@Frobenius_group_with_complement rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G)) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) H))) *)
exact: injm_Frobenius_compl.
Qed.
End InjmFrobenius.
Theorem Frobenius_Ldiv (gT : finGroupType) (G : {group gT}) n :
n %| #|G| -> n %| #|'Ldiv_n(G)|.
|
Require Import Ensf.
Require Import Max.
Require Import Words.
Require Import Dec.
Require Import Reg.
Require Import Rat.
Lemma lwordnil_is_reg1 :
reconnait (singleton zero) (singleton zero) (singleton zero)
(prodcart empty (prodcart alph empty)) nil.
Proof.
(* Goal: reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) nil *)
unfold reconnait at 1 in |- *.
(* Goal: and (inmonoid alph nil) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton zero)) (and (dans e2 (singleton zero)) (chemin e1 e2 (singleton zero) (prodcart empty (prodcart alph empty)) nil))))) *)
split.
(* Goal: @ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton zero)) (and (dans e2 (singleton zero)) (chemin e1 e2 (singleton zero) (prodcart empty (prodcart alph empty)) nil)))) *)
(* Goal: inmonoid alph nil *)
apply inmonoid_nil.
(* Goal: @ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton zero)) (and (dans e2 (singleton zero)) (chemin e1 e2 (singleton zero) (prodcart empty (prodcart alph empty)) nil)))) *)
exists zero; exists zero.
(* Goal: and (dans zero (singleton zero)) (and (dans zero (singleton zero)) (chemin zero zero (singleton zero) (prodcart empty (prodcart alph empty)) nil)) *)
auto.
Qed.
Lemma lwordnil_is_reg2 :
forall w : Word,
reconnait (singleton zero) (singleton zero) (singleton zero)
(prodcart empty (prodcart alph empty)) w -> w = nil :>Word.
Lemma lwordnil_is_regS :
exists q : Ensf,
(exists e : Elt,
(exists qa : Ensf,
(exists d : Ensf,
automate q (singleton e) qa d /\
eqwordset (reconnait q (singleton e) qa d) (lword nil)))).
Proof.
(* Goal: @ex Ensf (fun q : Ensf => @ex Elt (fun e : Elt => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q (singleton e) qa d) (eqwordset (reconnait q (singleton e) qa d) (lword nil)))))) *)
exists (singleton zero).
(* Goal: @ex Elt (fun e : Elt => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate (singleton zero) (singleton e) qa d) (eqwordset (reconnait (singleton zero) (singleton e) qa d) (lword nil))))) *)
exists zero.
(* Goal: @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate (singleton zero) (singleton zero) qa d) (eqwordset (reconnait (singleton zero) (singleton zero) qa d) (lword nil)))) *)
exists (singleton zero).
(* Goal: @ex Ensf (fun d : Ensf => and (automate (singleton zero) (singleton zero) (singleton zero) d) (eqwordset (reconnait (singleton zero) (singleton zero) (singleton zero) d) (lword nil))) *)
exists (prodcart empty (prodcart alph empty)).
(* Goal: and (automate (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty))) (eqwordset (reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty))) (lword nil)) *)
split.
(* Goal: eqwordset (reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty))) (lword nil) *)
(* Goal: automate (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) *)
red in |- *; auto.
(* Goal: eqwordset (reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty))) (lword nil) *)
red in |- *; split.
(* Goal: forall _ : lword nil w, reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
(* Goal: forall _ : reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w, lword nil w *)
red in |- *.
(* Goal: forall _ : lword nil w, reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
(* Goal: forall _ : reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w, @eq Word nil w *)
symmetry in |- *; apply lwordnil_is_reg2.
(* Goal: forall _ : lword nil w, reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
(* Goal: reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
assumption.
(* Goal: forall _ : lword nil w, reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
intro.
(* Goal: reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
compute in H.
(* Goal: reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) w *)
rewrite <- H.
(* Goal: reconnait (singleton zero) (singleton zero) (singleton zero) (prodcart empty (prodcart alph empty)) nil *)
apply lwordnil_is_reg1.
Qed.
Lemma lwordnil_is_reg : isregular (lword nil).
Lemma extension_qd :
forall (w : Word) (e0 e1 e2 e3 a : Elt) (q d : Ensf),
chemin e1 e2 q d w ->
chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w.
Proof.
(* Goal: forall (w : Word) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w *)
simple induction w.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d (cons e w)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons e w) *)
(* Goal: forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d nil), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) nil *)
intros.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d (cons e w)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons e w) *)
(* Goal: chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) nil *)
cut (Chemin e1 e2 q d nil); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d (cons e w)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons e w) *)
(* Goal: forall _ : Chemin e1 e2 q d nil, chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) nil *)
intro.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d (cons e w)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons e w) *)
(* Goal: chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) nil *)
cut (dans e1 q /\ e1 = e2 :>Elt); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d (cons e w)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons e w) *)
(* Goal: forall _ : and (dans e1 q) (@eq Elt e1 e2), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) nil *)
intro H1; elim H1; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d w), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) w) (e0 e1 e2 e3 a : Elt) (q d : Ensf) (_ : chemin e1 e2 q d (cons e w)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons e w) *)
intros x w0 H e0 e1 e2 e3 a q d H0.
(* Goal: chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
cut (Chemin e1 e2 q d (cons x w0)); auto.
(* Goal: forall _ : Chemin e1 e2 q d (cons x w0), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
intro.
(* Goal: chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
cut (exists e : Elt, chemin e e2 q d w0 /\ dans e1 q /\ dans x alph /\ dans (couple e1 (couple x e)) d); auto.
(* Goal: forall _ : @ex Elt (fun e : Elt => and (chemin e e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d)))), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
intro H2; elim H2; clear H2.
(* Goal: forall (x0 : Elt) (_ : and (chemin x0 e2 q d w0) (and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x x0)) d)))), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
intros e H2; elim H2; clear H2.
(* Goal: forall (_ : chemin e e2 q d w0) (_ : and (dans e1 q) (and (dans x alph) (dans (couple e1 (couple x e)) d))), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
intros H2 H3; elim H3; clear H3.
(* Goal: forall (_ : dans e1 q) (_ : and (dans x alph) (dans (couple e1 (couple x e)) d)), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
intros H3 H4; elim H4; clear H4.
(* Goal: forall (_ : dans x alph) (_ : dans (couple e1 (couple x e)) d), chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
intros H4 H5.
(* Goal: chemin e1 e2 (add e0 q) (add (couple e0 (couple a e3)) d) (cons x w0) *)
apply (chemin_cons e e2 (add e0 q) (add (couple e0 (couple a e3)) d) w0 e1 x); auto.
Qed.
Lemma restriction_aut :
forall (w : Word) (e0 e e2 e3 a : Elt) (q d : Ensf),
~ dans e0 q ->
dans e q ->
inclus d (prodcart q (prodcart alph q)) ->
chemin e e2 (add e0 q) (add (couple e0 (couple a e3)) d) w ->
chemin e e2 q d w.
Lemma extension_aut :
forall (w : Word) (e0 e a : Elt) (q qa d : Ensf),
reconnait q (singleton e) qa d w ->
~ dans e0 q ->
dans a alph ->
reconnait (add e0 q) (singleton e0) qa (add (couple e0 (couple a e)) d)
(cons a w).
Proof.
(* Goal: forall (w : Word) (e0 e a : Elt) (q qa d : Ensf) (_ : reconnait q (singleton e) qa d w) (_ : not (dans e0 q)) (_ : dans a alph), reconnait (add e0 q) (singleton e0) qa (add (couple e0 (couple a e)) d) (cons a w) *)
unfold reconnait in |- *.
(* Goal: forall (w : Word) (e0 e a : Elt) (q qa d : Ensf) (_ : and (inmonoid alph w) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e)) (and (dans e2 qa) (chemin e1 e2 q d w)))))) (_ : not (dans e0 q)) (_ : dans a alph), and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
intros.
(* Goal: and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
elim H; clear H.
(* Goal: forall (_ : inmonoid alph w) (_ : @ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e)) (and (dans e2 qa) (chemin e1 e2 q d w))))), and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
intros H H2; elim H2; clear H2.
(* Goal: forall (x : Elt) (_ : @ex Elt (fun e2 : Elt => and (dans x (singleton e)) (and (dans e2 qa) (chemin x e2 q d w)))), and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
intros e12 H2; elim H2; clear H2.
(* Goal: forall (x : Elt) (_ : and (dans e12 (singleton e)) (and (dans x qa) (chemin e12 x q d w))), and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
intros e2 H2; elim H2; clear H2.
(* Goal: forall (_ : dans e12 (singleton e)) (_ : and (dans e2 qa) (chemin e12 e2 q d w)), and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
intros H2 H3.
(* Goal: and (inmonoid alph (cons a w)) (@ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))))) *)
split; auto.
(* Goal: @ex Elt (fun e1 : Elt => @ex Elt (fun e2 : Elt => and (dans e1 (singleton e0)) (and (dans e2 qa) (chemin e1 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w))))) *)
exists e0.
(* Goal: @ex Elt (fun e2 : Elt => and (dans e0 (singleton e0)) (and (dans e2 qa) (chemin e0 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)))) *)
exists e2.
(* Goal: and (dans e0 (singleton e0)) (and (dans e2 qa) (chemin e0 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w))) *)
split; auto.
(* Goal: and (dans e2 qa) (chemin e0 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)) *)
elim H3; clear H3; intros H3 H4.
(* Goal: and (dans e2 qa) (chemin e0 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w)) *)
split; auto.
(* Goal: chemin e0 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w) *)
cut (e12 = e :>Elt); auto.
(* Goal: forall _ : @eq Elt e12 e, chemin e0 e2 (add e0 q) (add (couple e0 (couple a e)) d) (cons a w) *)
intro H5; rewrite <- H5.
(* Goal: chemin e0 e2 (add e0 q) (add (couple e0 (couple a e12)) d) (cons a w) *)
apply (chemin_cons e12 e2 (add e0 q) (add (couple e0 (couple a e12)) d) w e0 a); auto.
(* Goal: chemin e12 e2 (add e0 q) (add (couple e0 (couple a e12)) d) w *)
apply extension_qd; auto.
Qed.
Axiom
auto_cons :
forall (q qa d : Ensf) (e0 e a : Elt) (w0 : Word),
dans a alph ->
automate q (singleton e) qa d ->
eqwordset (reconnait q (singleton e) qa d) (lword w0) ->
~ dans e0 q ->
eqwordset
(reconnait (add e0 q) (singleton e0) qa
(add (couple e0 (couple a e)) d)) (lword (cons a w0)).
Lemma lword_is_regS :
forall w : Word,
inmonoid alph w ->
exists q : Ensf,
(exists e : Elt,
(exists qa : Ensf,
(exists d : Ensf,
automate q (singleton e) qa d /\
eqwordset (reconnait q (singleton e) qa d) (lword w)))).
Lemma lword_is_reg : forall w : Word, inmonoid alph w -> isregular (lword w).
Definition est_dans_d'_2 (d : Ensf) (e y : Elt) : Prop :=
match y return Prop with
| natural n =>
False
| couple a e' =>
dans (couple (first e) (couple a (first e'))) d
| up e => False
| word w => False
end.
Definition est_dans_d' (d1 : Ensf) (x : Elt) : Prop :=
match x return Prop with
| natural n =>
False
| couple e y => est_dans_d'_2 d1 e y
| up e => False
| word w => False
end.
Definition injg_d1 (q1 d1 : Ensf) : Ensf :=
tq (est_dans_d' d1)
(prodcart (map injgauche q1) (prodcart alph (map injgauche q1))).
Definition injd_d2 (q2 d2 : Ensf) : Ensf :=
tq (est_dans_d' d2)
(prodcart (map injdroite q2) (prodcart alph (map injdroite q2))).
Lemma d_is_good :
forall q1 q2 d1 d2 : Ensf,
inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2))
(prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))).
Proof.
(* Goal: forall q1 q2 d1 d2 : Ensf, inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
intros.
(* Goal: inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
apply union_inclus.
(* Goal: inclus (injd_d2 q2 d2) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (injg_d1 q1 d1) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
apply inclus_trans with (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))).
(* Goal: inclus (injd_d2 q2 d2) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (injg_d1 q1 d1) (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) *)
unfold injg_d1 in |- *.
(* Goal: inclus (injd_d2 q2 d2) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (tq (est_dans_d' d1) (prodcart (map injgauche q1) (prodcart alph (map injgauche q1)))) (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) *)
apply inclus_tq.
(* Goal: inclus (injd_d2 q2 d2) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
unfold union_disj in |- *.
(* Goal: inclus (injd_d2 q2 d2) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) (prodcart (union (map injgauche q1) (map injdroite q2)) (prodcart alph (union (map injgauche q1) (map injdroite q2)))) *)
auto.
(* Goal: inclus (injd_d2 q2 d2) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
apply inclus_trans with (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))).
(* Goal: inclus (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (injd_d2 q2 d2) (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))) *)
unfold injd_d2 in |- *.
(* Goal: inclus (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (tq (est_dans_d' d2) (prodcart (map injdroite q2) (prodcart alph (map injdroite q2)))) (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))) *)
apply inclus_tq.
(* Goal: inclus (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
unfold union_disj in |- *.
(* Goal: inclus (prodcart (map injdroite q2) (prodcart alph (map injdroite q2))) (prodcart (union (map injgauche q1) (map injdroite q2)) (prodcart alph (union (map injgauche q1) (map injdroite q2)))) *)
auto.
Qed.
Lemma transition_dans_d1 :
forall (q1 d1 q2 d2 : Ensf) (e1 x e : Elt),
dans (couple e1 (couple x e)) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) ->
dans e1 (map injgauche q1) -> dans e (map injgauche q1).
Lemma restriction_transition_d1 :
forall (q1 d1 q2 d2 : Ensf) (e1 x e : Elt),
dans (couple e1 (couple x e)) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) ->
dans e1 (map injgauche q1) ->
dans (couple (first e1) (couple x (first e))) d1.
Lemma chemin_restriction_1 :
forall (q1 qd1 qa1 d1 q2 qa2 d2 : Ensf) (w : Word) (e1 e2 : Elt),
automate q1 qd1 qa1 d1 ->
chemin e1 e2 (union_disj q1 q2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) w ->
dans e1 (map injgauche q1) ->
dans e2 (union_disj qa1 qa2) ->
chemin (first e1) (first e2) q1 d1 w /\ dans e2 (map injgauche qa1).
Axiom
chemin_restriction_2 :
forall (q2 qd2 qa2 d2 q1 qa1 d1 : Ensf) (w : Word) (e1 e2 : Elt),
automate q2 qd2 qa2 d2 ->
chemin e1 e2 (union_disj q1 q2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) w ->
dans e1 (map injdroite q2) ->
dans e2 (union_disj qa1 qa2) ->
chemin (first e1) (first e2) q2 d2 w /\ dans e2 (map injdroite qa2).
Lemma chemin_extension_1 :
forall (q1 qd1 qa1 d1 q2 d2 : Ensf) (w : Word) (e1 e2 : Elt),
automate q1 qd1 qa1 d1 ->
chemin e1 e2 q1 d1 w ->
dans e1 q1 ->
dans e2 qa1 ->
chemin (couple e1 zero) (couple e2 zero) (union_disj q1 q2)
(union (injg_d1 q1 d1) (injd_d2 q2 d2)) w.
Axiom
chemin_extension_2 :
forall (q2 qd2 qa2 d2 q1 d1 : Ensf) (w : Word) (e1 e2 : Elt),
automate q2 qd2 qa2 d2 ->
chemin e1 e2 q2 d2 w ->
dans e1 q2 ->
dans e2 qa2 ->
chemin (couple e1 un) (couple e2 un) (union_disj q1 q2)
(union (injg_d1 q1 d1) (injd_d2 q2 d2)) w.
Lemma lunion_is_reg1 :
forall (q1 qd1 qa1 d1 q2 qd2 qa2 d2 : Ensf) (l1 l2 : wordset),
automate q1 qd1 qa1 d1 ->
eqwordset (reconnait q1 qd1 qa1 d1) l1 ->
automate q2 qd2 qa2 d2 ->
eqwordset (reconnait q2 qd2 qa2 d2) l2 ->
eqwordset
(reconnait (union_disj q1 q2) (union_disj qd1 qd2)
(union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)))
(lunion l1 l2).
Lemma lunion_is_reg :
forall l1 l2 : wordset,
isregular l1 -> isregular l2 -> isregular (lunion l1 l2).
Proof.
(* Goal: forall (l1 l2 : wordset) (_ : isregular l1) (_ : isregular l2), isregular (lunion l1 l2) *)
unfold isregular in |- *.
(* Goal: forall (l1 l2 : wordset) (_ : @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) l1)))))) (_ : @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) l2)))))), @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
intros l1 l2 H1 H2.
(* Goal: @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
elim H1; clear H1.
(* Goal: forall (x : Ensf) (_ : @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate x qd qa d) (eqwordset (reconnait x qd qa d) l1))))), @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
intros q1 H1; elim H1; clear H1; intros qd1 H1; elim H1; clear H1; intros qa1 H1; elim H1; clear H1; intros d1 H1; elim H1; clear H1.
(* Goal: forall (_ : automate q1 qd1 qa1 d1) (_ : eqwordset (reconnait q1 qd1 qa1 d1) l1), @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
intros H1_aut H1_eq.
(* Goal: @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
elim H2; clear H2.
(* Goal: forall (x : Ensf) (_ : @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate x qd qa d) (eqwordset (reconnait x qd qa d) l2))))), @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
intros q2 H2; elim H2; clear H2; intros qd2 H2; elim H2; clear H2; intros qa2 H2; elim H2; clear H2; intros d2 H2; elim H2; clear H2.
(* Goal: forall (_ : automate q2 qd2 qa2 d2) (_ : eqwordset (reconnait q2 qd2 qa2 d2) l2), @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
intros H2_aut H2_eq.
(* Goal: @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate q qd qa d) (eqwordset (reconnait q qd qa d) (lunion l1 l2)))))) *)
exists (union_disj q1 q2).
(* Goal: @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate (union_disj q1 q2) qd qa d) (eqwordset (reconnait (union_disj q1 q2) qd qa d) (lunion l1 l2))))) *)
exists (union_disj qd1 qd2).
(* Goal: @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate (union_disj q1 q2) (union_disj qd1 qd2) qa d) (eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) qa d) (lunion l1 l2)))) *)
exists (union_disj qa1 qa2).
(* Goal: @ex Ensf (fun d : Ensf => and (automate (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) d) (eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) d) (lunion l1 l2))) *)
exists (union (injg_d1 q1 d1) (injd_d2 q2 d2)).
(* Goal: and (automate (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2)) *)
split.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: automate (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) *)
red in |- *.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: and (inclus (union_disj qa1 qa2) (union_disj q1 q2)) (and (inclus (union_disj qd1 qd2) (union_disj q1 q2)) (inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))))) *)
split.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: and (inclus (union_disj qd1 qd2) (union_disj q1 q2)) (inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2)))) *)
(* Goal: inclus (union_disj qa1 qa2) (union_disj q1 q2) *)
apply inclus_union_disj.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: and (inclus (union_disj qd1 qd2) (union_disj q1 q2)) (inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2)))) *)
(* Goal: inclus qa2 q2 *)
(* Goal: inclus qa1 q1 *)
apply automate_def3 with qd1 d1; auto.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: and (inclus (union_disj qd1 qd2) (union_disj q1 q2)) (inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2)))) *)
(* Goal: inclus qa2 q2 *)
apply automate_def3 with qd2 d2; auto.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: and (inclus (union_disj qd1 qd2) (union_disj q1 q2)) (inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2)))) *)
split.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus (union_disj qd1 qd2) (union_disj q1 q2) *)
apply inclus_union_disj.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus qd2 q2 *)
(* Goal: inclus qd1 q1 *)
apply automate_def2 with qa1 d1; auto.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
(* Goal: inclus qd2 q2 *)
apply automate_def2 with qa2 d2; auto.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
(* Goal: inclus (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (prodcart (union_disj q1 q2) (prodcart alph (union_disj q1 q2))) *)
apply d_is_good.
(* Goal: eqwordset (reconnait (union_disj q1 q2) (union_disj qd1 qd2) (union_disj qa1 qa2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (lunion l1 l2) *)
apply lunion_is_reg1; auto.
Qed.
Definition transition_pont (x : Elt) : Elt :=
match x return Elt with
| natural n =>
zero
| couple e e' =>
couple (couple e zero) (couple epsilon (couple e' un))
| up e => zero
| word w => zero
end.
Definition pont (qa1 qd2 : Ensf) : Ensf :=
map transition_pont (prodcart qa1 qd2).
Lemma automate_lconc_isgood :
forall q1 qd1 qa1 d1 q2 qd2 qa2 d2 : Ensf,
automate q1 qd1 qa1 d1 ->
automate q2 qd2 qa2 d2 ->
automate_A (union_disj q1 q2) (map injgauche qd1)
(map injdroite qa2)
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))).
Lemma transition_a_gauche :
forall (q1 qa1 d1 q2 qd2 d2 : Ensf) (e0 x e : Elt),
dans e0 (map injgauche q1) ->
dans x alph ->
dans (couple e0 (couple x e))
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) ->
dans e (map injgauche q1).
Lemma transition_a_gauche_2 :
forall (q1 qa1 d1 q2 qd2 d2 : Ensf) (e0 x e : Elt),
dans e0 (map injgauche q1) ->
dans x alph ->
dans (couple e0 (couple x e))
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) ->
dans (couple (first e0) (couple x (first e))) d1.
Axiom
transition_a_droite_2 :
forall (q1 qa1 d1 q2 qd2 d2 : Ensf) (e0 x e : Elt),
dans e0 (map injdroite q2) ->
dans x alph ->
dans (couple e0 (couple x e))
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) ->
dans (couple (first e0) (couple x (first e))) d2.
Lemma transition_dans_pont :
forall (q1 qa1 d1 q2 qd2 d2 : Ensf) (e0 e : Elt),
dans (couple e0 (couple epsilon e))
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) ->
dans e0 (map injgauche qa1) /\ dans e (map injdroite qd2).
Lemma dans_pont_imp_epsilon :
forall (qa1 qd2 : Ensf) (e1 x e0 : Elt),
dans (couple e1 (couple x e0)) (pont qa1 qd2) -> x = epsilon :>Elt.
Lemma chemin_A_chemin_2 :
forall (q1 qa1 d1 q2 qd2 d2 : Ensf) (e e3 : Elt) (w0 : Word),
chemin_A (union_disj q1 q2)
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) e e3 w0 ->
dans e (map injdroite q2) ->
dans e3 (map injdroite q2) -> chemin (first e) (first e3) q2 d2 w0.
Lemma par_le_pont :
forall (q1 qd1 qa1 d1 q2 qd2 qa2 d2 : Ensf) (e1 e2 : Elt) (w : Word),
automate q1 qd1 qa1 d1 ->
automate q2 qd2 qa2 d2 ->
chemin_A (union_disj q1 q2)
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) e1 e2 w ->
dans e1 (map injgauche q1) ->
dans e2 (map injdroite q2) ->
exists x1 : Elt,
(exists x2 : Elt,
(exists w1 : Word,
(exists w2 : Word,
dans x1 qa1 /\
dans x2 qd2 /\
chemin (first e1) x1 q1 d1 w1 /\
chemin x2 (first e2) q2 d2 w2 /\ w = Append w1 w2 :>Word))).
Lemma reconnait_Append :
forall (q1 qd1 qa1 d1 q2 qd2 qa2 d2 : Ensf) (w2 : Word)
(x1 x2 e2 : Elt) (w1 : Word) (e1 : Elt),
automate q1 qd1 qa1 d1 ->
automate q2 qd2 qa2 d2 ->
chemin e1 x1 q1 d1 w1 ->
dans x1 qa1 ->
chemin x2 e2 q2 d2 w2 ->
dans x2 qd2 ->
dans e2 qa2 ->
chemin_A (union_disj q1 q2)
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)))
(couple e1 zero) (couple e2 un) (Append w1 w2).
Proof.
(* Goal: forall (q1 qd1 qa1 d1 q2 qd2 qa2 d2 : Ensf) (w2 : Word) (x1 x2 e2 : Elt) (w1 : Word) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w1) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w1 w2) *)
intros q1 qd1 qa1 d1 q2 qd2 qa2 d2 w2 x1 x2 e2.
(* Goal: forall (w1 : Word) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w1) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w1 w2) *)
simple induction w1.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 nil) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append nil w2) *)
intros e1 H_aut1 H_aut2 H H0 H1 H2 H3.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append nil w2) *)
cut (Chemin e1 x1 q1 d1 nil); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: forall _ : Chemin e1 x1 q1 d1 nil, chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append nil w2) *)
intro H4.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append nil w2) *)
cut (dans e1 q1 /\ e1 = x1 :>Elt); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: forall _ : and (dans e1 q1) (@eq Elt e1 x1), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append nil w2) *)
intro Ht; elim Ht; clear Ht; intros H5 H6.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append nil w2) *)
replace (Append nil w2) with w2; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) w2 *)
apply chemin_A_epsilon with (couple x2 un).
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple x2 un) (couple e2 un) w2 *)
apply chemin_A_d1_d2 with (union (injg_d1 q1 d1) (injd_d2 q2 d2)); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
(* Goal: chemin_A (union_disj q1 q2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) (couple x2 un) (couple e2 un) w2 *)
apply chemin_chemin_A.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
(* Goal: chemin (couple x2 un) (couple e2 un) (union_disj q1 q2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) w2 *)
apply chemin_extension_2 with qd2 qa2; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
(* Goal: dans x2 q2 *)
apply dans_trans with qd2; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
(* Goal: inclus qd2 q2 *)
apply automate_def2 with qa2 d2; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
replace (couple e1 zero) with (injgauche e1); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (injgauche e1) (union_disj q1 q2) *)
unfold union_disj in |- *.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (injgauche e1) (union (map injgauche q1) (map injdroite q2)) *)
apply union_g.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (injgauche e1) (map injgauche q1) *)
apply dans_map_inv; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
apply union_g.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (pont qa1 qd2) *)
unfold pont in |- *.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple e1 zero) (couple epsilon (couple x2 un))) (map transition_pont (prodcart qa1 qd2)) *)
rewrite H6.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
(* Goal: dans (couple (couple x1 zero) (couple epsilon (couple x2 un))) (map transition_pont (prodcart qa1 qd2)) *)
replace (couple (couple x1 zero) (couple epsilon (couple x2 un))) with (transition_pont (couple x1 x2)); auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 w) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append w w2)) (e1 : Elt) (_ : automate q1 qd1 qa1 d1) (_ : automate q2 qd2 qa2 d2) (_ : chemin e1 x1 q1 d1 (cons e w)) (_ : dans x1 qa1) (_ : chemin x2 e2 q2 d2 w2) (_ : dans x2 qd2) (_ : dans e2 qa2), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons e w) w2) *)
intros x w H e1 H0 H1 H2 H3 H4 H5 H6.
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (Append (cons x w) w2) *)
replace (Append (cons x w) w2) with (cons x (Append w w2)); auto.
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (cons x (Append w w2)) *)
cut (Chemin e1 x1 q1 d1 (cons x w)); auto.
(* Goal: forall _ : Chemin e1 x1 q1 d1 (cons x w), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (cons x (Append w w2)) *)
intro H7.
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (cons x (Append w w2)) *)
cut (exists e : Elt, chemin e x1 q1 d1 w /\ dans e1 q1 /\ dans x alph /\ dans (couple e1 (couple x e)) d1); auto.
(* Goal: forall _ : @ex Elt (fun e : Elt => and (chemin e x1 q1 d1 w) (and (dans e1 q1) (and (dans x alph) (dans (couple e1 (couple x e)) d1)))), chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (cons x (Append w w2)) *)
intro Ht; elim Ht; clear Ht; intros e Ht; elim Ht; clear Ht; intros H8 Ht; elim Ht; clear Ht; intros H9 Ht; elim Ht; clear Ht; intros H10 H11.
(* Goal: chemin_A (union_disj q1 q2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) (couple e1 zero) (couple e2 un) (cons x (Append w w2)) *)
apply chemin_A_cons with (couple e zero); auto.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union_disj q1 q2) *)
unfold union_disj in |- *.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (union (map injgauche q1) (map injdroite q2)) *)
apply union_g.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
(* Goal: dans (couple e1 zero) (map injgauche q1) *)
replace (couple e1 zero) with (injgauche e1); auto.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
apply union_d.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (union (injg_d1 q1 d1) (injd_d2 q2 d2)) *)
apply union_g.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (injg_d1 q1 d1) *)
unfold injg_d1 in |- *.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (tq (est_dans_d' d1) (prodcart (map injgauche q1) (prodcart alph (map injgauche q1)))) *)
apply imp_dans_tq; auto.
(* Goal: dans (couple (couple e1 zero) (couple x (couple e zero))) (prodcart (map injgauche q1) (prodcart alph (map injgauche q1))) *)
apply coupl2_inv.
(* Goal: dans (couple x (couple e zero)) (prodcart alph (map injgauche q1)) *)
(* Goal: dans (couple e1 zero) (map injgauche q1) *)
replace (couple e1 zero) with (injgauche e1); auto.
(* Goal: dans (couple x (couple e zero)) (prodcart alph (map injgauche q1)) *)
apply coupl2_inv; auto.
(* Goal: dans (couple e zero) (map injgauche q1) *)
replace (couple e zero) with (injgauche e); auto.
(* Goal: dans (injgauche e) (map injgauche q1) *)
apply dans_map_inv; auto.
(* Goal: dans e q1 *)
apply dans_e1_q with d1 w x1; auto.
Qed.
Lemma lconc_is_reg1 :
forall (q1 qd1 qa1 d1 q2 qd2 qa2 d2 : Ensf) (l1 l2 : wordset),
automate q1 qd1 qa1 d1 ->
eqwordset (reconnait q1 qd1 qa1 d1) l1 ->
automate q2 qd2 qa2 d2 ->
eqwordset (reconnait q2 qd2 qa2 d2) l2 ->
eqwordset
(reconnait_A (union_disj q1 q2) (map injgauche qd1)
(map injdroite qa2)
(union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))))
(lconc l1 l2).
Lemma lconc_is_reg :
forall l1 l2 : wordset,
isregular l1 -> isregular l2 -> isregular (lconc l1 l2).
Proof.
(* Goal: forall (l1 l2 : wordset) (_ : isregular l1) (_ : isregular l2), isregular (lconc l1 l2) *)
intros.
(* Goal: isregular (lconc l1 l2) *)
unfold isregular in H.
(* Goal: isregular (lconc l1 l2) *)
elim H; clear H.
(* Goal: forall (x : Ensf) (_ : @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate x qd qa d) (eqwordset (reconnait x qd qa d) l1))))), isregular (lconc l1 l2) *)
intros q1 H; elim H; clear H; intros qd1 H; elim H; clear H; intros qa1 H; elim H; clear H; intros d1 H; elim H; clear H.
(* Goal: forall (_ : automate q1 qd1 qa1 d1) (_ : eqwordset (reconnait q1 qd1 qa1 d1) l1), isregular (lconc l1 l2) *)
intros H_aut H_eq.
(* Goal: isregular (lconc l1 l2) *)
unfold isregular in H0.
(* Goal: isregular (lconc l1 l2) *)
elim H0; clear H0.
(* Goal: forall (x : Ensf) (_ : @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate x qd qa d) (eqwordset (reconnait x qd qa d) l2))))), isregular (lconc l1 l2) *)
intros q2 H0; elim H0; clear H0; intros qd2 H0; elim H0; clear H0; intros qa2 H0; elim H0; clear H0; intros d2 H0; elim H0; clear H0.
(* Goal: forall (_ : automate q2 qd2 qa2 d2) (_ : eqwordset (reconnait q2 qd2 qa2 d2) l2), isregular (lconc l1 l2) *)
intros H0_aut H0_eq.
(* Goal: isregular (lconc l1 l2) *)
apply isregular_A_isregular.
(* Goal: isregular_A (lconc l1 l2) *)
unfold isregular_A in |- *.
(* Goal: @ex Ensf (fun q : Ensf => @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate_A q qd qa d) (eqwordset (reconnait_A q qd qa d) (lconc l1 l2)))))) *)
exists (union_disj q1 q2).
(* Goal: @ex Ensf (fun qd : Ensf => @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate_A (union_disj q1 q2) qd qa d) (eqwordset (reconnait_A (union_disj q1 q2) qd qa d) (lconc l1 l2))))) *)
exists (map injgauche qd1).
(* Goal: @ex Ensf (fun qa : Ensf => @ex Ensf (fun d : Ensf => and (automate_A (union_disj q1 q2) (map injgauche qd1) qa d) (eqwordset (reconnait_A (union_disj q1 q2) (map injgauche qd1) qa d) (lconc l1 l2)))) *)
exists (map injdroite qa2).
(* Goal: @ex Ensf (fun d : Ensf => and (automate_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) d) (eqwordset (reconnait_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) d) (lconc l1 l2))) *)
exists (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))).
(* Goal: and (automate_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)))) (eqwordset (reconnait_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)))) (lconc l1 l2)) *)
split.
(* Goal: eqwordset (reconnait_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)))) (lconc l1 l2) *)
(* Goal: automate_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2))) *)
apply automate_lconc_isgood; auto.
(* Goal: eqwordset (reconnait_A (union_disj q1 q2) (map injgauche qd1) (map injdroite qa2) (union (pont qa1 qd2) (union (injg_d1 q1 d1) (injd_d2 q2 d2)))) (lconc l1 l2) *)
apply lconc_is_reg1; auto.
Qed.
Definition transition_back (g0 x : Elt) : Elt := couple x (couple epsilon g0).
Definition delta (g0 : Elt) (qa : Ensf) : Ensf := map (transition_back g0) qa.
Definition fun_d_dstar (g0 : Elt) (qa d : Ensf) : Ensf :=
union d (delta g0 qa).
Lemma dstar_is_good :
forall (q qa d : Ensf) (g0 : Elt),
automate q (singleton g0) qa d ->
inclus (fun_d_dstar g0 qa d) (prodcart q (prodcart (add epsilon alph) q)).
Lemma transition_dans_l :
forall (q qa d : Ensf) (g0 e0 x e : Elt),
automate q (singleton g0) qa d ->
dans x alph ->
dans (couple e0 (couple x e)) (fun_d_dstar g0 qa d) ->
dans (couple e0 (couple x e)) d.
Lemma transition_par_epsilon :
forall (q qa d : Ensf) (g0 e0 e : Elt),
automate q (singleton g0) qa d ->
dans (couple e0 (couple epsilon e)) (fun_d_dstar g0 qa d) ->
dans e0 qa /\ e = g0 :>Elt.
Lemma chemin_g0_g0 :
forall (q qa d : Ensf) (g0 : Elt) (w0 : Word),
automate q (singleton g0) qa d ->
(forall e x : Elt, dans (couple g0 (couple x e)) d -> x = epsilon :>Elt) ->
chemin g0 g0 q d w0 -> w0 = nil :>Word.
Lemma lstar_is_reg2_bis :
forall (q qa d : Ensf) (g0 e1 e2 : Elt) (w : Word) (l : wordset),
automate q (singleton g0) qa d ->
eqwordset (reconnait q (singleton g0) qa d) l ->
(forall w : Word, chemin g0 g0 q d w -> w = nil :>Word) ->
chemin_A q (fun_d_dstar g0 qa d) e1 e2 w ->
e2 = g0 :>Elt ->
chemin e1 e2 q d w \/
(exists e : Elt,
(exists w1 : Word,
(exists w2 : Word,
chemin e1 e q d w1 /\
dans e qa /\ lstar l w2 /\ w = Append w1 w2 :>Word))).
Lemma lstar_is_reg1 :
forall (q qa d : Ensf) (l : wordset) (g0 : Elt) (w : Word),
automate q (singleton g0) qa d ->
(forall w : Word, chemin g0 g0 q d w -> w = nil :>Word) ->
eqwordset (reconnait q (singleton g0) qa d) l ->
reconnait_A q (singleton g0) (singleton g0) (fun_d_dstar g0 qa d) w ->
lstar l w.
Lemma lstar_is_reg : forall l : wordset, isregular l -> isregular (lstar l).
Lemma rat_is_reg : forall L : wordset, isrationnal L -> isregular L.
Proof.
(* Goal: forall (L : wordset) (_ : isrationnal L), isregular L *)
intros L H.
(* Goal: isregular L *)
elim H.
(* Goal: forall (l : wordset) (_ : isrationnal l) (_ : isregular l), isregular (lstar l) *)
(* Goal: forall (l1 l2 : wordset) (_ : isrationnal l1) (_ : isregular l1) (_ : isrationnal l2) (_ : isregular l2), isregular (lconc l1 l2) *)
(* Goal: forall (l1 l2 : wordset) (_ : isrationnal l1) (_ : isregular l1) (_ : isrationnal l2) (_ : isregular l2), isregular (lunion l1 l2) *)
(* Goal: forall (w : Word) (_ : inmonoid alph w), isregular (lword w) *)
intros; apply lword_is_reg; auto.
(* Goal: forall (l : wordset) (_ : isrationnal l) (_ : isregular l), isregular (lstar l) *)
(* Goal: forall (l1 l2 : wordset) (_ : isrationnal l1) (_ : isregular l1) (_ : isrationnal l2) (_ : isregular l2), isregular (lconc l1 l2) *)
(* Goal: forall (l1 l2 : wordset) (_ : isrationnal l1) (_ : isregular l1) (_ : isrationnal l2) (_ : isregular l2), isregular (lunion l1 l2) *)
intros; apply lunion_is_reg; auto.
(* Goal: forall (l : wordset) (_ : isrationnal l) (_ : isregular l), isregular (lstar l) *)
(* Goal: forall (l1 l2 : wordset) (_ : isrationnal l1) (_ : isregular l1) (_ : isrationnal l2) (_ : isregular l2), isregular (lconc l1 l2) *)
intros; apply lconc_is_reg; auto.
(* Goal: forall (l : wordset) (_ : isrationnal l) (_ : isregular l), isregular (lstar l) *)
intros; apply lstar_is_reg; auto.
Qed.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat seq div fintype tuple.
From mathcomp
Require Import finfun bigop fingroup perm ssralg zmodp matrix mxalgebra.
From mathcomp
Require Import poly polydiv.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GRing.Theory.
Import Monoid.Theory.
Local Open Scope ring_scope.
Import Pdiv.Idomain.
Section RowPoly.
Variables (R : ringType) (d : nat).
Implicit Types u v : 'rV[R]_d.
Implicit Types p q : {poly R}.
Definition rVpoly v := \poly_(k < d) (if insub k is Some i then v 0 i else 0).
Definition poly_rV p := \row_(i < d) p`_i.
Lemma coef_rVpoly v k : (rVpoly v)`_k = if insub k is Some i then v 0 i else 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (rVpoly v)) k) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort R) (S O) d v (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType R) end *)
by rewrite coef_poly; case: insubP => [i ->|]; rewrite ?if_same.
Qed.
Lemma coef_rVpoly_ord v (i : 'I_d) : (rVpoly v)`_i = v 0 i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (rVpoly v)) (@nat_of_ord d i)) (@fun_of_matrix (GRing.Ring.sort R) (S O) d v (GRing.zero (Zp_zmodType O)) i) *)
by rewrite coef_rVpoly valK.
Qed.
Lemma rVpoly_delta i : rVpoly (delta_mx 0 i) = 'X^i.
Proof.
(* Goal: @eq (@poly_of R (Phant (GRing.Ring.sort R))) (rVpoly (@delta_mx R (S O) d (GRing.zero (Zp_zmodType O)) i)) (@GRing.exp (poly_ringType R) (polyX R) (@nat_of_ord d i)) *)
apply/polyP=> j; rewrite coef_rVpoly coefXn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) j with | Some i0 => @fun_of_matrix (GRing.Ring.sort R) (S O) d (@delta_mx R (S O) d (GRing.zero (Zp_zmodType O)) i) (GRing.zero (Zp_zmodType O)) i0 | None => GRing.zero (GRing.Ring.zmodType R) end (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType j (@nat_of_ord d i)))) *)
case: insubP => [k _ <- | j_ge_d]; first by rewrite mxE.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType j (@nat_of_ord d i)))) *)
by case: eqP j_ge_d => // ->; rewrite ltn_ord.
Qed.
Lemma rVpolyK : cancel rVpoly poly_rV.
Proof.
(* Goal: @cancel (@poly_of R (Phant (GRing.Ring.sort R))) (matrix (GRing.Ring.sort R) (S O) d) rVpoly poly_rV *)
by move=> u; apply/rowP=> i; rewrite mxE coef_rVpoly_ord.
Qed.
Lemma poly_rV_K p : size p <= d -> rVpoly (poly_rV p) = p.
Proof.
(* Goal: forall _ : is_true (leq (@size (GRing.Ring.sort R) (@polyseq R p)) d), @eq (@poly_of R (Phant (GRing.Ring.sort R))) (rVpoly (poly_rV p)) p *)
move=> le_p_d; apply/polyP=> k; rewrite coef_rVpoly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort R) (S O) d (poly_rV p) (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType R) end (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) k) *)
case: insubP => [i _ <- | ]; first by rewrite mxE.
(* Goal: forall _ : is_true (negb (leq (S k) d)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R p) k) *)
by rewrite -ltnNge => le_d_l; rewrite nth_default ?(leq_trans le_p_d).
Qed.
Lemma poly_rV_is_linear : linear poly_rV.
Proof.
(* Goal: @GRing.Linear.axiom R (poly_lmodType R) (matrix_zmodType (GRing.Ring.zmodType R) (S O) d) (@GRing.scale R (matrix_lmodType R (S O) d)) poly_rV (@GRing.Scale.scale_law R (matrix_lmodType R (S O) d)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d))))) (@GRing.scale R (matrix_lmodType R (S O) d))) *)
by move=> a p q; apply/rowP=> i; rewrite !mxE coefD coefZ.
Qed.
Canonical poly_rV_additive := Additive poly_rV_is_linear.
Canonical poly_rV_linear := Linear poly_rV_is_linear.
Lemma rVpoly_is_linear : linear rVpoly.
Proof.
(* Goal: @GRing.Linear.axiom R (matrix_lmodType R (S O) d) (poly_zmodType R) (@GRing.scale R (poly_lmodType R)) rVpoly (@GRing.Scale.scale_law R (poly_lmodType R)) (@Logic.eq_refl (forall (_ : GRing.Ring.sort R) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (poly_lmodType R)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (poly_lmodType R)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (poly_lmodType R))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (poly_lmodType R)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (poly_lmodType R)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (poly_lmodType R))))) (@GRing.scale R (poly_lmodType R))) *)
move=> a u v; apply/polyP=> k; rewrite coefD coefZ !coef_rVpoly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort R) (S O) d (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)) (@GRing.Lmodule.base R (@GRing.Lmodule.sort R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)) (@GRing.Lmodule.class R (Phant (GRing.Ring.sort R)) (matrix_lmodType R (S O) d)))) (@GRing.scale R (matrix_lmodType R (S O) d) a u) v) (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType R) end (@GRing.add (GRing.Ring.zmodType R) (@GRing.mul R a match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort R) (S O) d u (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType R) end) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort R) (S O) d v (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType R) end) *)
by case: insubP => [i _ _ | _]; rewrite ?mxE // mulr0 addr0.
Qed.
Canonical rVpoly_additive := Additive rVpoly_is_linear.
Canonical rVpoly_linear := Linear rVpoly_is_linear.
End RowPoly.
Prenex Implicits rVpoly rVpolyK.
Arguments poly_rV {R d}.
Arguments poly_rV_K {R d} [p] le_p_d.
Section Resultant.
Variables (R : ringType) (p q : {poly R}).
Let dS := ((size q).-1 + (size p).-1)%N.
Local Notation band r := (lin1_mx (poly_rV \o r \o* rVpoly)).
Definition Sylvester_mx : 'M[R]_dS := col_mx (band p) (band q).
Lemma Sylvester_mxE (i j : 'I_dS) :
let S_ r k := r`_(j - k) *+ (k <= j) in
Sylvester_mx i j = match split i with inl k => S_ p k | inr k => S_ q k end.
Proof.
(* Goal: let S_ := fun (r : list (GRing.Zmodule.sort (GRing.Ring.zmodType R))) (k : nat) => @GRing.natmul (GRing.Ring.zmodType R) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) r (subn (@nat_of_ord dS j) k)) (nat_of_bool (leq k (@nat_of_ord dS j))) in @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) dS dS Sylvester_mx i j) match @split (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R q))) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) i with | inl k => S_ (@polyseq R p) (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R q))) k) | inr k => S_ (@polyseq R q) (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R p))) k) end *)
move=> S_; rewrite mxE; case: {i}(split i) => i; rewrite !mxE /=; by rewrite rVpoly_delta coefXnM ltnNge if_neg -mulrb.
Qed.
Definition resultant := \det Sylvester_mx.
End Resultant.
Prenex Implicits Sylvester_mx resultant.
Lemma resultant_in_ideal (R : comRingType) (p q : {poly R}) :
size p > 1 -> size q > 1 ->
{uv : {poly R} * {poly R} | size uv.1 < size q /\ size uv.2 < size p
Lemma resultant_eq0 (R : idomainType) (p q : {poly R}) :
(resultant p q == 0) = (size (gcdp p q) > 1).
Section HornerMx.
Variables (R : comRingType) (n' : nat).
Local Notation n := n'.+1.
Variable A : 'M[R]_n.
Implicit Types p q : {poly R}.
Definition horner_mx := horner_morph (fun a => scalar_mx_comm a A).
Canonical horner_mx_additive := [additive of horner_mx].
Canonical horner_mx_rmorphism := [rmorphism of horner_mx].
Lemma horner_mx_C a : horner_mx a%:P = a%:M.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (horner_mx (@polyC (GRing.ComRing.ringType R) a)) (@scalar_mx (GRing.ComRing.ringType R) (S n') a) *)
exact: horner_morphC.
Qed.
Lemma horner_mxZ : scalable horner_mx.
Proof.
(* Goal: @GRing.Linear.mixin_of (GRing.ComRing.ringType R) (poly_lmodType (GRing.ComRing.ringType R)) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lAlgType (GRing.ComRing.ringType R) n'))) (@GRing.Lmodule.base (GRing.ComRing.ringType R) (@GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lAlgType (GRing.ComRing.ringType R) n'))) (@GRing.Lmodule.class (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lAlgType (GRing.ComRing.ringType R) n'))))) (@GRing.scale (GRing.ComRing.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lAlgType (GRing.ComRing.ringType R) n'))) horner_mx *)
move=> a p /=; rewrite -mul_polyC rmorphM /=.
(* Goal: @eq (matrix (GRing.ComRing.sort R) (S n') (S n')) (@GRing.mul (matrix_ringType (GRing.ComRing.ringType R) n') (horner_mx (@polyC (GRing.ComRing.ringType R) a)) (horner_mx p)) (@GRing.scale (GRing.ComRing.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.ComRing.sort R)) (matrix_lAlgType (GRing.ComRing.ringType R) n')) a (horner_mx p)) *)
by rewrite horner_mx_C [_ * _]mul_scalar_mx.
Qed.
Canonical horner_mx_linear := AddLinear horner_mxZ.
Canonical horner_mx_lrmorphism := [lrmorphism of horner_mx].
Definition powers_mx d := \matrix_(i < d) mxvec (A ^+ i).
Lemma horner_rVpoly m (u : 'rV_m) :
horner_mx (rVpoly u) = vec_mx (u *m powers_mx m).
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (horner_mx (@rVpoly (GRing.ComRing.ringType R) m u)) (@vec_mx (GRing.Ring.sort (GRing.ComRing.ringType R)) (S n') (S n') (@mulmx (GRing.ComRing.ringType R) (S O) m (muln (S n') (S n')) u (powers_mx m))) *)
rewrite mulmx_sum_row linear_sum [rVpoly u]poly_def rmorph_sum.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (Finite.sort (ordinal_finType m)) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (Finite.sort (ordinal_finType m)) i (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) true (@GRing.RMorphism.apply (poly_ringType (GRing.ComRing.ringType R)) (matrix_ringType (GRing.ComRing.ringType R) n') (Phant (forall _ : GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType R)), GRing.Ring.sort (matrix_ringType (GRing.ComRing.ringType R) n'))) horner_mx_rmorphism (@GRing.scale (GRing.ComRing.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (poly_lalgType (GRing.ComRing.ringType R))) match @insub nat (fun x : nat => leq (S x) m) (ordinal_subType m) (@nat_of_ord m i) with | Some i0 => @fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i0 | None => GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R)) end (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) (polyX (GRing.ComRing.ringType R)) (@nat_of_ord m i)))))) (@BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n'))) (Finite.sort (ordinal_finType m)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n'))) (index_enum (ordinal_finType m)) (fun i : Finite.sort (ordinal_finType m) => @BigBody (GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n'))) (Finite.sort (ordinal_finType m)) i (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n'))) true (@GRing.Linear.apply (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (S n') (S n'))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n')) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S n') (S n'))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (S n') (S n'))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n')))) (vec_mx_linear (GRing.ComRing.ringType R) (S n') (S n')) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (S n') (S n'))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) m (muln (S n') (S n')) i (powers_mx m)))))) *)
apply: eq_bigr => i _.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (@GRing.RMorphism.apply (poly_ringType (GRing.ComRing.ringType R)) (matrix_ringType (GRing.ComRing.ringType R) n') (Phant (forall _ : GRing.Ring.sort (poly_ringType (GRing.ComRing.ringType R)), GRing.Ring.sort (matrix_ringType (GRing.ComRing.ringType R) n'))) horner_mx_rmorphism (@GRing.scale (GRing.ComRing.ringType R) (@GRing.Lalgebra.lmod_ringType (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (poly_lalgType (GRing.ComRing.ringType R))) match @insub nat (fun x : nat => leq (S x) m) (ordinal_subType m) (@nat_of_ord m i) with | Some i => @fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType R)) end (@GRing.exp (poly_ringType (GRing.ComRing.ringType R)) (polyX (GRing.ComRing.ringType R)) (@nat_of_ord m i)))) (@GRing.Linear.apply (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (S n') (S n'))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n')) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S n') (S n'))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComRing.ringType R) (Phant (GRing.Ring.sort (GRing.ComRing.ringType R))) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (S n') (S n'))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComRing.ringType R)) (S n') (S n')))) (vec_mx_linear (GRing.ComRing.ringType R) (S n') (S n')) (@GRing.scale (GRing.ComRing.ringType R) (matrix_lmodType (GRing.ComRing.ringType R) (S O) (muln (S n') (S n'))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComRing.ringType R)) (S O) m u (GRing.zero (Zp_zmodType O)) i) (@row (GRing.Ring.sort (GRing.ComRing.ringType R)) m (muln (S n') (S n')) i (powers_mx m)))) *)
by rewrite valK !linearZ rmorphX /= horner_mx_X rowK /= mxvecK.
Qed.
End HornerMx.
Prenex Implicits horner_mx powers_mx.
Section CharPoly.
Variables (R : ringType) (n : nat) (A : 'M[R]_n).
Implicit Types p q : {poly R}.
Definition char_poly_mx := 'X%:M - map_mx (@polyC R) A.
Definition char_poly := \det char_poly_mx.
Let diagA := [seq A i i | i : 'I_n].
Let size_diagA : size diagA = n.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) diagA) n *)
by rewrite size_image card_ord.
Qed.
Let split_diagA :
exists2 q, \prod_(x <- diagA) ('X - x%:P) + q = char_poly & size q <= n.-1.
Lemma size_char_poly : size char_poly = n.+1.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R char_poly)) (S n) *)
have [q <- lt_q_n] := split_diagA; have le_q_n := leq_trans lt_q_n (leq_pred n).
(* Goal: @eq nat (@size (GRing.Ring.sort R) (@polyseq R (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun x : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) x (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R x))))) q))) (S n) *)
by rewrite size_addl size_prod_XsubC size_diagA.
Qed.
Lemma char_poly_monic : char_poly \is monic.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (poly_ringType R)) char_poly (@mem (@poly_of R (Phant (GRing.Ring.sort R))) (predPredType (@poly_of R (Phant (GRing.Ring.sort R)))) (@has_quality O (@poly_of R (Phant (GRing.Ring.sort R))) (@monic R)))) *)
rewrite monicE -(monicP (monic_prod_XsubC diagA xpredT id)).
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (@lead_coef R char_poly) (@lead_coef R (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun i : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) i (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R i))))))) *)
rewrite !lead_coefE size_char_poly.
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R char_poly) (Nat.pred (S n))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun i : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) i (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R i)))))) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun i : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) i (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R i)))))))))) *)
have [q <- lt_q_n] := split_diagA; have le_q_n := leq_trans lt_q_n (leq_pred n).
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.add (GRing.Ring.zmodType (poly_ringType R)) (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun x : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) x (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R x))))) q)) (Nat.pred (S n))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun i : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) i (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R i)))))) (Nat.pred (@size (GRing.Ring.sort R) (@polyseq R (@BigOp.bigop (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) (GRing.one (poly_ringType R)) diagA (fun i : GRing.Ring.sort R => @BigBody (GRing.Ring.sort (poly_ringType R)) (GRing.Ring.sort R) i (@GRing.mul (poly_ringType R)) true (@GRing.add (poly_zmodType R) (polyX R) (@GRing.opp (poly_zmodType R) (@polyC R i)))))))))) *)
by rewrite size_prod_XsubC size_diagA coefD (nth_default 0 le_q_n) addr0.
Qed.
Lemma char_poly_trace : n > 0 -> char_poly`_n.-1 = - \tr A.
Lemma char_poly_det : char_poly`_0 = (- 1) ^+ n * \det A.
End CharPoly.
Prenex Implicits char_poly_mx char_poly.
Lemma mx_poly_ring_isom (R : ringType) n' (n := n'.+1) :
Proof.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n, @poly_of (matrix_ringType R n') (Phant (matrix (GRing.Ring.sort R) n n))))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n, @poly_of (matrix_ringType R n') (Phant (matrix (GRing.Ring.sort R) n n)))) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n, @poly_of (matrix_ringType R n') (Phant (matrix (GRing.Ring.sort R) n n)))) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n, @poly_of (matrix_ringType R n') (Phant (matrix (GRing.Ring.sort R) n n)))) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n, @poly_of (matrix_ringType R n') (Phant (matrix (GRing.Ring.sort R) n n)))) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n, @poly_of (matrix_ringType R n') (Phant (matrix (GRing.Ring.sort R) n n)))) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
set M_RX := 'M[{poly R}]_n; set MR_X := ({poly 'M[R]_n}).
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
pose Msize (A : M_RX) := \max_i \max_j size (A i j).
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
pose phi (A : M_RX) := \poly_(k < Msize A) \matrix_(i, j) (A i j)`_k.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
have coef_phi A i j k: (phi A)`_k i j = (A i j)`_k.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n A i j)) k) *)
rewrite coef_poly; case: (ltnP k _) => le_m_k; rewrite mxE // nth_default //.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: is_true (leq (@size (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (@poly_of R (Phant (GRing.Ring.sort R))) n n A i j))) k) *)
by apply: leq_trans (leq_trans (leq_bigmax i) le_m_k); apply: (leq_bigmax j).
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
have phi_is_rmorphism : rmorphism phi.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @GRing.RMorphism.class_of (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) phi *)
do 2?[split=> [A B|]]; apply/polyP=> k; apply/matrixP=> i j; last 1 first.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.mul (matrix_ringType (poly_ringType R) n') A B))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.mul (poly_ringType (matrix_ringType R n')) (phi A) (phi B))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.add (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) A (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) B)))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.add (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi A) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi B)))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (GRing.one (matrix_ringType (poly_ringType R) n')))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (GRing.one (poly_ringType (matrix_ringType R n')))) k) i j) *)
-
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.mul (matrix_ringType (poly_ringType R) n') A B))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.mul (poly_ringType (matrix_ringType R n')) (phi A) (phi B))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.add (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) A (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) B)))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.add (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi A) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi B)))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (GRing.one (matrix_ringType (poly_ringType R) n')))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (GRing.one (poly_ringType (matrix_ringType R n')))) k) i j) *)
rewrite coef_phi mxE coefMn !coefC.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.mul (matrix_ringType (poly_ringType R) n') A B))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.mul (poly_ringType (matrix_ringType R n')) (phi A) (phi B))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.add (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) A (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) B)))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.add (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi A) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi B)))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@GRing.natmul (GRing.Ring.zmodType R) (if @eq_op nat_eqType k O then GRing.one R else GRing.zero (GRing.Ring.zmodType R)) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S n'))) i j))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (if @eq_op nat_eqType k O then GRing.one (matrix_ringType R n') else GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) i j) *)
by case: (k == _); rewrite ?mxE ?mul0rn.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.mul (matrix_ringType (poly_ringType R) n') A B))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.mul (poly_ringType (matrix_ringType R n')) (phi A) (phi B))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.add (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) A (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) B)))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.add (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi A) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi B)))) k) i j) *)
-
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.mul (matrix_ringType (poly_ringType R) n') A B))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.mul (poly_ringType (matrix_ringType R n')) (phi A) (phi B))) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.add (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) A (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n')) B)))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.add (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi A) (@GRing.opp (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n'))) (phi B)))) k) i j) *)
by rewrite !(coef_phi, mxE, coefD, coefN).
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi (@GRing.mul (matrix_ringType (poly_ringType R) n') A B))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.mul (poly_ringType (matrix_ringType R n')) (phi A) (phi B))) k) i j) *)
rewrite !coef_phi !mxE !coefM summxE coef_sum.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun i0 : Finite.sort (ordinal_finType (S n')) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul (poly_ringType R) (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i i0) (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') B i0 j))) k))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k0 : Finite.sort (ordinal_finType (S k)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) k0 (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@GRing.mul (matrix_ringType R n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) (@nat_of_ord (S k) k0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi B)) (subn k (@nat_of_ord (S k) k0)))) i j))) *)
pose F k1 k2 := (A i k1)`_k2 * (B k1 j)`_(k - k2).
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun i0 : Finite.sort (ordinal_finType (S n')) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul (poly_ringType R) (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i i0) (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') B i0 j))) k))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k0 : Finite.sort (ordinal_finType (S k)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) k0 (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@GRing.mul (matrix_ringType R n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) (@nat_of_ord (S k) k0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi B)) (subn k (@nat_of_ord (S k) k0)))) i j))) *)
transitivity (\sum_k1 \sum_(k2 < k.+1) F k1 k2); rewrite {}/F.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun k1 : Finite.sort (ordinal_finType (S n')) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) k1 (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k2 : ordinal (S k) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S k)) k2 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i k1)) (@nat_of_ord (S k) k2)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') B k1 j)) (subn k (@nat_of_ord (S k) k2)))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k0 : Finite.sort (ordinal_finType (S k)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) k0 (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@GRing.mul (matrix_ringType R n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) (@nat_of_ord (S k) k0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi B)) (subn k (@nat_of_ord (S k) k0)))) i j))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun i0 : Finite.sort (ordinal_finType (S n')) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@GRing.mul (poly_ringType R) (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i i0) (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') B i0 j))) k))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun k1 : Finite.sort (ordinal_finType (S n')) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) k1 (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k2 : ordinal (S k) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S k)) k2 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i k1)) (@nat_of_ord (S k) k2)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') B k1 j)) (subn k (@nat_of_ord (S k) k2)))))))) *)
by apply: eq_bigr=> k1 _; rewrite coefM.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun k1 : Finite.sort (ordinal_finType (S n')) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S n'))) k1 (@GRing.add (GRing.Ring.zmodType R)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k2 : ordinal (S k) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (ordinal (S k)) k2 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i k1)) (@nat_of_ord (S k) k2)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') B k1 j)) (subn k (@nat_of_ord (S k) k2)))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S k))) (fun k0 : Finite.sort (ordinal_finType (S k)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (Finite.sort (ordinal_finType (S k))) k0 (@GRing.add (GRing.Ring.zmodType R)) true (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@GRing.mul (matrix_ringType R n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) (@nat_of_ord (S k) k0)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi B)) (subn k (@nat_of_ord (S k) k0)))) i j))) *)
rewrite exchange_big /=; apply: eq_bigr => k2 _.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Ring.sort R) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (S n')) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (S n'))) (fun i0 : ordinal (S n') => @BigBody (GRing.Ring.sort R) (ordinal (S n')) i0 (@GRing.add (GRing.Ring.zmodType R)) true (@GRing.mul R (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') A i i0)) (@nat_of_ord (S k) k2)) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') B i0 j)) (subn k (@nat_of_ord (S k) k2)))))) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@GRing.mul (matrix_ringType R n') (@nth (matrix (GRing.Ring.sort R) (S n') (S n')) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) (@nat_of_ord (S k) k2)) (@nth (matrix (GRing.Ring.sort R) (S n') (S n')) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi B)) (subn k (@nat_of_ord (S k) k2)))) i j) *)
by rewrite mxE; apply: eq_bigr => k1 _; rewrite !coef_phi.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
have bij_phi: bijective phi.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @bijective (@poly_of (matrix_ringType R n') (Phant (GRing.Ring.sort (matrix_ringType R n')))) M_RX phi *)
exists (fun P : MR_X => \matrix_(i, j) \poly_(k < size P) P`_k i j) => [A|P].
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq MR_X (phi (@matrix_of_fun (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') matrix_key (fun i j : Finite.sort (ordinal_finType (S n')) => @poly R (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') P)) (fun k : nat => @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') P) k) i j)))) P *)
(* Goal: @eq (matrix (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n')) (@matrix_of_fun (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') matrix_key (fun i j : Finite.sort (ordinal_finType (S n')) => @poly R (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') (phi A))) (fun k : nat => @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) k) i j))) A *)
apply/matrixP=> i j; rewrite mxE; apply/polyP=> k.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq MR_X (phi (@matrix_of_fun (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') matrix_key (fun i j : Finite.sort (ordinal_finType (S n')) => @poly R (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') P)) (fun k : nat => @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') P) k) i j)))) P *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@poly R (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') (phi A))) (fun k : nat => @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) k) i j))) k) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') A i j)) k) *)
rewrite coef_poly -coef_phi.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq MR_X (phi (@matrix_of_fun (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') matrix_key (fun i j : Finite.sort (ordinal_finType (S n')) => @poly R (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') P)) (fun k : nat => @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') P) k) i j)))) P *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (if leq (S k) (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') (phi A))) then @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) k) i j else GRing.zero (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (phi A)) k) i j) *)
by case: leqP => // P_le_k; rewrite nth_default ?mxE.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq MR_X (phi (@matrix_of_fun (@poly_of R (Phant (GRing.Ring.sort R))) (S n') (S n') matrix_key (fun i j : Finite.sort (ordinal_finType (S n')) => @poly R (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') P)) (fun k : nat => @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') P) k) i j)))) P *)
apply/polyP=> k; apply/matrixP=> i j; rewrite coef_phi mxE coef_poly.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (if leq (S k) (@size (GRing.Ring.sort (matrix_ringType R n')) (@polyseq (matrix_ringType R n') P)) then @fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') P) k) i j else GRing.zero (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') P) k) i j) *)
by case: leqP => // P_le_k; rewrite nth_default ?mxE.
(* Goal: @ex (@GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X))) (fun phi : @GRing.RMorphism.map (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) => and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi)) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) phi A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k))) *)
exists (RMorphism phi_is_rmorphism).
(* Goal: and4 (@bijective (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism))) (forall p : GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType R)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism) (@scalar_mx (poly_ringType R) (S n') p)) (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) (forall A : matrix (GRing.Ring.sort R) (S n') (S n'), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (matrix_ringType R n')))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism) (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A)) (@polyC (matrix_ringType R n') A)) (forall (A : GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (poly_ringType R) n'))) (i j : ordinal (S n')) (k : nat), @eq (GRing.Ring.sort R) (@fun_of_matrix (GRing.Ring.sort R) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism) A)) k) i j) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.zero (GRing.Ring.zmodType R)) (@polyseq R (@fun_of_matrix (GRing.Ring.sort (poly_ringType R)) (S n') (S n') A i j)) k)) *)
split=> // [p | A]; apply/polyP=> k; apply/matrixP=> i j.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism) (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@polyC (matrix_ringType R n') A)) k) i j) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism) (@scalar_mx (poly_ringType R) (S n') p))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@map_poly R (matrix_ringType R n') (@scalar_mx R (S n')) p)) k) i j) *)
by rewrite coef_phi coef_map !mxE coefMn.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@GRing.RMorphism.apply (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : M_RX, MR_X)) (@GRing.RMorphism.Pack (matrix_ringType (poly_ringType R) n') (poly_ringType (matrix_ringType R n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType R) n'), GRing.Ring.sort (poly_ringType (matrix_ringType R n')))) phi phi_is_rmorphism) (@map_mx (GRing.Ring.sort R) (@poly_of R (Phant (GRing.Ring.sort R))) (@polyC R) (S n') (S n') A))) k) i j) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (S n') (S n') (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType R n'))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType R n'))) (@polyseq (matrix_ringType R n') (@polyC (matrix_ringType R n') A)) k) i j) *)
by rewrite coef_phi !mxE !coefC; case k; last rewrite /= mxE.
Qed.
Theorem Cayley_Hamilton (R : comRingType) n' (A : 'M[R]_n'.+1) :
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (@horner_mx R n' A (@char_poly (GRing.ComRing.ringType R) (S n') A)) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) *)
have [phi [_ phiZ phiC _]] := mx_poly_ring_isom R n'.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) (@horner_mx R n' A (@char_poly (GRing.ComRing.ringType R) (S n') A)) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType R) n'))) *)
apply/rootP/factor_theorem; rewrite -phiZ -mul_adj_mx rmorphM.
(* Goal: @ex (@poly_of (matrix_ringType (GRing.ComRing.ringType R) n') (Phant (GRing.Ring.sort (matrix_ringType (GRing.ComRing.ringType R) n')))) (fun q : @poly_of (matrix_ringType (GRing.ComRing.ringType R) n') (Phant (GRing.Ring.sort (matrix_ringType (GRing.ComRing.ringType R) n'))) => @eq (@poly_of (matrix_ringType (GRing.ComRing.ringType R) n') (Phant (GRing.Ring.sort (matrix_ringType (GRing.ComRing.ringType R) n')))) (@GRing.mul (poly_ringType (matrix_ringType (GRing.ComRing.ringType R) n')) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType (GRing.ComRing.ringType R)) n') (poly_ringType (matrix_ringType (GRing.ComRing.ringType R) n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType (GRing.ComRing.ringType R)) n'), GRing.Ring.sort (poly_ringType (matrix_ringType (GRing.ComRing.ringType R) n')))) phi (@adjugate (GRing.ComRing.ringType (poly_comRingType R)) (S n') (@char_poly_mx (GRing.ComRing.ringType R) (S n') A))) (@GRing.RMorphism.apply (matrix_ringType (poly_ringType (GRing.ComRing.ringType R)) n') (poly_ringType (matrix_ringType (GRing.ComRing.ringType R) n')) (Phant (forall _ : GRing.Ring.sort (matrix_ringType (poly_ringType (GRing.ComRing.ringType R)) n'), GRing.Ring.sort (poly_ringType (matrix_ringType (GRing.ComRing.ringType R) n')))) phi (@char_poly_mx (GRing.ComRing.ringType R) (S n') A))) (@GRing.mul (poly_ringType (matrix_ringType (GRing.ComRing.ringType R) n')) q (@GRing.add (poly_zmodType (matrix_ringType (GRing.ComRing.ringType R) n')) (polyX (matrix_ringType (GRing.ComRing.ringType R) n')) (@GRing.opp (poly_zmodType (matrix_ringType (GRing.ComRing.ringType R) n')) (@polyC (matrix_ringType (GRing.ComRing.ringType R) n') A))))) *)
by move: (phi _) => q; exists q; rewrite rmorphB phiC phiZ map_polyX.
Qed.
Lemma eigenvalue_root_char (F : fieldType) n (A : 'M[F]_n) a :
eigenvalue A a = root (char_poly A) a.
Definition companionmx {R : ringType} (p : seq R) (d := (size p).-1) :=
\matrix_(i < d, j < d)
if (i == d.-1 :> nat) then - p`_j else (i.+1 == j :> nat)%:R.
Lemma companionmxK {R : comRingType} (p : {poly R}) :
p \is monic -> char_poly (companionmx p) = p.
Lemma mulmx_delta_companion (R : ringType) (p : seq R)
(i: 'I_(size p).-1) (i_small : i.+1 < (size p).-1):
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort R) (S O) (Nat.pred (@size (GRing.Ring.sort R) p))) (@mulmx R (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (Nat.pred (@size (GRing.Ring.sort R) p)) (@delta_mx R (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (GRing.zero (Zp_zmodType O)) i) (@companionmx R p)) (@delta_mx R (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (GRing.zero (Zp_zmodType O)) (@Ordinal (Nat.pred (@size (GRing.Ring.sort R) p)) (S (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) i)) i_small)) *)
apply/rowP => j; rewrite !mxE (bigD1 i) //= ?(=^~val_eqE, mxE) /= eqxx mul1r.
(* Goal: @eq (GRing.Ring.sort R) (@GRing.add (GRing.Ring.zmodType R) (if @eq_op nat_eqType (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) i) (Nat.pred (Nat.pred (@size (GRing.Ring.sort R) p))) then @GRing.opp (GRing.Ring.zmodType R) (@nth (GRing.Ring.sort R) (GRing.zero (GRing.Ring.zmodType R)) p (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) j)) else @GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (S (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) i)) (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) j)))) (@BigOp.bigop (GRing.Ring.sort R) (ordinal (Nat.pred (@size (GRing.Ring.sort R) p))) (GRing.zero (GRing.Ring.zmodType R)) (index_enum (ordinal_finType (Nat.pred (@size (GRing.Ring.sort R) p)))) (fun i0 : ordinal (Nat.pred (@size (GRing.Ring.sort R) p)) => @BigBody (GRing.Ring.sort R) (ordinal (Nat.pred (@size (GRing.Ring.sort R) p))) i0 (@GRing.add (GRing.Ring.zmodType R)) (negb (@eq_op (Finite.eqType (ordinal_finType (Nat.pred (@size (GRing.Ring.sort R) p)))) i0 i)) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (@delta_mx R (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (GRing.zero (Zp_zmodType O)) i) (GRing.zero (Zp_zmodType O)) i0) (@fun_of_matrix (GRing.Ring.sort R) (Nat.pred (@size (GRing.Ring.sort R) p)) (Nat.pred (@size (GRing.Ring.sort R) p)) (@companionmx R p) i0 j))))) (@GRing.natmul (GRing.Ring.zmodType R) (GRing.one R) (nat_of_bool (@eq_op nat_eqType (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) j) (S (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) i))))) *)
rewrite ltn_eqF ?big1 ?addr0 1?eq_sym //; last first.
(* Goal: forall (i0 : ordinal (Nat.pred (@size (GRing.Ring.sort R) p))) (_ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (Nat.pred (@size (GRing.Ring.sort R) p)))) i0 i))), @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (@delta_mx R (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (GRing.zero (Zp_zmodType O)) i) (GRing.zero (Zp_zmodType O)) i0) (@fun_of_matrix (GRing.Ring.sort R) (Nat.pred (@size (GRing.Ring.sort R) p)) (Nat.pred (@size (GRing.Ring.sort R) p)) (@companionmx R p) i0 j)) (GRing.zero (GRing.Ring.zmodType R)) *)
(* Goal: is_true (leq (S (@nat_of_ord (Nat.pred (@size (GRing.Ring.sort R) p)) i)) (Nat.pred (Nat.pred (@size (GRing.Ring.sort R) p)))) *)
by rewrite -ltnS prednK // (leq_trans _ i_small).
(* Goal: forall (i0 : ordinal (Nat.pred (@size (GRing.Ring.sort R) p))) (_ : is_true (negb (@eq_op (Finite.eqType (ordinal_finType (Nat.pred (@size (GRing.Ring.sort R) p)))) i0 i))), @eq (GRing.Ring.sort R) (@GRing.mul R (@fun_of_matrix (GRing.Ring.sort R) (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (@delta_mx R (S O) (Nat.pred (@size (GRing.Ring.sort R) p)) (GRing.zero (Zp_zmodType O)) i) (GRing.zero (Zp_zmodType O)) i0) (@fun_of_matrix (GRing.Ring.sort R) (Nat.pred (@size (GRing.Ring.sort R) p)) (Nat.pred (@size (GRing.Ring.sort R) p)) (@companionmx R p) i0 j)) (GRing.zero (GRing.Ring.zmodType R)) *)
by move=> k /negPf ki_eqF; rewrite !mxE eqxx ki_eqF mul0r.
Qed.
Section MinPoly.
Variables (F : fieldType) (n' : nat).
Local Notation n := n'.+1.
Variable A : 'M[F]_n.
Implicit Types p q : {poly F}.
Fact degree_mxminpoly_proof : exists d, \rank (powers_mx A d.+1) <= d.
Proof.
(* Goal: @ex nat (fun d : nat => is_true (leq (@mxrank F (S d) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S d))) d)) *)
by exists (n ^ 2)%N; rewrite rank_leq_col.
Qed.
Definition degree_mxminpoly := ex_minn degree_mxminpoly_proof.
Local Notation d := degree_mxminpoly.
Local Notation Ad := (powers_mx A d).
Lemma mxminpoly_nonconstant : d > 0.
Proof.
(* Goal: is_true (leq (S O) degree_mxminpoly) *)
rewrite /d; case: ex_minnP; case=> //; rewrite leqn0 mxrank_eq0; move/eqP.
(* Goal: forall (_ : @eq (Equality.sort (matrix_eqType (GRing.Field.eqType F) (S O) (muln (S n') (S n')))) (@powers_mx (GRing.Field.comRingType F) n' A (S O)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (muln (S n') (S n'))))) (_ : forall (n : nat) (_ : is_true (leq (@mxrank F (S n) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S n))) n)), is_true (leq O n)), is_true (leq (S O) O) *)
move/row_matrixP; move/(_ 0); move/eqP; rewrite rowK row0 mxvec_eq0.
(* Goal: forall (_ : is_true (@eq_op (matrix_eqType (GRing.Zmodule.eqType (GRing.Field.zmodType F)) (S n') (S n')) (@GRing.exp (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') A (@nat_of_ord (S O) (GRing.zero (Zp_zmodType O)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n') (S n'))))) (_ : forall (n : nat) (_ : is_true (leq (@mxrank F (S n) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S n))) n)), is_true (leq O n)), is_true (leq (S O) O) *)
by rewrite -mxrank_eq0 mxrank1.
Qed.
Lemma minpoly_mx1 : (1%:M \in Ad)%MS.
Proof.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F)))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
by apply: (eq_row_sub (Ordinal mxminpoly_nonconstant)); rewrite rowK.
Qed.
Lemma minpoly_mx_free : row_free Ad.
Proof.
(* Goal: is_true (@row_free F degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
have:= mxminpoly_nonconstant; rewrite /d; case: ex_minnP; case=> // d' _.
(* Goal: forall (_ : forall (n : nat) (_ : is_true (leq (@mxrank F (S n) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S n))) n)), is_true (leq (S d') n)) (_ : is_true (leq (S O) (S d'))), is_true (@row_free F (S d') (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S d'))) *)
move/(_ d'); move/implyP; rewrite ltnn implybF -ltnS ltn_neqAle.
(* Goal: forall (_ : is_true (negb (andb (negb (@eq_op nat_eqType (@mxrank F (S d') (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S d'))) (S d'))) (leq (@mxrank F (S d') (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S d'))) (S d'))))) (_ : is_true (leq (S O) (S d'))), is_true (@row_free F (S d') (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (S d'))) *)
by rewrite rank_leq_row andbT negbK.
Qed.
Lemma horner_mx_mem p : (horner_mx A p \in Ad)%MS.
Proof.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n') (@horner_mx (GRing.Field.comRingType F) n' A p)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
elim/poly_ind: p => [|p a IHp]; first by rewrite rmorph0 // linear0 sub0mx.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n') (@horner_mx (GRing.Field.comRingType F) n' A (@GRing.add (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F))) (@GRing.mul (poly_ringType (GRing.Field.ringType F)) p (polyX (GRing.Field.ringType F))) (@polyC (GRing.Field.ringType F) a)))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
rewrite rmorphD rmorphM /= horner_mx_C horner_mx_X.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) (@GRing.mul (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') (@horner_mx (GRing.Field.comRingType F) n' A p) A) (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') a))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
rewrite addrC -scalemx1 linearP /= -(mul_vec_lin (mulmxr_linear _ A)).
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@horner_mx (GRing.Field.comRingType F) n' A p)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
case/submxP: IHp => u ->{p}.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
have: (powers_mx A (1 + d) <= Ad)%MS.
(* Goal: forall _ : is_true (@submx F (addn (S O) degree_mxminpoly) degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)), is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
(* Goal: is_true (@submx F (addn (S O) degree_mxminpoly) degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
rewrite -(geq_leqif (mxrank_leqif_sup _)).
(* Goal: forall _ : is_true (@submx F (addn (S O) degree_mxminpoly) degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)), is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
(* Goal: is_true (@submx F degree_mxminpoly (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
(* Goal: is_true (leq (@mxrank F (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) (@mxrank F degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly))) *)
by rewrite (eqnP minpoly_mx_free) /d; case: ex_minnP.
(* Goal: forall _ : is_true (@submx F (addn (S O) degree_mxminpoly) degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)), is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
(* Goal: is_true (@submx F degree_mxminpoly (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
rewrite addnC; apply/row_subP=> i.
(* Goal: forall _ : is_true (@submx F (addn (S O) degree_mxminpoly) degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)), is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
(* Goal: is_true (@submx F (S O) (addn degree_mxminpoly (S O)) (muln (S n') (S n')) (@row (GRing.Field.sort F) degree_mxminpoly (muln (S n') (S n')) i (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A (addn degree_mxminpoly (S O)))) *)
by apply: eq_row_sub (lshift 1 i) _; rewrite !rowK.
(* Goal: forall _ : is_true (@submx F (addn (S O) degree_mxminpoly) degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)), is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@GRing.add (@GRing.Lmodule.zmodType (GRing.Field.ringType F) (Phant (GRing.Field.sort F)) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n')))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (muln (S n') (S n'))) a (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F)))))) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
apply: submx_trans; rewrite addmx_sub ?scalemx_sub //.
(* Goal: is_true (@submx F (S O) (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A)))) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
(* Goal: is_true (@submx F (S O) (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@scalar_mx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S n') (GRing.one (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
by apply: (eq_row_sub 0); rewrite rowK.
(* Goal: is_true (@submx F (S O) (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) (muln (S n') (S n')) (@mulmx (GRing.Field.ringType F) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A)))) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
rewrite -mulmxA mulmx_sub {u}//; apply/row_subP=> i.
(* Goal: is_true (@submx F (S O) (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@row (GRing.Field.sort F) degree_mxminpoly (muln (S n') (S n')) i (@mulmx (GRing.Field.ringType F) degree_mxminpoly (muln (S n') (S n')) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly) (@lin_mx (GRing.Field.ringType F) (S n') (S n') (S n') (S n') (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n')) (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S n') (S n'))) (Phant (forall _ : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'), matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n'))) (@mulmxr_linear (GRing.Field.ringType F) (S n') (S n') (S n') A))))) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
rewrite row_mul rowK mul_vec_lin /= mulmxE -exprSr.
(* Goal: is_true (@submx F (S O) (addn (S O) degree_mxminpoly) (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') (@GRing.exp (matrix_ringType (GRing.Field.ringType F) n') A (S (@nat_of_ord degree_mxminpoly i)))) (@powers_mx (GRing.Field.comRingType F) n' A (addn (S O) degree_mxminpoly))) *)
by apply: (eq_row_sub (rshift 1 i)); rewrite rowK.
Qed.
Definition mx_inv_horner B := rVpoly (mxvec B *m pinvmx Ad).
Lemma mx_inv_horner0 : mx_inv_horner 0 = 0.
Proof.
(* Goal: @eq (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (mx_inv_horner (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S n') (S n')))) (GRing.zero (poly_zmodType (GRing.Field.ringType F))) *)
by rewrite /mx_inv_horner !(linear0, mul0mx).
Qed.
Lemma mx_inv_hornerK B : (B \in Ad)%MS -> horner_mx A (mx_inv_horner B) = B.
Proof.
(* Goal: forall _ : is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') B) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@horner_mx (GRing.Field.comRingType F) n' A (mx_inv_horner B)) B *)
by move=> sBAd; rewrite horner_rVpoly mulmxKpV ?mxvecK.
Qed.
Lemma minpoly_mxM B C : (B \in Ad -> C \in Ad -> B * C \in Ad)%MS.
Proof.
(* Goal: forall (_ : is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') B) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly))) (_ : is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Field.sort F) (S n') (S n') C) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly))), is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@GRing.mul (matrix_ringType (GRing.Field.ringType F) n') B C)) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
move=> AdB AdC; rewrite -(mx_inv_hornerK AdB) -(mx_inv_hornerK AdC).
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (GRing.Ring.sort (GRing.Field.ringType F)) (S n') (S n') (@GRing.mul (matrix_ringType (GRing.Field.ringType F) n') (@horner_mx (GRing.Field.comRingType F) n' A (mx_inv_horner B)) (@horner_mx (GRing.Field.comRingType F) n' A (mx_inv_horner C)))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
by rewrite -rmorphM ?horner_mx_mem.
Qed.
Lemma minpoly_mx_ring : mxring Ad.
Proof.
(* Goal: is_true (@mxring F degree_mxminpoly (S n') (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
apply/andP; split; first by apply/mulsmx_subP; apply: minpoly_mxM.
(* Goal: is_true (@has_mxring_id F degree_mxminpoly (S n') (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
apply/mxring_idP; exists 1%:M; split=> *; rewrite ?mulmx1 ?mul1mx //.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) (S n') (S n') (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F)))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (matrix_zmodType (GRing.Field.zmodType F) (S n') (S n'))) (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S n') (S n'))))) *)
by rewrite -mxrank_eq0 mxrank1.
(* Goal: is_true (@submx F (S O) degree_mxminpoly (muln (S n') (S n')) (@mxvec (Equality.sort (GRing.Zmodule.eqType (GRing.Field.zmodType F))) (S n') (S n') (@scalar_mx (GRing.Field.ringType F) (S n') (GRing.one (GRing.Field.ringType F)))) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) *)
exact: minpoly_mx1.
Qed.
Definition mxminpoly := 'X^d - mx_inv_horner (A ^+ d).
Local Notation p_A := mxminpoly.
Lemma size_mxminpoly : size p_A = d.+1.
Proof.
(* Goal: @eq nat (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) mxminpoly)) (S degree_mxminpoly) *)
by rewrite size_addl ?size_polyXn // size_opp ltnS size_poly.
Qed.
Lemma mxminpoly_monic : p_A \is monic.
Proof.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType (GRing.Field.ringType F)))) mxminpoly (@mem (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (predPredType (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))))) (@has_quality O (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (@monic (GRing.Field.ringType F))))) *)
rewrite monicE /lead_coef size_mxminpoly coefB coefXn eqxx /=.
(* Goal: is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType (GRing.Field.ringType F))) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F)) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) (S O)) (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType F)) (@nth (GRing.Field.sort F) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) (mx_inv_horner (@GRing.exp (matrix_ringType (GRing.Field.ringType F) n') A degree_mxminpoly))) degree_mxminpoly))) (GRing.one (GRing.Field.ringType F))) *)
by rewrite nth_default ?size_poly // subr0.
Qed.
Lemma size_mod_mxminpoly p : size (p %% p_A) <= d.
Proof.
(* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F)))) (@polyseq (GRing.UnitRing.ringType (GRing.IntegralDomain.unitRingType (GRing.Field.idomainType F))) (Pdiv.Field.modp (GRing.Field.idomainType F) p mxminpoly))) degree_mxminpoly) *)
by rewrite -ltnS -size_mxminpoly ltn_modp // -size_poly_eq0 size_mxminpoly.
Qed.
Lemma mx_root_minpoly : horner_mx A p_A = 0.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@horner_mx (GRing.Field.comRingType F) n' A mxminpoly) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) *)
rewrite rmorphB -{3}(horner_mx_X A) -rmorphX /=.
(* Goal: @eq (matrix (GRing.Field.sort F) (S n') (S n')) (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) (@horner_mx (GRing.Field.comRingType F) n' A (@GRing.exp (poly_ringType (GRing.Field.ringType F)) (polyX (GRing.Field.ringType F)) degree_mxminpoly)) (@GRing.opp (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) (@horner_mx (GRing.Field.comRingType F) n' A (mx_inv_horner (@horner_mx (GRing.Field.comRingType F) n' A (@GRing.exp (poly_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F))) (polyX (GRing.ComRing.ringType (GRing.Field.comRingType F))) degree_mxminpoly)))))) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) *)
by rewrite mx_inv_hornerK ?subrr ?horner_mx_mem.
Qed.
Lemma horner_rVpolyK (u : 'rV_d) :
mx_inv_horner (horner_mx A (rVpoly u)) = rVpoly u.
Proof.
(* Goal: @eq (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (mx_inv_horner (@horner_mx (GRing.Field.comRingType F) n' A (@rVpoly (GRing.ComRing.ringType (GRing.Field.comRingType F)) degree_mxminpoly u))) (@rVpoly (GRing.ComRing.ringType (GRing.Field.comRingType F)) degree_mxminpoly u) *)
congr rVpoly; rewrite horner_rVpoly vec_mxK.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) degree_mxminpoly) (@mulmx (GRing.Field.ringType F) (S O) (muln (S n') (S n')) degree_mxminpoly (@mulmx (GRing.ComRing.ringType (GRing.Field.comRingType F)) (S O) degree_mxminpoly (muln (S n') (S n')) u (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly)) (@pinvmx F degree_mxminpoly (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType F) n' A degree_mxminpoly))) u *)
by apply: (row_free_inj minpoly_mx_free); rewrite mulmxKpV ?submxMl.
Qed.
Lemma horner_mxK p : mx_inv_horner (horner_mx A p) = p %% p_A.
Proof.
(* Goal: @eq (@poly_of (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F)))) (mx_inv_horner (@horner_mx (GRing.Field.comRingType F) n' A p)) (Pdiv.Field.modp (GRing.Field.idomainType F) p mxminpoly) *)
rewrite {1}(Pdiv.IdomainMonic.divp_eq mxminpoly_monic p) rmorphD rmorphM /=.
(* Goal: @eq (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (mx_inv_horner (@GRing.add (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n')) (@GRing.mul (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n') (@horner_mx (GRing.Field.comRingType F) n' A (@divp (GRing.Field.idomainType F) p mxminpoly)) (@horner_mx (GRing.Field.comRingType F) n' A mxminpoly)) (@horner_mx (GRing.Field.comRingType F) n' A (@modp (GRing.Field.idomainType F) p mxminpoly)))) (Pdiv.Field.modp (GRing.Field.idomainType F) p mxminpoly) *)
rewrite mx_root_minpoly mulr0 add0r.
(* Goal: @eq (@poly_of (GRing.Field.ringType F) (Phant (GRing.Field.sort F))) (mx_inv_horner (@horner_mx (GRing.Field.comRingType F) n' A (@modp (GRing.Field.idomainType F) p mxminpoly))) (Pdiv.Field.modp (GRing.Field.idomainType F) p mxminpoly) *)
by rewrite -(poly_rV_K (size_mod_mxminpoly _)) horner_rVpolyK.
Qed.
Lemma mxminpoly_min p : horner_mx A p = 0 -> p_A %| p.
Proof.
(* Goal: forall _ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@horner_mx (GRing.Field.comRingType F) n' A p) (GRing.zero (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))), is_true (Pdiv.Field.dvdp (GRing.Field.idomainType F) mxminpoly p) *)
by move=> pA0; rewrite /dvdp -horner_mxK pA0 mx_inv_horner0.
Qed.
Lemma horner_rVpoly_inj : injective (horner_mx A \o rVpoly : 'rV_d -> 'M_n).
Proof.
(* Goal: @injective (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n')) (matrix (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) degree_mxminpoly) (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType (matrix_ringType (GRing.ComRing.ringType (GRing.Field.comRingType F)) n'))) (@poly_of (GRing.ComRing.ringType (GRing.Field.comRingType F)) (Phant (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))))) (matrix (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) degree_mxminpoly) tt (@horner_mx (GRing.Field.comRingType F) n' A) (@rVpoly (GRing.ComRing.ringType (GRing.Field.comRingType F)) degree_mxminpoly) : forall _ : matrix (GRing.Ring.sort (GRing.ComRing.ringType (GRing.Field.comRingType F))) (S O) degree_mxminpoly, matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType F)))) (S n') (S n')) *)
apply: can_inj (poly_rV \o mx_inv_horner) _ => u /=.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) degree_mxminpoly) (@poly_rV (GRing.Field.ringType F) degree_mxminpoly (mx_inv_horner (@horner_mx (GRing.Field.comRingType F) n' A (@rVpoly (GRing.ComRing.ringType (GRing.Field.comRingType F)) degree_mxminpoly u)))) u *)
by rewrite horner_rVpolyK rVpolyK.
Qed.
Lemma mxminpoly_linear_is_scalar : (d <= 1) = is_scalar_mx A.
Lemma mxminpoly_dvd_char : p_A %| char_poly A.
Proof.
(* Goal: is_true (Pdiv.Field.dvdp (GRing.Field.idomainType F) mxminpoly (@char_poly (GRing.Field.ringType F) (S n') A)) *)
by apply: mxminpoly_min; apply: Cayley_Hamilton.
Qed.
Lemma eigenvalue_root_min a : eigenvalue A a = root p_A a.
Proof.
(* Goal: @eq bool (@eigenvalue F (S n') A a) (@root (GRing.Field.ringType F) mxminpoly a) *)
apply/idP/idP=> Aa; last first.
(* Goal: is_true (@root (GRing.Field.ringType F) mxminpoly a) *)
(* Goal: is_true (@eigenvalue F (S n') A a) *)
rewrite eigenvalue_root_char !root_factor_theorem in Aa *.
exact: dvdp_trans Aa mxminpoly_dvd_char.
have{Aa} [v Av_av v_nz] := eigenvalueP Aa.
apply: contraR v_nz => pa_nz; rewrite -{pa_nz}(eqmx_eq0 (eqmx_scale _ pa_nz)).
apply/eqP; rewrite -(mulmx0 _ v) -mx_root_minpoly.
elim/poly_ind: p_A => [|p c IHp].
(* Goal: is_true (@root (GRing.Field.ringType F) mxminpoly a) *)
(* Goal: is_true (@eigenvalue F (S n') A a) *)
(* Goal: is_true (@eigenvalue F (S n') A a) *)
by rewrite rmorph0 horner0 scale0r mulmx0.
rewrite !hornerE rmorphD rmorphM /= horner_mx_X horner_mx_C scalerDl.
by rewrite -scalerA mulmxDr mul_mx_scalar mulmxA -IHp -scalemxAl Av_av.
Qed.
Qed.
End MinPoly.
Prenex Implicits degree_mxminpoly mxminpoly mx_inv_horner.
Arguments mx_inv_hornerK {F n' A} [B] AnB.
Arguments horner_rVpoly_inj {F n' A} [u1 u2] eq_u12A : rename.
Section MapRingMatrix.
Variables (aR rR : ringType) (f : {rmorphism aR -> rR}).
Local Notation "A ^f" := (map_mx (GRing.RMorphism.apply f) A) : ring_scope.
Local Notation fp := (map_poly (GRing.RMorphism.apply f)).
Variables (d n : nat) (A : 'M[aR]_n).
Lemma map_rVpoly (u : 'rV_d) : fp (rVpoly u) = rVpoly u^f.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@rVpoly aR d u)) (@rVpoly rR d (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) d u)) *)
apply/polyP=> k; rewrite coef_map !coef_rVpoly.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.Additive.apply (GRing.Ring.zmodType aR) (GRing.Ring.zmodType rR) (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) (@GRing.RMorphism.additive aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort aR) (S O) d u (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType aR) end) match @insub nat (fun x : nat => leq (S x) d) (ordinal_subType d) k with | Some i => @fun_of_matrix (GRing.Ring.sort rR) (S O) d (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) d u) (GRing.zero (Zp_zmodType O)) i | None => GRing.zero (GRing.Ring.zmodType rR) end *)
by case: (insub k) => [i|]; rewrite /= ?rmorph0 // mxE.
Qed.
Lemma map_poly_rV p : (poly_rV p)^f = poly_rV (fp p) :> 'rV_d.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (S O) d) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (S O) d (@poly_rV aR d p)) (@poly_rV rR d (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) p)) *)
by apply/rowP=> j; rewrite !mxE coef_map.
Qed.
Lemma map_char_poly_mx : map_mx fp (char_poly_mx A) = char_poly_mx A^f.
Lemma map_char_poly : fp (char_poly A) = char_poly A^f.
Proof.
(* Goal: @eq (@poly_of rR (Phant (GRing.Ring.sort rR))) (@map_poly aR rR (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) (@char_poly aR n A)) (@char_poly rR n (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType aR)) (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply aR rR (Phant (forall _ : GRing.Ring.sort aR, GRing.Ring.sort rR)) f) n n A)) *)
by rewrite -det_map_mx map_char_poly_mx.
Qed.
End MapRingMatrix.
Section MapResultant.
Lemma map_resultant (aR rR : ringType) (f : {rmorphism {poly aR} -> rR}) p q :
f (lead_coef p) != 0 -> f (lead_coef q) != 0 ->
f (resultant p q)= resultant (map_poly f p) (map_poly f q).
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f (@lead_coef (poly_ringType aR) p)) (GRing.zero (GRing.Ring.zmodType rR))))) (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f (@lead_coef (poly_ringType aR) q)) (GRing.zero (GRing.Ring.zmodType rR))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f (@resultant (poly_ringType aR) p q)) (@resultant rR (@map_poly (poly_ringType aR) rR (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f) p) (@map_poly (poly_ringType aR) rR (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f) q)) *)
move=> nz_fp nz_fq; rewrite /resultant /Sylvester_mx !size_map_poly_id0 //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f (@determinant (poly_ringType aR) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@col_mx (GRing.Ring.sort (poly_ringType aR)) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@lin1_mx (poly_ringType aR) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@funcomp (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType aR))) (S O) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@poly_of (poly_ringType aR) (Phant (GRing.Ring.sort (poly_ringType aR)))) (matrix (GRing.Ring.sort (poly_ringType aR)) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q)))) tt (@poly_rV (poly_ringType aR) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@GRing.mulr_fun_head (poly_ringType (poly_ringType aR)) (matrix (GRing.Ring.sort (poly_ringType aR)) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q)))) tt p (@rVpoly (poly_ringType aR) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))))))) (@lin1_mx (poly_ringType aR) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@funcomp (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (poly_ringType aR))) (S O) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@poly_of (poly_ringType aR) (Phant (GRing.Ring.sort (poly_ringType aR)))) (matrix (GRing.Ring.sort (poly_ringType aR)) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) tt (@poly_rV (poly_ringType aR) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@GRing.mulr_fun_head (poly_ringType (poly_ringType aR)) (matrix (GRing.Ring.sort (poly_ringType aR)) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) tt q (@rVpoly (poly_ringType aR) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))))))))) (@determinant rR (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@col_mx (GRing.Ring.sort rR) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@lin1_mx rR (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@funcomp (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (S O) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@poly_of rR (Phant (GRing.Ring.sort rR))) (matrix (GRing.Ring.sort rR) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q)))) tt (@poly_rV rR (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@GRing.mulr_fun_head (poly_ringType rR) (matrix (GRing.Ring.sort rR) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q)))) tt (@map_poly (poly_ringType aR) rR (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f) p) (@rVpoly rR (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))))))) (@lin1_mx rR (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) (@funcomp (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType rR)) (S O) (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@poly_of rR (Phant (GRing.Ring.sort rR))) (matrix (GRing.Ring.sort rR) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) tt (@poly_rV rR (addn (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) q))) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))) (@GRing.mulr_fun_head (poly_ringType rR) (matrix (GRing.Ring.sort rR) (S O) (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p)))) tt (@map_poly (poly_ringType aR) rR (@GRing.RMorphism.apply (poly_ringType aR) rR (Phant (forall _ : @poly_of aR (Phant (GRing.Ring.sort aR)), GRing.Ring.sort rR)) f) q) (@rVpoly rR (Nat.pred (@size (GRing.Ring.sort (poly_ringType aR)) (@polyseq (poly_ringType aR) p))))))))) *)
rewrite -det_map_mx /= map_col_mx; congr (\det (col_mx _ _)); by apply: map_lin1_mx => v; rewrite map_poly_rV rmorphM /= map_rVpoly.
Qed.
End MapResultant.
Section MapComRing.
Variables (aR rR : comRingType) (f : {rmorphism aR -> rR}).
Local Notation "A ^f" := (map_mx f A) : ring_scope.
Local Notation fp := (map_poly f).
Variables (n' : nat) (A : 'M[aR]_n'.+1).
Lemma map_powers_mx e : (powers_mx A e)^f = powers_mx A^f e.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) e (muln (S n') (S n'))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) e (muln (S n') (S n')) (@powers_mx aR n' A e)) (@powers_mx rR n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) (S n') (S n') A) e) *)
by apply/row_matrixP=> i; rewrite -map_row !rowK map_mxvec rmorphX.
Qed.
Lemma map_horner_mx p : (horner_mx A p)^f = horner_mx A^f (fp p).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (S n') (S n')) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) (S n') (S n') (@horner_mx aR n' A p)) (@horner_mx rR n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) (S n') (S n') A) (@map_poly (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) p)) *)
rewrite -[p](poly_rV_K (leqnn _)) map_rVpoly.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (S n') (S n')) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) (S n') (S n') (@horner_mx aR n' A (@rVpoly (GRing.ComRing.ringType aR) (@size (GRing.Ring.sort (GRing.ComRing.ringType aR)) (@polyseq (GRing.ComRing.ringType aR) p)) (@poly_rV (GRing.ComRing.ringType aR) (@size (GRing.Ring.sort (GRing.ComRing.ringType aR)) (@polyseq (GRing.ComRing.ringType aR) p)) p)))) (@horner_mx rR n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.ComRing.sort aR, GRing.ComRing.sort rR)) f) (S n') (S n') A) (@rVpoly (GRing.ComRing.ringType rR) (@size (GRing.Ring.sort (GRing.ComRing.ringType aR)) (@polyseq (GRing.ComRing.ringType aR) p)) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType aR))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType rR))) (@GRing.RMorphism.apply (GRing.ComRing.ringType aR) (GRing.ComRing.ringType rR) (Phant (forall _ : GRing.Ring.sort (GRing.ComRing.ringType aR), GRing.Ring.sort (GRing.ComRing.ringType rR))) f) (S O) (@size (GRing.Ring.sort (GRing.ComRing.ringType aR)) (@polyseq (GRing.ComRing.ringType aR) p)) (@poly_rV (GRing.ComRing.ringType aR) (@size (GRing.Ring.sort (GRing.ComRing.ringType aR)) (@polyseq (GRing.ComRing.ringType aR) p)) p)))) *)
by rewrite !horner_rVpoly map_vec_mx map_mxM map_powers_mx.
Qed.
End MapComRing.
Section MapField.
Variables (aF rF : fieldType) (f : {rmorphism aF -> rF}).
Local Notation "A ^f" := (map_mx f A) : ring_scope.
Local Notation fp := (map_poly f).
Variables (n' : nat) (A : 'M[aF]_n'.+1) (p : {poly aF}).
Lemma map_mx_companion (e := congr1 predn (size_map_poly _ _)) :
(companionmx p)^f = castmx (e, e) (companionmx (fp p)).
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p)))) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (@companionmx (GRing.Field.ringType aF) (@polyseq (GRing.Field.ringType aF) p))) (@castmx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p)))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p)))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (@pair (@eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p)))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p)))) (@eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p)))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p)))) e e) (@companionmx (GRing.Field.ringType rF) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) p)))) *)
apply/matrixP => i j; rewrite !(castmxE, mxE) /= (fun_if f).
(* Goal: @eq (GRing.Field.sort rF) (if @eq_op nat_eqType (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) i) (Nat.pred (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p)))) then @GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType aF)) (@nth (GRing.Field.sort aF) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType aF))) (@polyseq (GRing.Field.ringType aF) p) (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) j))) else @GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType aF)) (GRing.one (GRing.Field.ringType aF)) (nat_of_bool (@eq_op nat_eqType (S (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) i)) (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) j))))) (if @eq_op nat_eqType (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) i) (Nat.pred (Nat.pred (@size (GRing.Field.sort rF) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) p))))) then @GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType rF)) (@nth (GRing.Field.sort rF) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) p)) (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) j)) else @GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType rF)) (GRing.one (GRing.Field.ringType rF)) (nat_of_bool (@eq_op nat_eqType (S (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) i)) (@nat_of_ord (Nat.pred (@size (GRing.Field.sort aF) (@polyseq (GRing.Field.ringType aF) p))) j)))) *)
by rewrite rmorphN coef_map size_map_poly rmorph_nat.
Qed.
Lemma companion_map_poly (e := esym (congr1 predn (size_map_poly _ _))) :
companionmx (fp p) = castmx (e, e) (companionmx p)^f.
Proof.
(* Goal: @eq (matrix (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) p)))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) p))))) (@companionmx (GRing.Field.ringType rF) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) p))) (@castmx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p)))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p)))) (@pair (@eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p))))) (@eq nat (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType rF)) (@polyseq (GRing.Field.ringType rF) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Ring.sort (GRing.Field.ringType rF))) f) p))))) e e) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType aF)) (@polyseq (GRing.Field.ringType aF) p))) (@companionmx (GRing.Field.ringType aF) (@polyseq (GRing.Field.ringType aF) p)))) *)
by rewrite map_mx_companion castmx_comp castmx_id.
Qed.
Lemma degree_mxminpoly_map : degree_mxminpoly A^f = degree_mxminpoly A.
Proof.
(* Goal: @eq nat (@degree_mxminpoly rF n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n') (S n') A)) (@degree_mxminpoly aF n' A) *)
by apply: eq_ex_minn => e; rewrite -map_powers_mx mxrank_map.
Qed.
Lemma mxminpoly_map : mxminpoly A^f = fp (mxminpoly A).
Lemma map_mx_inv_horner u : fp (mx_inv_horner A u) = mx_inv_horner A^f u^f.
Proof.
(* Goal: @eq (@poly_of (GRing.Field.ringType rF) (Phant (GRing.Ring.sort (GRing.Field.ringType rF)))) (@map_poly (GRing.Field.ringType aF) (GRing.Field.ringType rF) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (@mx_inv_horner aF n' A u)) (@mx_inv_horner rF n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n') (S n') A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n') (S n') u)) *)
rewrite map_rVpoly map_mxM map_mxvec map_pinvmx map_powers_mx.
(* Goal: @eq (@poly_of (GRing.Field.ringType rF) (Phant (GRing.Ring.sort (GRing.Field.ringType rF)))) (@rVpoly (GRing.Field.ringType rF) (@degree_mxminpoly aF n' A) (@mulmx (GRing.Field.ringType rF) (S O) (muln (S n') (S n')) (@degree_mxminpoly aF n' A) (@mxvec (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (S n') (S n') (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType aF), GRing.Ring.sort (GRing.Field.ringType rF))) f) (S n') (S n') u)) (@pinvmx rF (@degree_mxminpoly aF n' A) (muln (S n') (S n')) (@powers_mx (GRing.Field.comRingType rF) n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType aF)))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.Field.comRingType rF)))) (@GRing.RMorphism.apply (GRing.ComRing.ringType (GRing.Field.comRingType aF)) (GRing.ComRing.ringType (GRing.Field.comRingType rF)) (Phant (forall _ : GRing.ComRing.sort (GRing.Field.comRingType aF), GRing.ComRing.sort (GRing.Field.comRingType rF))) f) (S n') (S n') A) (@degree_mxminpoly aF n' A))))) (@mx_inv_horner rF n' (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n') (S n') A) (@map_mx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType aF))) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType rF))) (@GRing.RMorphism.apply (GRing.Field.ringType aF) (GRing.Field.ringType rF) (Phant (forall _ : GRing.Field.sort aF, GRing.Field.sort rF)) f) (S n') (S n') u)) *)
by rewrite /mx_inv_horner degree_mxminpoly_map.
Qed.
End MapField.
Section IntegralOverRing.
Definition integralOver (R K : ringType) (RtoK : R -> K) (z : K) :=
exists2 p, p \is monic & root (map_poly RtoK p) z.
Definition integralRange R K RtoK := forall z, @integralOver R K RtoK z.
Variables (B R K : ringType) (BtoR : B -> R) (RtoK : {rmorphism R -> K}).
Lemma integral_rmorph x :
integralOver BtoR x -> integralOver (RtoK \o BtoR) (RtoK x).
Proof.
(* Goal: forall _ : @integralOver B R BtoR x, @integralOver B K (@funcomp (GRing.Zmodule.sort (GRing.Ring.zmodType K)) (GRing.Zmodule.sort (GRing.Ring.zmodType R)) (GRing.Ring.sort B) tt (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK) BtoR) (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK x) *)
by case=> p; exists p; rewrite // map_poly_comp rmorph_root.
Qed.
Lemma integral_id x : integralOver RtoK (RtoK x).
Proof.
(* Goal: @integralOver R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK) (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK x) *)
by exists ('X - x%:P); rewrite ?monicXsubC ?rmorph_root ?root_XsubC.
Qed.
Lemma integral_nat n : integralOver RtoK n%:R.
Proof.
(* Goal: @integralOver R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK) (@GRing.natmul (GRing.Ring.zmodType K) (GRing.one K) n) *)
by rewrite -(rmorph_nat RtoK); apply: integral_id.
Qed.
Lemma integral0 : integralOver RtoK 0. Proof. exact: (integral_nat 0). Qed.
Proof.
(* Goal: @integralOver R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK) (GRing.zero (GRing.Ring.zmodType K)) *)
exact: (integral_nat 0).
Qed.
Lemma integral_poly (p : {poly K}) :
(forall i, integralOver RtoK p`_i) <-> {in p : seq K, integralRange RtoK}.
Proof.
(* Goal: iff (forall i : nat, @integralOver R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType K)) (GRing.zero (GRing.Ring.zmodType K)) (@polyseq K p) i)) (@prop_in1 (Equality.sort (GRing.Ring.eqType K)) (@mem (Equality.sort (GRing.Ring.eqType K)) (seq_predType (GRing.Ring.eqType K)) (@polyseq K p : list (GRing.Ring.sort K))) (@integralOver R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK)) (inPhantom (@integralRange R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK)))) *)
split=> intRp => [_ /(nthP 0)[i _ <-] // | i]; rewrite -[p]coefK coef_poly.
(* Goal: @integralOver R K (@GRing.RMorphism.apply R K (Phant (forall _ : GRing.Ring.sort R, GRing.Ring.sort K)) RtoK) (if leq (S i) (@size (GRing.Ring.sort K) (@polyseq K p)) then @nth (GRing.Zmodule.sort (GRing.Ring.zmodType K)) (GRing.zero (GRing.Ring.zmodType K)) (@polyseq K p) i else GRing.zero (GRing.Ring.zmodType K)) *)
by case: ifP => [ltip | _]; [apply/intRp/mem_nth | apply: integral0].
Qed.
End IntegralOverRing.
Section IntegralOverComRing.
Variables (R K : comRingType) (RtoK : {rmorphism R -> K}).
Lemma integral_horner_root w (p q : {poly K}) :
p \is monic -> root p w ->
{in p : seq K, integralRange RtoK} -> {in q : seq K, integralRange RtoK} ->
integralOver RtoK q.[w].
Lemma integral_root_monic u p :
p \is monic -> root p u -> {in p : seq K, integralRange RtoK} ->
integralOver RtoK u.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@poly_of (GRing.ComRing.ringType K) (Phant (GRing.Ring.sort (GRing.ComRing.ringType K)))) p (@mem (@poly_of (GRing.ComRing.ringType K) (Phant (GRing.Ring.sort (GRing.ComRing.ringType K)))) (predPredType (@poly_of (GRing.ComRing.ringType K) (Phant (GRing.Ring.sort (GRing.ComRing.ringType K))))) (@has_quality O (@poly_of (GRing.ComRing.ringType K) (Phant (GRing.Ring.sort (GRing.ComRing.ringType K)))) (@monic (GRing.ComRing.ringType K)))))) (_ : is_true (@root (GRing.ComRing.ringType K) p u)) (_ : @prop_in1 (Equality.sort (GRing.ComRing.eqType K)) (@mem (Equality.sort (GRing.ComRing.eqType K)) (seq_predType (GRing.ComRing.eqType K)) (@polyseq (GRing.ComRing.ringType K) p : list (GRing.ComRing.sort K))) (@integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK)) (inPhantom (@integralRange (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK)))), @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) u *)
move=> mon_p pu0 intRp; rewrite -[u]hornerX.
(* Goal: @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@horner (GRing.ComRing.ringType K) (polyX (GRing.ComRing.ringType K)) u) *)
apply: integral_horner_root mon_p pu0 intRp _.
(* Goal: @prop_in1 (Equality.sort (GRing.ComRing.eqType K)) (@mem (Equality.sort (GRing.ComRing.eqType K)) (seq_predType (GRing.ComRing.eqType K)) (@polyseq (GRing.ComRing.ringType K) (polyX (GRing.ComRing.ringType K)))) (@integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK)) (inPhantom (@integralRange (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK))) *)
by apply/integral_poly => i; rewrite coefX; apply: integral_nat.
Qed.
Let intR_XsubC u :
integralOver RtoK (- u) -> {in 'X - u%:P : seq K, integralRange RtoK}.
Proof.
(* Goal: forall _ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType K)) u), @prop_in1 (Equality.sort (GRing.ComRing.eqType K)) (@mem (Equality.sort (GRing.ComRing.eqType K)) (seq_predType (GRing.ComRing.eqType K)) (@polyseq (GRing.ComRing.ringType K) (@GRing.add (poly_zmodType (GRing.ComRing.ringType K)) (polyX (GRing.ComRing.ringType K)) (@GRing.opp (poly_zmodType (GRing.ComRing.ringType K)) (@polyC (GRing.ComRing.ringType K) u))) : list (GRing.ComRing.sort K))) (@integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK)) (inPhantom (@integralRange (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK))) *)
by move=> intRu v; rewrite polyseqXsubC !inE => /pred2P[]->.
Qed.
Lemma integral_opp u : integralOver RtoK u -> integralOver RtoK (- u).
Proof.
(* Goal: forall _ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) u, @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType K)) u) *)
by rewrite -{1}[u]opprK => /intR_XsubC/integral_root_monic; apply.
Qed.
Lemma integral_horner (p : {poly K}) u :
{in p : seq K, integralRange RtoK} -> integralOver RtoK u ->
integralOver RtoK p.[u].
Proof.
(* Goal: forall (_ : @prop_in1 (Equality.sort (GRing.ComRing.eqType K)) (@mem (Equality.sort (GRing.ComRing.eqType K)) (seq_predType (GRing.ComRing.eqType K)) (@polyseq (GRing.ComRing.ringType K) p : list (GRing.ComRing.sort K))) (@integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK)) (inPhantom (@integralRange (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK)))) (_ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) u), @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@horner (GRing.ComRing.ringType K) p u) *)
by move=> ? /integral_opp/intR_XsubC/integral_horner_root; apply.
Qed.
Lemma integral_sub u v :
integralOver RtoK u -> integralOver RtoK v -> integralOver RtoK (u - v).
Proof.
(* Goal: forall (_ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) u) (_ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) v), @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType K)) u (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType K)) v)) *)
move=> intRu /integral_opp/intR_XsubC/integral_horner/(_ intRu).
(* Goal: forall _ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@horner (GRing.ComRing.ringType K) (@GRing.add (poly_zmodType (GRing.ComRing.ringType K)) (polyX (GRing.ComRing.ringType K)) (@GRing.opp (poly_zmodType (GRing.ComRing.ringType K)) (@polyC (GRing.ComRing.ringType K) v))) u), @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType K)) u (@GRing.opp (GRing.Ring.zmodType (GRing.ComRing.ringType K)) v)) *)
by rewrite !hornerE.
Qed.
Lemma integral_add u v :
integralOver RtoK u -> integralOver RtoK v -> integralOver RtoK (u + v).
Proof.
(* Goal: forall (_ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) u) (_ : @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) v), @integralOver (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (@GRing.RMorphism.apply (GRing.ComRing.ringType R) (GRing.ComRing.ringType K) (Phant (forall _ : GRing.ComRing.sort R, GRing.ComRing.sort K)) RtoK) (@GRing.add (GRing.Ring.zmodType (GRing.ComRing.ringType K)) u v) *)
by rewrite -{2}[v]opprK => intRu /integral_opp; apply: integral_sub.
Qed.
Lemma integral_mul u v :
integralOver RtoK u -> integralOver RtoK v -> integralOver RtoK (u * v).
End IntegralOverComRing.
Section IntegralOverField.
Variables (F E : fieldType) (FtoE : {rmorphism F -> E}).
Definition algebraicOver (fFtoE : F -> E) u :=
exists2 p, p != 0 & root (map_poly fFtoE p) u.
Notation mk_mon p := ((lead_coef p)^-1 *: p).
Lemma integral_algebraic u : algebraicOver FtoE u <-> integralOver FtoE u.
Proof.
(* Goal: iff (algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u) (@integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u) *)
split=> [] [p p_nz pu0]; last by exists p; rewrite ?monic_neq0.
(* Goal: @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u *)
exists (mk_mon p); first by rewrite monicE lead_coefZ mulVf ?lead_coef_eq0.
(* Goal: is_true (@root (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (@GRing.inv (GRing.Field.unitRingType F) (@lead_coef (GRing.Field.ringType F) p)) p)) u) *)
by rewrite linearZ rootE hornerZ (rootP pu0) mulr0.
Qed.
Lemma algebraic_id a : algebraicOver FtoE (FtoE a).
Proof.
(* Goal: algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE a) *)
exact/integral_algebraic/integral_id.
Qed.
Lemma algebraic0 : algebraicOver FtoE 0.
Proof.
(* Goal: algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) *)
exact/integral_algebraic/integral0.
Qed.
Lemma algebraic1 : algebraicOver FtoE 1.
Proof.
(* Goal: algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (GRing.one (GRing.Field.ringType E)) *)
exact/integral_algebraic/integral1.
Qed.
Lemma algebraic_opp x : algebraicOver FtoE x -> algebraicOver FtoE (- x).
Proof.
(* Goal: forall _ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x, algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType E)) x) *)
by move/integral_algebraic/integral_opp/integral_algebraic.
Qed.
Lemma algebraic_add x y :
algebraicOver FtoE x -> algebraicOver FtoE y -> algebraicOver FtoE (x + y).
Proof.
(* Goal: forall (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x) (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) y), algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E)) x y) *)
move/integral_algebraic=> intFx /integral_algebraic intFy.
(* Goal: algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E)) x y) *)
exact/integral_algebraic/integral_add.
Qed.
Lemma algebraic_sub x y :
algebraicOver FtoE x -> algebraicOver FtoE y -> algebraicOver FtoE (x - y).
Proof.
(* Goal: forall (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x) (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) y), algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E)) x (@GRing.opp (GRing.Ring.zmodType (GRing.Field.ringType E)) y)) *)
by move=> algFx /algebraic_opp; apply: algebraic_add.
Qed.
Lemma algebraic_mul x y :
algebraicOver FtoE x -> algebraicOver FtoE y -> algebraicOver FtoE (x * y).
Proof.
(* Goal: forall (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x) (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) y), algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.mul (GRing.Field.ringType E) x y) *)
move/integral_algebraic=> intFx /integral_algebraic intFy.
(* Goal: algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.mul (GRing.Field.ringType E) x y) *)
exact/integral_algebraic/integral_mul.
Qed.
Lemma algebraic_inv u : algebraicOver FtoE u -> algebraicOver FtoE u^-1.
Proof.
(* Goal: forall _ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u, algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.inv (GRing.Field.unitRingType E) u) *)
have [-> | /expf_neq0 nz_u_n] := eqVneq u 0; first by rewrite invr0.
(* Goal: forall _ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u, algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.inv (GRing.Field.unitRingType E) u) *)
case=> p nz_p pu0; exists (Poly (rev p)).
(* Goal: is_true (@root (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.inv (GRing.Field.unitRingType E) u)) *)
(* Goal: is_true (negb (@eq_op (GRing.Zmodule.eqType (poly_zmodType (GRing.Field.ringType F))) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) (GRing.zero (poly_zmodType (GRing.Field.ringType F))))) *)
apply/eqP=> /polyP/(_ 0%N); rewrite coef_Poly coef0 nth_rev ?size_poly_gt0 //.
(* Goal: is_true (@root (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.inv (GRing.Field.unitRingType E) u)) *)
(* Goal: forall _ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) (subn (@size (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p)) (S O))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))), False *)
by apply/eqP; rewrite subn1 lead_coef_eq0.
(* Goal: is_true (@root (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.inv (GRing.Field.unitRingType E) u)) *)
apply/eqP/(mulfI (nz_u_n (size p).-1)); rewrite mulr0 -(rootP pu0).
(* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@GRing.exp (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) u (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.inv (GRing.Field.unitRingType E) u))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p) u) *)
rewrite (@horner_coef_wide _ (size p)); last first.
(* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@GRing.exp (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) u (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (index_enum (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (fun i : ordinal (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (ordinal (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E))) true (@GRing.mul (GRing.Field.ringType E) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))))) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)) (@GRing.exp (GRing.Field.ringType E) (@GRing.inv (GRing.Field.unitRingType E) u) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)))))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p) u) *)
(* Goal: is_true (leq (@size (GRing.Ring.sort (GRing.Field.ringType E)) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))))) (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) *)
by rewrite size_map_poly -(size_rev p) size_Poly.
(* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@GRing.exp (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) u (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (index_enum (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (fun i : ordinal (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (ordinal (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E))) true (@GRing.mul (GRing.Field.ringType E) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))))) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)) (@GRing.exp (GRing.Field.ringType E) (@GRing.inv (GRing.Field.unitRingType E) u) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)))))) (@horner (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p) u) *)
rewrite horner_coef mulr_sumr size_map_poly.
(* Goal: @eq (GRing.Ring.sort (GRing.IntegralDomain.ringType (GRing.Field.idomainType E))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)))) (index_enum (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (fun i : Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) i (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)))) true (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@GRing.exp (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) u (Nat.pred (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.mul (GRing.Field.ringType E) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))))) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)) (@GRing.exp (GRing.Field.ringType E) (@GRing.inv (GRing.Field.unitRingType E) u) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (Finite.sort (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (index_enum (ordinal_finType (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)))) (fun i : ordinal (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (ordinal (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p))) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E))) true (@GRing.mul (GRing.Field.ringType E) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType E))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p)) (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i)) (@GRing.exp (GRing.Field.ringType E) u (@nat_of_ord (@size (GRing.Ring.sort (GRing.Field.ringType F)) (@polyseq (GRing.Field.ringType F) p)) i))))) *)
rewrite [rhs in _ = rhs](reindex_inj rev_ord_inj) /=.
(* Goal: @eq (GRing.Field.sort E) (@BigOp.bigop (GRing.Field.sort E) (ordinal (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p))) (GRing.zero (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)))) (index_enum (ordinal_finType (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)))) (fun i : ordinal (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) => @BigBody (GRing.Field.sort E) (ordinal (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p))) i (@GRing.add (GRing.Ring.zmodType (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)))) true (@GRing.mul (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) (@GRing.exp (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) u (Nat.pred (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.mul (GRing.Field.ringType E) (@nth (GRing.Field.sort E) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@Poly (GRing.Field.ringType F) (@rev (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p))))) (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) i)) (@GRing.exp (GRing.Field.ringType E) (@GRing.inv (GRing.Field.unitRingType E) u) (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) i)))))) (@BigOp.bigop (GRing.Field.sort E) (ordinal (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (index_enum (ordinal_finType (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)))) (fun j : ordinal (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) => @BigBody (GRing.Field.sort E) (ordinal (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p))) j (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType E))) true (@GRing.mul (GRing.Field.ringType E) (@nth (GRing.Field.sort E) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType E))) (@polyseq (GRing.Field.ringType E) (@map_poly (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) p)) (subn (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) (S (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) j)))) (@GRing.exp (GRing.Field.ringType E) u (subn (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) (S (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) j))))))) *)
apply: eq_bigr => i _; rewrite !coef_map coef_Poly nth_rev // mulrCA.
(* Goal: @eq (GRing.Field.sort E) (@GRing.mul (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType E))) (@GRing.Additive.apply (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.Ring.zmodType (GRing.Field.ringType E)) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType F), GRing.Ring.sort (GRing.Field.ringType E))) (@GRing.RMorphism.additive (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType F), GRing.Ring.sort (GRing.Field.ringType E))) FtoE) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) (subn (@size (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p)) (S (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) i))))) (@GRing.mul (GRing.ComRing.ringType (GRing.IntegralDomain.comRingType (GRing.Field.idomainType E))) (@GRing.exp (GRing.IntegralDomain.ringType (GRing.Field.idomainType E)) u (Nat.pred (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)))) (@GRing.exp (GRing.Field.ringType E) (@GRing.inv (GRing.Field.unitRingType E) u) (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) i)))) (@GRing.mul (GRing.Field.ringType E) (@GRing.Additive.apply (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.Ring.zmodType (GRing.Field.ringType E)) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType F), GRing.Ring.sort (GRing.Field.ringType E))) (@GRing.RMorphism.additive (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Ring.sort (GRing.Field.ringType F), GRing.Ring.sort (GRing.Field.ringType E))) FtoE) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType F))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (@polyseq (GRing.Field.ringType F) p) (subn (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) (S (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) i))))) (@GRing.exp (GRing.Field.ringType E) u (subn (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) (S (@nat_of_ord (@size (GRing.Field.sort F) (@polyseq (GRing.Field.ringType F) p)) i))))) *)
by congr (_ * _); rewrite -{1}(subnKC (valP i)) addSn addnC exprD exprVn ?mulfK.
Qed.
Lemma algebraic_div x y :
algebraicOver FtoE x -> algebraicOver FtoE y -> algebraicOver FtoE (x / y).
Proof.
(* Goal: forall (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x) (_ : algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) y), algebraicOver (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y)) *)
by move=> algFx /algebraic_inv; apply: algebraic_mul.
Qed.
Lemma integral_inv x : integralOver FtoE x -> integralOver FtoE x^-1.
Proof.
(* Goal: forall _ : @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x, @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.inv (GRing.Field.unitRingType E) x) *)
by move/integral_algebraic/algebraic_inv/integral_algebraic.
Qed.
Lemma integral_div x y :
integralOver FtoE x -> integralOver FtoE y -> integralOver FtoE (x / y).
Proof.
(* Goal: forall (_ : @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) x) (_ : @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) y), @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) (@GRing.mul (GRing.Field.ringType E) x (@GRing.inv (GRing.Field.unitRingType E) y)) *)
by move=> algFx /integral_inv; apply: integral_mul.
Qed.
Lemma integral_root p u :
p != 0 -> root p u -> {in p : seq E, integralRange FtoE} ->
integralOver FtoE u.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (GRing.Zmodule.eqType (poly_zmodType (GRing.Field.ringType E))) p (GRing.zero (poly_zmodType (GRing.Field.ringType E)))))) (_ : is_true (@root (GRing.Field.ringType E) p u)) (_ : @prop_in1 (Equality.sort (GRing.Field.eqType E)) (@mem (Equality.sort (GRing.Field.eqType E)) (seq_predType (GRing.Field.eqType E)) (@polyseq (GRing.Field.ringType E) p : list (GRing.Field.sort E))) (@integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)) (inPhantom (@integralRange (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE)))), @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u *)
move=> nz_p pu0 algFp.
(* Goal: @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u *)
have mon_p1: mk_mon p \is monic.
(* Goal: @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u *)
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))) (@GRing.Lmodule.base (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (@GRing.Lmodule.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))) (@GRing.Lmodule.class (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType E))))))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType E))) (@GRing.inv (GRing.Field.unitRingType E) (@lead_coef (GRing.Field.ringType E) p)) p) (@mem (@poly_of (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E))))) (predPredType (@poly_of (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))))) (@has_quality O (@poly_of (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.Field.unitRingType E))))) (@monic (GRing.UnitRing.ringType (GRing.Field.unitRingType E)))))) *)
by rewrite monicE lead_coefZ mulVf ?lead_coef_eq0.
(* Goal: @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u *)
have p1u0: root (mk_mon p) u by rewrite rootE hornerZ (rootP pu0) mulr0.
(* Goal: @integralOver (GRing.Field.ringType F) (GRing.Field.ringType E) (@GRing.RMorphism.apply (GRing.Field.ringType F) (GRing.Field.ringType E) (Phant (forall _ : GRing.Field.sort F, GRing.Field.sort E)) FtoE) u *)
apply: integral_root_monic mon_p1 p1u0 _ => _ /(nthP 0)[i ltip <-].
(* Goal: @integralOver (GRing.ComRing.ringType (GRing.Field.comRingType F)) (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) (@GRing.RMorphism.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) (Phant (forall _ : GRing.ComRing.sort (GRing.Field.comRingType F), GRing.ComRing.sort (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E)))) FtoE) (@nth (Equality.sort (GRing.Zmodule.eqType (GRing.ComRing.zmodType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))))) (GRing.zero (GRing.ComRing.zmodType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E)))) (@polyseq (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType E)) (poly_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType E))) (@GRing.inv (GRing.Field.unitRingType E) (@lead_coef (GRing.Field.ringType E) p)) p)) i) *)
rewrite coefZ mulrC; rewrite size_scale ?invr_eq0 ?lead_coef_eq0 // in ltip.
(* Goal: @integralOver (GRing.ComRing.ringType (GRing.Field.comRingType F)) (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) (@GRing.RMorphism.apply (GRing.ComRing.ringType (GRing.Field.comRingType F)) (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) (Phant (forall _ : GRing.ComRing.sort (GRing.Field.comRingType F), GRing.ComRing.sort (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E)))) FtoE) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) (@nth (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))))) (@polyseq (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType E))) p) i) (@GRing.inv (GRing.Field.unitRingType E) (@lead_coef (GRing.Field.ringType E) p))) *)
by apply: integral_div; apply/algFp/mem_nth; rewrite -?polySpred.
Qed.
End IntegralOverField.
Module MatrixFormula.
Section MatrixFormula.
Variable F : fieldType.
Local Notation False := GRing.False.
Local Notation True := GRing.True.
Local Notation And := GRing.And (only parsing).
Local Notation Add := GRing.Add (only parsing).
Local Notation Bool b := (GRing.Bool b%bool).
Local Notation term := (GRing.term F).
Local Notation form := (GRing.formula F).
Local Notation eval := GRing.eval.
Local Notation holds := GRing.holds.
Local Notation qf_form := GRing.qf_form.
Local Notation qf_eval := GRing.qf_eval.
Definition eval_mx (e : seq F) := @map_mx term F (eval e).
Definition mx_term := @map_mx F term GRing.Const.
Lemma eval_mx_term e m n (A : 'M_(m, n)) : eval_mx e (mx_term A) = A.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@eval_mx e m n (@mx_term m n A)) A *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Definition mulmx_term m n p (A : 'M[term]_(m, n)) (B : 'M_(n, p)) :=
\matrix_(i, k) (\big[Add/0]_j (A i j * B j k))%T.
Lemma eval_mulmx e m n p (A : 'M[term]_(m, n)) (B : 'M_(n, p)) :
eval_mx e (mulmx_term A B) = eval_mx e A *m eval_mx e B.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m p) (@eval_mx e m p (@mulmx_term m n p A B)) (@mulmx (GRing.Field.ringType F) m n p (@eval_mx e m n A) (@eval_mx e n p B)) *)
apply/matrixP=> i k; rewrite !mxE /= ((big_morph (eval e)) 0 +%R) //=.
(* Goal: @eq (GRing.Field.sort F) (@BigOp.bigop (GRing.Field.sort F) (ordinal n) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (index_enum (ordinal_finType n)) (fun i0 : ordinal n => @BigBody (GRing.Field.sort F) (ordinal n) i0 (@GRing.add (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) true (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (@GRing.eval (GRing.Field.unitRingType F) e (@fun_of_matrix (GRing.term (GRing.Field.sort F)) m n A i i0)) (@GRing.eval (GRing.Field.unitRingType F) e (@fun_of_matrix (GRing.term (GRing.Field.sort F)) n p B i0 k))))) (@BigOp.bigop (GRing.Field.sort F) (ordinal n) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType F))) (index_enum (ordinal_finType n)) (fun j : ordinal n => @BigBody (GRing.Field.sort F) (ordinal n) j (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F))) true (@GRing.mul (GRing.Field.ringType F) (@fun_of_matrix (GRing.Field.sort F) m n (@eval_mx e m n A) i j) (@fun_of_matrix (GRing.Field.sort F) n p (@eval_mx e n p B) j k)))) *)
by apply: eq_bigr => j _; rewrite /= !mxE.
Qed.
Local Notation morphAnd f := ((big_morph f) true andb).
Let Schur m n (A : 'M[term]_(1 + m, 1 + n)) (a := A 0 0) :=
\matrix_(i, j) (drsubmx A i j - a^-1 * dlsubmx A i 0%R * ursubmx A 0%R j)%T.
Fixpoint mxrank_form (r m n : nat) : 'M_(m, n) -> form :=
match m, n return 'M_(m, n) -> form with
| m'.+1, n'.+1 => fun A : 'M_(1 + m', 1 + n') =>
let nzA k := A k.1 k.2 != 0 in
let xSchur k := Schur (xrow k.1 0%R (xcol k.2 0%R A)) in
let recf k := Bool (r > 0) /\ mxrank_form r.-1 (xSchur k) in
GRing.Pick nzA recf (Bool (r == 0%N))
| _, _ => fun _ => Bool (r == 0%N)
end%T.
Lemma mxrank_form_qf r m n (A : 'M_(m, n)) : qf_form (mxrank_form r A).
Proof.
(* Goal: is_true (@GRing.qf_form (GRing.Field.unitRingType F) (@mxrank_form r m n A)) *)
by elim: m r n A => [|m IHm] r [|n] A //=; rewrite GRing.Pick_form_qf /=.
Qed.
Lemma eval_mxrank e r m n (A : 'M_(m, n)) :
qf_eval e (mxrank_form r A) = (\rank (eval_mx e A) == r).
Proof.
(* Goal: @eq bool (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form r m n A)) (@eq_op nat_eqType (@mxrank F m n (@eval_mx e m n A)) r) *)
elim: m r n A => [|m IHm] r [|n] A /=; try by case r.
(* Goal: @eq bool (@GRing.qf_eval (GRing.Field.unitRingType F) e (@GRing.Pick (GRing.Field.unitRingType F) (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun k : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => @GRing.Not (GRing.Field.sort F) (@GRing.Equal (GRing.Field.sort F) (@fun_of_matrix (GRing.term (GRing.Field.sort F)) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) k) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) k)) (GRing.NatConst (GRing.Field.sort F) O))) (fun k : prod (ordinal (S m)) (ordinal (S n)) => @GRing.And (GRing.Field.sort F) (@GRing.Bool (GRing.Field.sort F) (leq (S O) r)) (@mxrank_form (Nat.pred r) m n (@Schur m n (@xrow (GRing.term (GRing.Field.sort F)) (S m) (S n) (@fst (ordinal (S m)) (ordinal (S n)) k) (GRing.zero (Zp_zmodType m)) (@xcol (GRing.term (GRing.Field.sort F)) (addn (S O) m) (S n) (@snd (ordinal (S m)) (ordinal (S n)) k) (GRing.zero (Zp_zmodType n)) A))))) (@GRing.Bool (GRing.Field.sort F) (@eq_op nat_eqType r O)))) (@eq_op nat_eqType (@mxrank F (S m) (S n) (@eval_mx e (S m) (S n) A)) r) *)
rewrite GRing.eval_Pick /mxrank unlock /=; set pf := fun _ => _.
(* Goal: @eq bool match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) pf with | Some i => andb (leq (S O) r) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (Nat.pred r) m n (@Schur m n (@xrow (GRing.term (GRing.Field.sort F)) (S m) (S n) (@fst (ordinal (S m)) (ordinal (S n)) i) (GRing.zero (Zp_zmodType m)) (@xcol (GRing.term (GRing.Field.sort F)) (addn (S O) m) (S n) (@snd (ordinal (S m)) (ordinal (S n)) i) (GRing.zero (Zp_zmodType n)) A))))) | None => @eq_op nat_eqType r O end (@eq_op nat_eqType (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun ij : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.Field.eqType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) ij)) (GRing.zero (GRing.Field.zmodType F)))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination F m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end) r) *)
rewrite -(@eq_pick _ pf) => [|k]; rewrite {}/pf ?mxE // eq_sym.
(* Goal: @eq bool match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun H : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.UnitRing.eqType (GRing.Field.unitRingType F)) (@GRing.eval (GRing.Field.unitRingType F) e (@fun_of_matrix (GRing.term (GRing.Field.sort F)) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) H) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) H))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) O))) with | Some i => andb (leq (S O) r) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (Nat.pred r) m n (@Schur m n (@xrow (GRing.term (GRing.Field.sort F)) (S m) (S n) (@fst (ordinal (S m)) (ordinal (S n)) i) (GRing.zero (Zp_zmodType m)) (@xcol (GRing.term (GRing.Field.sort F)) (addn (S O) m) (S n) (@snd (ordinal (S m)) (ordinal (S n)) i) (GRing.zero (Zp_zmodType n)) A))))) | None => @eq_op nat_eqType O r end (@eq_op nat_eqType (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat match @pick (prod_finType (ordinal_finType (addn (S O) m)) (ordinal_finType (addn (S O) n))) (fun H : prod (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) => negb (@eq_op (GRing.UnitRing.eqType (GRing.Field.unitRingType F)) (@GRing.eval (GRing.Field.unitRingType F) e (@fun_of_matrix (GRing.term (GRing.Field.sort F)) (addn (S O) m) (addn (S O) n) A (@fst (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) H) (@snd (ordinal (addn (S O) m)) (ordinal (addn (S O) n)) H))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) O))) with | Some (pair i j as s) => let 'pair (pair L U as p) r := @Gaussian_elimination F m n (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m n) (@drsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A)))) (@GRing.opp (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) m n) (@mulmx (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O) n (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))))) in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r) | None => @pair (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (@pair (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n)) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))) (@scalar_mx (GRing.Field.ringType F) (S n) (GRing.one (GRing.Field.ringType F)))) O end) r) *)
case: pick => [[i j]|] //=; set B := _ - _; have:= mxrankE B.
(* Goal: forall _ : @eq nat (@mxrank F m n B) (@snd (prod (matrix (GRing.Field.sort F) m m) (matrix (GRing.Field.sort F) n n)) nat (@Gaussian_elimination F m n B)), @eq bool (andb (leq (S O) r) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (Nat.pred r) m n (@Schur m n (@xrow (GRing.term (GRing.Field.sort F)) (S m) (S n) i (GRing.zero (Zp_zmodType m)) (@xcol (GRing.term (GRing.Field.sort F)) (addn (S O) m) (S n) j (GRing.zero (Zp_zmodType n)) A)))))) (@eq_op nat_eqType (@snd (prod (matrix (GRing.Field.sort F) (S m) (S m)) (matrix (GRing.Field.sort F) (S n) (S n))) nat (let 'pair (pair L U as p) r := @Gaussian_elimination F m n B in @pair (prod (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n))) nat (@pair (matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) m)) (matrix (GRing.Field.sort F) (addn (S O) n) (addn (S O) n)) (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) m) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@block_mx (GRing.Field.sort F) (S O) m (S O) m (GRing.one (matrix_ringType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) O)) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F))) (S O) m)) (@GRing.scale (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) (matrix_lmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType F)) m (S O)) (@GRing.inv (GRing.Field.unitRingType F) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@dlsubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A))))) L)) (@xcol (GRing.Field.sort F) (addn (S O) n) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@block_mx (GRing.Field.sort F) (S O) n (S O) n (@scalar_mx (GRing.Field.ringType F) (S O) (@fun_of_matrix (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) (@eval_mx e (S m) (S n) A) i j)) (@ursubmx (GRing.Field.sort F) (S O) m (S O) n (@xrow (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) i (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType m))) (@xcol (GRing.Field.sort F) (addn (S O) m) (addn (S O) n) j (GRing.zero (finalg.FinRing.Zmodule.zmodType (Zp_finZmodType n))) (@eval_mx e (S m) (S n) A)))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) n (S O))) U))) (S r))) r) *)
case: (Gaussian_elimination B) r => [[_ _] _] [|r] //= <-; rewrite {}IHm eqSS.
(* Goal: @eq bool (@eq_op nat_eqType (@mxrank F m n (@eval_mx e m n (@Schur m n (@xrow (GRing.term (GRing.Field.sort F)) (S m) (S n) i (GRing.zero (Zp_zmodType m)) (@xcol (GRing.term (GRing.Field.sort F)) (addn (S O) m) (S n) j (GRing.zero (Zp_zmodType n)) A))))) r) (@eq_op nat_eqType (@mxrank F m n B) r) *)
by congr (\rank _ == r); apply/matrixP=> k l; rewrite !(mxE, big_ord1) !tpermR.
Qed.
Lemma eval_vec_mx e m n (u : 'rV_(m * n)) :
eval_mx e (vec_mx u) = vec_mx (eval_mx e u).
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m n) (@eval_mx e m n (@vec_mx (GRing.term (GRing.Field.sort F)) m n u)) (@vec_mx (GRing.Field.sort F) m n (@eval_mx e (S O) (muln m n) u)) *)
by apply/matrixP=> i j; rewrite !mxE.
Qed.
Lemma eval_mxvec e m n (A : 'M_(m, n)) :
eval_mx e (mxvec A) = mxvec (eval_mx e A).
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) (muln m n)) (@eval_mx e (S O) (muln m n) (@mxvec (GRing.term (GRing.Field.sort F)) m n A)) (@mxvec (GRing.Field.sort F) m n (@eval_mx e m n A)) *)
by rewrite -{2}[A]mxvecK eval_vec_mx vec_mxK.
Qed.
Section Subsetmx.
Variables (m1 m2 n : nat) (A : 'M[term]_(m1, n)) (B : 'M[term]_(m2, n)).
Definition submx_form :=
\big[And/True]_(r < n.+1) (mxrank_form r (col_mx A B) ==> mxrank_form r B)%T.
Lemma eval_col_mx e :
eval_mx e (col_mx A B) = col_mx (eval_mx e A) (eval_mx e B).
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) (addn m1 m2) n) (@eval_mx e (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B)) (@col_mx (GRing.Field.sort F) m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
by apply/matrixP=> i j; do 2![rewrite !mxE //; case: split => ?].
Qed.
Lemma submx_form_qf : qf_form submx_form.
Proof.
(* Goal: is_true (@GRing.qf_form (GRing.Field.unitRingType F) submx_form) *)
by rewrite (morphAnd (@qf_form _)) ?big1 //= => r _; rewrite !mxrank_form_qf.
Qed.
Lemma eval_submx e : qf_eval e submx_form = (eval_mx e A <= eval_mx e B)%MS.
Proof.
(* Goal: @eq bool (@GRing.qf_eval (GRing.Field.unitRingType F) e submx_form) (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
rewrite (morphAnd (qf_eval e)) //= big_andE /=.
(* Goal: @eq bool (@FiniteQuant.quant0b (ordinal_finType (S n)) (fun i : ordinal (S n) => @FiniteQuant.all_in (ordinal_finType (S n)) true (FiniteQuant.Quantified (implb (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) i) (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) i) m2 n B)))) i)) (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
apply/forallP/idP=> /= [|sAB d]; last first.
(* Goal: forall _ : forall x : ordinal (S n), is_true (implb (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) x) (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) x) m2 n B))), is_true (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
(* Goal: is_true (implb (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) d) (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) d) m2 n B))) *)
rewrite !eval_mxrank eval_col_mx -addsmxE; apply/implyP=> /eqP <-.
(* Goal: forall _ : forall x : ordinal (S n), is_true (implb (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) x) (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) x) m2 n B))), is_true (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
(* Goal: is_true (@eq_op nat_eqType (@mxrank F m2 n (@eval_mx e m2 n B)) (@mxrank F n n (@addsmx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)))) *)
by rewrite mxrank_leqif_sup ?addsmxSr // addsmx_sub sAB /=.
(* Goal: forall _ : forall x : ordinal (S n), is_true (implb (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) x) (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) x) m2 n B))), is_true (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
move/(_ (inord (\rank (eval_mx e (col_mx A B))))).
(* Goal: forall _ : is_true (implb (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) (@inord n (@mxrank F (addn m1 m2) n (@eval_mx e (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))))) (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))) (@GRing.qf_eval (GRing.Field.unitRingType F) e (@mxrank_form (@nat_of_ord (S n) (@inord n (@mxrank F (addn m1 m2) n (@eval_mx e (addn m1 m2) n (@col_mx (GRing.term (GRing.Field.sort F)) m1 m2 n A B))))) m2 n B))), is_true (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
rewrite inordK ?ltnS ?rank_leq_col // !eval_mxrank eqxx /= eval_col_mx.
(* Goal: forall _ : is_true (@eq_op nat_eqType (@mxrank F m2 n (@eval_mx e m2 n B)) (@mxrank F (addn m1 m2) n (@col_mx (GRing.Field.sort F) m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)))), is_true (@submx F m1 m2 n (@eval_mx e m1 n A) (@eval_mx e m2 n B)) *)
by rewrite -addsmxE mxrank_leqif_sup ?addsmxSr // addsmx_sub; case/andP.
Qed.
End Subsetmx.
Section Env.
Variable d : nat.
Definition seq_of_rV (v : 'rV_d) : seq F := fgraph [ffun i => v 0 i].
Lemma size_seq_of_rV v : size (seq_of_rV v) = d.
Proof.
(* Goal: @eq nat (@size (GRing.Field.sort F) (seq_of_rV v)) d *)
by rewrite tuple.size_tuple card_ord.
Qed.
Lemma nth_seq_of_rV x0 v (i : 'I_d) : nth x0 (seq_of_rV v) i = v 0 i.
Proof.
(* Goal: @eq (GRing.Field.sort F) (@nth (GRing.Field.sort F) x0 (seq_of_rV v) (@nat_of_ord d i)) (@fun_of_matrix (GRing.Field.sort F) (S O) d v (GRing.zero (Zp_zmodType O)) i) *)
by rewrite nth_fgraph_ord ffunE.
Qed.
Definition row_var k : 'rV[term]_d := \row_i ('X_(k * d + i))%T.
Definition row_env (e : seq 'rV_d) := flatten (map seq_of_rV e).
Lemma nth_row_env e k (i : 'I_d) : (row_env e)`_(k * d + i) = e`_k 0 i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Field.zmodType F)) (@nth (GRing.Zmodule.sort (GRing.Field.zmodType F)) (GRing.zero (GRing.Field.zmodType F)) (row_env e) (addn (muln k d) (@nat_of_ord d i))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) d (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k) (GRing.zero (Zp_zmodType O)) i) *)
elim: e k => [|v e IHe] k; first by rewrite !nth_nil mxE.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Field.zmodType F)) (@nth (GRing.Zmodule.sort (GRing.Field.zmodType F)) (GRing.zero (GRing.Field.zmodType F)) (row_env (@cons (matrix (GRing.Field.sort F) (S O) d) v e)) (addn (muln k d) (@nat_of_ord d i))) (@fun_of_matrix (GRing.Zmodule.sort (GRing.Field.zmodType F)) (S O) d (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (@cons (matrix (GRing.Field.sort F) (S O) d) v e) k) (GRing.zero (Zp_zmodType O)) i) *)
rewrite /row_env /= nth_cat size_seq_of_rV.
(* Goal: @eq (GRing.Field.sort F) (if leq (S (addn (muln k d) (@nat_of_ord d i))) d then @nth (GRing.Field.sort F) (GRing.zero (GRing.Field.zmodType F)) (seq_of_rV v) (addn (muln k d) (@nat_of_ord d i)) else @nth (GRing.Field.sort F) (GRing.zero (GRing.Field.zmodType F)) (@flatten (GRing.Field.sort F) (@map (matrix (GRing.Field.sort F) (S O) d) (list (GRing.Field.sort F)) seq_of_rV e)) (subn (addn (muln k d) (@nat_of_ord d i)) d)) (@fun_of_matrix (GRing.Field.sort F) (S O) d (@nth (matrix (GRing.Field.sort F) (S O) d) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (@cons (matrix (GRing.Field.sort F) (S O) d) v e) k) (GRing.zero (Zp_zmodType O)) i) *)
case: k => [|k]; first by rewrite (valP i) nth_seq_of_rV.
(* Goal: @eq (GRing.Field.sort F) (if leq (S (addn (muln (S k) d) (@nat_of_ord d i))) d then @nth (GRing.Field.sort F) (GRing.zero (GRing.Field.zmodType F)) (seq_of_rV v) (addn (muln (S k) d) (@nat_of_ord d i)) else @nth (GRing.Field.sort F) (GRing.zero (GRing.Field.zmodType F)) (@flatten (GRing.Field.sort F) (@map (matrix (GRing.Field.sort F) (S O) d) (list (GRing.Field.sort F)) seq_of_rV e)) (subn (addn (muln (S k) d) (@nat_of_ord d i)) d)) (@fun_of_matrix (GRing.Field.sort F) (S O) d (@nth (matrix (GRing.Field.sort F) (S O) d) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (@cons (matrix (GRing.Field.sort F) (S O) d) v e) (S k)) (GRing.zero (Zp_zmodType O)) i) *)
by rewrite mulSn -addnA -if_neg -leqNgt leq_addr addKn IHe.
Qed.
Lemma eval_row_var e k : eval_mx (row_env e) (row_var k) = e`_k :> 'rV_d.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) d) (@eval_mx (row_env e) (S O) d (row_var k)) (@nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k) *)
by apply/rowP=> i; rewrite !mxE /= nth_row_env.
Qed.
Definition Exists_row_form k (f : form) :=
foldr GRing.Exists f (codom (fun i : 'I_d => k * d + i)%N).
Lemma Exists_rowP e k f :
d > 0 ->
((exists v : 'rV[F]_d, holds (row_env (set_nth 0 e k v)) f)
<-> holds (row_env e) (Exists_row_form k f)).
Proof.
(* Goal: forall _ : is_true (leq (S O) d), iff (@ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f)) (@GRing.holds (GRing.Field.unitRingType F) (row_env e) (Exists_row_form k f)) *)
move=> d_gt0; pose i_ j := Ordinal (ltn_pmod j d_gt0).
(* Goal: iff (@ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f)) (@GRing.holds (GRing.Field.unitRingType F) (row_env e) (Exists_row_form k f)) *)
have d_eq j: (j = j %/ d * d + i_ j)%N := divn_eq j d.
(* Goal: iff (@ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f)) (@GRing.holds (GRing.Field.unitRingType F) (row_env e) (Exists_row_form k f)) *)
split=> [[v f_v] | ]; last case/GRing.foldExistsP=> e' ee' f_e'.
(* Goal: @ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f) *)
(* Goal: @GRing.holds (GRing.Field.unitRingType F) (row_env e) (Exists_row_form k f) *)
apply/GRing.foldExistsP; exists (row_env (set_nth 0 e k v)) => {f f_v}// j.
(* Goal: @ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f) *)
(* Goal: forall _ : is_true (@in_mem (Equality.sort nat_eqType) j (@mem (Equality.sort nat_eqType) (simplPredType (Equality.sort nat_eqType)) (@predC (Equality.sort nat_eqType) (@pred_of_simpl (Equality.sort nat_eqType) (@pred_of_mem_pred (Equality.sort nat_eqType) (@mem (Equality.sort nat_eqType) (seq_predType nat_eqType) (@codom (ordinal_finType d) nat (fun i : ordinal d => addn (muln k d) (@nat_of_ord d i))))))))), @eq (GRing.Zmodule.sort (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (@nth (GRing.Zmodule.sort (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (row_env e) j) (@nth (GRing.Zmodule.sort (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) j) *)
rewrite [j]d_eq !nth_row_env nth_set_nth /=; case: eqP => // ->.
(* Goal: @ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f) *)
(* Goal: forall _ : is_true (@in_mem nat (addn (muln k d) (modn j d)) (@mem nat (simplPredType nat) (@predC nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat (seq_predType nat_eqType) (@codom (ordinal_finType d) nat (fun i : ordinal d => addn (muln k d) (@nat_of_ord d i))))))))), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) d (@nth (matrix (GRing.Field.sort F) (S O) d) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k) (GRing.zero (Zp_zmodType O)) (i_ j)) (@fun_of_matrix (GRing.Field.sort F) (S O) d v (GRing.zero (Zp_zmodType O)) (i_ j)) *)
by case/imageP; exists (i_ j).
(* Goal: @ex (matrix (GRing.Field.sort F) (S O) d) (fun v : matrix (GRing.Field.sort F) (S O) d => @GRing.holds (GRing.Field.unitRingType F) (row_env (@set_nth (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k v)) f) *)
exists (\row_i e'`_(k * d + i)); apply: eq_holds f_e' => j /=.
(* Goal: @eq (GRing.Field.sort F) (@nth (GRing.Field.sort F) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) e' j) (@nth (GRing.Field.sort F) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) (row_env (@set_nth (matrix (GRing.Field.sort F) (S O) d) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e k (@matrix_of_fun (GRing.Field.sort F) (S O) d matrix_key (fun (_ : ordinal (S O)) (i : ordinal d) => @nth (GRing.Field.sort F) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) e' (addn (muln k d) (@nat_of_ord d i)))))) j) *)
move/(_ j): ee'; rewrite [j]d_eq !nth_row_env nth_set_nth /=.
(* Goal: forall _ : forall _ : is_true (@in_mem nat (addn (muln (divn j d) d) (modn j d)) (@mem nat (simplPredType nat) (@predC nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat (seq_predType nat_eqType) (@codom (ordinal_finType d) nat (fun i : ordinal d => addn (muln k d) (@nat_of_ord d i))))))))), @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) (S O) d (@nth (matrix (GRing.Field.sort F) (S O) d) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e (divn j d)) (GRing.zero (Zp_zmodType O)) (i_ j)) (@nth (GRing.Field.sort F) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) e' (addn (muln (divn j d) d) (modn j d))), @eq (GRing.Field.sort F) (@nth (GRing.Field.sort F) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) e' (addn (muln (divn j d) d) (modn j d))) (@fun_of_matrix (GRing.Field.sort F) (S O) d (if @eq_op nat_eqType (divn j d) k then @matrix_of_fun (GRing.Field.sort F) (S O) d matrix_key (fun (_ : ordinal (S O)) (i : ordinal d) => @nth (GRing.Field.sort F) (GRing.zero (GRing.UnitRing.zmodType (GRing.Field.unitRingType F))) e' (addn (muln k d) (@nat_of_ord d i))) else @nth (matrix (GRing.Field.sort F) (S O) d) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) d)) e (divn j d)) (GRing.zero (Zp_zmodType O)) (i_ j)) *)
case: eqP => [-> | ne_j_k -> //]; first by rewrite mxE.
(* Goal: is_true (@in_mem nat (addn (muln (divn j d) d) (modn j d)) (@mem nat (simplPredType nat) (@predC nat (@pred_of_simpl nat (@pred_of_mem_pred nat (@mem nat (seq_predType nat_eqType) (@codom (ordinal_finType d) nat (fun i : ordinal d => addn (muln k d) (@nat_of_ord d i))))))))) *)
apply/mapP=> [[r lt_r_d]]; rewrite -d_eq => def_j; case: ne_j_k.
(* Goal: @eq (Equality.sort nat_eqType) (divn j d) k *)
by rewrite def_j divnMDl // divn_small ?addn0.
Qed.
End Env.
End MatrixFormula.
End MatrixFormula.
|
Require Export GeoCoq.Elements.OriginalProofs.euclidean_tactics.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_3_6a :
forall A B C D,
BetS A B C -> BetS A C D ->
BetS B C D.
Proof.
(* Goal: forall (A B C D : @Point Ax) (_ : @BetS Ax A B C) (_ : @BetS Ax A C D), @BetS Ax B C D *)
intros.
(* Goal: @BetS Ax B C D *)
assert (BetS C B A) by (conclude axiom_betweennesssymmetry).
(* Goal: @BetS Ax B C D *)
assert (BetS D C A) by (conclude axiom_betweennesssymmetry).
(* Goal: @BetS Ax B C D *)
assert (BetS D C B) by (conclude axiom_innertransitivity).
(* Goal: @BetS Ax B C D *)
assert (BetS B C D) by (conclude axiom_betweennesssymmetry).
(* Goal: @BetS Ax B C D *)
close.
Qed.
End Euclid.
|
Require Export Bool.
Require Export IfProp.
Require Export Zerob.
Lemma bool_dec : forall b : bool, {b = true} + {b = false}.
Proof.
(* Goal: forall b : bool, sumbool (@eq bool b true) (@eq bool b false) *)
simple induction b; auto with bool.
Qed.
Hint Resolve bool_dec.
Lemma orb_sym : forall a b : bool, a || b = b || a.
Proof.
(* Goal: forall a b : bool, @eq bool (orb a b) (orb b a) *)
simple induction a; simple induction b; auto with bool.
Qed.
Hint Immediate orb_sym.
Lemma orb_false : forall a b : bool, a || b = false -> a = false /\ b = false.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (orb a b) false), and (@eq bool a false) (@eq bool b false) *)
simple induction a; simple induction b; auto with bool.
Qed.
Hint Resolve orb_false.
Lemma orb_false_l : forall a b : bool, a || b = false -> a = false.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (orb a b) false), @eq bool a false *)
intros; elim (orb_false a b); auto with bool.
Qed.
Lemma orb_false_r : forall a b : bool, a || b = false -> b = false.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (orb a b) false), @eq bool b false *)
intros; elim (orb_false a b); auto with bool.
Qed.
Lemma true_orb_intro :
forall b1 b2 : bool, b1 || b2 = true -> b1 = true \/ b2 = true.
Proof.
(* Goal: forall (b1 b2 : bool) (_ : @eq bool (orb b1 b2) true), or (@eq bool b1 true) (@eq bool b2 true) *)
simple induction b1; auto with bool.
Qed.
Lemma and_sym : forall a b : bool, a && b = b && a.
Proof.
(* Goal: forall a b : bool, @eq bool (andb a b) (andb b a) *)
simple induction a; simple induction b; auto with bool.
Qed.
Hint Immediate and_sym.
Lemma andb_false :
forall a b : bool,
a && b = false ->
a = false /\ b = false \/ a = false /\ b = true \/ a = true /\ b = false.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (andb a b) false), or (and (@eq bool a false) (@eq bool b false)) (or (and (@eq bool a false) (@eq bool b true)) (and (@eq bool a true) (@eq bool b false))) *)
simple induction a; simple induction b; auto with bool.
Qed.
Lemma andb_true : forall a b : bool, a && b = true -> a = true /\ b = true.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (andb a b) true), and (@eq bool a true) (@eq bool b true) *)
simple induction a; simple induction b; auto with bool.
Qed.
Lemma andb_true_l : forall a b : bool, a && b = true -> a = true.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (andb a b) true), @eq bool a true *)
intros; elim (andb_true a b); auto with bool.
Qed.
Lemma andb_true_r : forall a b : bool, a && b = true -> b = true.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (andb a b) true), @eq bool b true *)
intros; elim (andb_true a b); auto with bool.
Qed.
Lemma andb_negb_true_r : forall a b : bool, a && negb b = true -> b = false.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (andb a (negb b)) true), @eq bool b false *)
simple induction b; auto with bool.
(* Goal: forall _ : @eq bool (andb a (negb true)) true, @eq bool true false *)
elim and_sym; auto with bool.
Qed.
Lemma andb_negb_true_l : forall a b : bool, negb a && b = true -> a = false.
Proof.
(* Goal: forall (a b : bool) (_ : @eq bool (andb (negb a) b) true), @eq bool a false *)
intros a b.
(* Goal: forall _ : @eq bool (andb (negb a) b) true, @eq bool a false *)
elim and_sym; intros H.
(* Goal: @eq bool a false *)
apply andb_negb_true_r with b; auto with bool.
Qed.
Lemma no_true_false : forall b : bool, b = false -> b <> true.
Proof.
(* Goal: forall (b : bool) (_ : @eq bool b false), not (@eq bool b true) *)
simple induction b; auto with bool.
Qed.
Hint Resolve no_true_false.
Definition if_bool (C : Set) (b : bool) (x y : C) : C :=
match b return C with
| true => x
| false => y
end.
Notation If := (if_bool _) (only parsing).
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_23B.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_23C :
forall A B C D E P,
neq A B -> nCol D C E -> nCol A B P ->
exists X Y, Out A B Y /\ CongA X A Y D C E /\ OS X P A B.
Proof.
(* Goal: forall (A B C D E P : @Point Ax0) (_ : @neq Ax0 A B) (_ : @nCol Ax0 D C E) (_ : @nCol Ax0 A B P), @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
assert (~ eq P A).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
(* Goal: not (@eq Ax0 P A) *)
{
(* Goal: not (@eq Ax0 P A) *)
intro.
(* Goal: False *)
assert (eq A P) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
assert (Col A B P) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
let Tf:=fresh in assert (Tf:exists Q, (BetS P A Q /\ Cong A Q P A)) by (conclude lemma_extension);destruct Tf as [Q];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
assert (Col A B A) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
assert (~ Col A B Q).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
(* Goal: not (@Col Ax0 A B Q) *)
{
(* Goal: not (@Col Ax0 A B Q) *)
intro.
(* Goal: False *)
assert (Col P A Q) by (conclude_def Col ).
(* Goal: False *)
assert (Col Q A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col Q A P) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A Q) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq Q A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A B P) by (conclude lemma_collinear4).
(* Goal: False *)
contradict.
(* BG Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
}
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
let Tf:=fresh in assert (Tf:exists F G, (Out A B G /\ CongA F A G D C E /\ TS F A B Q)) by (conclude proposition_23B);destruct Tf as [F[G]];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
let Tf:=fresh in assert (Tf:exists J, (BetS F J Q /\ Col A B J /\ nCol A B F)) by (conclude_def TS );destruct Tf as [J];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
assert (OS F P A B) by (conclude_def OS ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@Out Ax0 A B Y) (and (@CongA Ax0 X A Y D C E) (@OS Ax0 X P A B)))) *)
close.
Qed.
End Euclid.
|
Require Import List.
Require Import syntax.
Require Import environments.
Require Import utils.
Goal
forall (v x : vari) (t s : ty) (HF H : ty_env),
v <> x -> mapsto v t (HF ++ H) -> mapsto v t (HF ++ (x, s) :: H).
simple induction HF; simpl in |- *.
intros H neq M.
apply F_If.
red in |- *; intro; apply neq; symmetry in |- *; assumption.
assumption.
simple induction a; simpl in |- *; intros a0 b y IH H0 neq If.
specialize (Xmidvar a0 v); simple induction 1. intro T.
specialize If_T with (1 := If) (2 := T); intro B.
apply T_If; assumption.
intro F.
specialize If_F with (1 := If) (2 := F); intro M.
apply F_If. assumption.
apply IH; assumption.
Save Mp_nfvExt.
Goal
forall (v x : vari) (t s : ty) (HF H : ty_env),
v <> x -> mapsto v t (HF ++ (x, s) :: H) -> mapsto v t (HF ++ H).
simple induction HF; simpl in |- *.
intros H neq If.
apply If_F with (x = v) (s = t).
assumption.
red in |- *; intro; apply neq; symmetry in |- *; assumption.
simple induction a; simpl in |- *; intros a0 b y IH H0 neq If.
specialize (Xmidvar a0 v); simple induction 1. intro T.
specialize If_T with (1 := If) (2 := T); intro B.
apply T_If; assumption.
intro F.
specialize If_F with (1 := If) (2 := F); intro M.
apply F_If. assumption.
apply IH; assumption.
Save Mp_inv_nfvExt.
Goal
forall (x v : vari) (r s t : ty) (H HM H' : ty_env),
mapsto x t (H ++ (v, s) :: HM ++ H') ->
mapsto x t (H ++ (v, s) :: HM ++ (v, r) :: H').
simple induction H; simpl in |- *.
simple induction HM; simpl in |- *. intros.
apply IfA_IfAIfA. assumption.
simple induction a; simpl in |- *; intros.
specialize (Xmidvar v x); simple induction 1.
intro T.
specialize If_T with (1 := H1) (2 := T); intro.
apply T_If; assumption.
intro F.
specialize If_F with (1 := H1) (2 := F); intro I.
apply F_If.
assumption.
specialize (Xmidvar a0 x); simple induction 1.
intro Q.
specialize If_T with (1 := I) (2 := Q); intro.
apply T_If; assumption.
intro nQ.
specialize If_F with (1 := I) (2 := nQ); intro.
apply F_If. assumption.
apply If_F with (v = x) (s = t).
apply H0.
specialize If_F with (1 := H1) (2 := F); intro I2.
specialize If_F with (1 := I2) (2 := nQ); intro.
apply F_If; assumption.
assumption.
simple induction a; simpl in |- *; intros.
specialize (Xmidvar a0 x); simple induction 1.
intro T.
specialize If_T with (1 := H1) (2 := T); intro.
apply T_If; assumption.
intro F.
specialize If_F with (1 := H1) (2 := F); intro.
apply F_If. assumption.
apply H0; assumption.
Save Mp_eqExt.
Goal
forall (v x y : vari) (r s t : ty) (HF HM H : ty_env),
v = x ->
mapsto y r (HF ++ (v, s) :: HM ++ (x, t) :: H) ->
mapsto y r (HF ++ (v, s) :: HM ++ H).
simple induction HF; simpl in |- *. intros HM H Q A.
specialize (Xmidvar v y); simple induction 1. intro T.
specialize If_T with (1 := A) (2 := T); intro sr.
apply T_If; assumption.
intro F.
specialize If_F with (1 := A) (2 := F); intro M.
apply F_If. assumption.
apply Mp_inv_nfvExt with x t.
elim Q; red in |- *; intro; apply F; symmetry in |- *; assumption.
assumption.
simple induction a; simpl in |- *; intros a0 b y0 IH HM H0 Q If.
specialize (Xmidvar a0 y); simple induction 1. intro T.
specialize If_T with (1 := If) (2 := T); intro br.
apply T_If; assumption.
intro F.
specialize If_F with (1 := If) (2 := F); intro M.
apply F_If. assumption.
apply IH; assumption.
Save Mp_inv_eqExt.
Goal
forall (v x y : vari) (r s t : ty) (H H' : ty_env),
x <> y ->
mapsto v r (H ++ (x, s) :: (y, t) :: H') ->
mapsto v r (H ++ (y, t) :: (x, s) :: H').
simple induction H.
simpl in |- *; intros H' neq If.
specialize (Xmidvar y v); simple induction 1.
intro T.
apply T_If. assumption.
apply If_T with (y = v) (mapsto v r H').
apply If_F with (x = v) (s = r).
assumption.
elim T; assumption.
assumption.
intro F.
apply F_If. assumption.
specialize (Xmidvar x v); simple induction 1.
intro TT.
specialize If_T with (1 := If) (2 := TT); intro sr.
apply T_If; assumption.
intro FF.
specialize If_F with (1 := If) (2 := FF); intro If2.
specialize If_F with (1 := If2) (2 := F); intro M.
apply F_If; assumption.
simple induction a.
simpl in |- *; intros a0 b y0 IH H' N A.
specialize (Xmidvar a0 v); simple induction 1.
intro T.
specialize If_T with (1 := A) (2 := T); intro br.
apply T_If; assumption.
intro F.
specialize If_F with (1 := A) (2 := F); intro M.
apply F_If; assumption || apply IH; assumption.
Save Mp_swap.
|
Require Import Coq.ZArith.BinInt.
Require Import Coq.micromega.Lia.
Require Import Coq.ZArith.ZArith.
Local Open Scope Z_scope.
Lemma mod2_cases: forall (n: Z), n mod 2 = 0 \/ n mod 2 = 1.
Proof.
(* Goal: forall n : Z, or (@eq Z (Z.modulo n (Zpos (xO xH))) Z0) (@eq Z (Z.modulo n (Zpos (xO xH))) (Zpos xH)) *)
intros.
(* Goal: or (@eq Z (Z.modulo n (Zpos (xO xH))) Z0) (@eq Z (Z.modulo n (Zpos (xO xH))) (Zpos xH)) *)
pose proof (Z.mod_pos_bound n 2).
(* Goal: or (@eq Z (Z.modulo n (Zpos (xO xH))) Z0) (@eq Z (Z.modulo n (Zpos (xO xH))) (Zpos xH)) *)
omega.
Qed.
Lemma div_mul_undo: forall a b,
b <> 0 ->
a mod b = 0 ->
a / b * b = a.
Proof.
(* Goal: forall (a b : Z) (_ : not (@eq Z b Z0)) (_ : @eq Z (Z.modulo a b) Z0), @eq Z (Z.mul (Z.div a b) b) a *)
intros.
(* Goal: @eq Z (Z.mul (Z.div a b) b) a *)
pose proof Z.div_mul_cancel_l as A.
(* Goal: @eq Z (Z.mul (Z.div a b) b) a *)
specialize (A a 1 b).
(* Goal: @eq Z (Z.mul (Z.div a b) b) a *)
replace (b * 1) with b in A by omega.
(* Goal: @eq Z (Z.mul (Z.div a b) b) a *)
rewrite Z.div_1_r in A.
(* Goal: @eq Z (Z.mul (Z.div a b) b) a *)
rewrite Z.mul_comm.
(* Goal: @eq Z (Z.mul b (Z.div a b)) a *)
rewrite <- Z.divide_div_mul_exact; try assumption.
(* Goal: Z.divide b a *)
(* Goal: @eq Z (Z.div (Z.mul b a) b) a *)
-
(* Goal: @eq Z (Z.div (Z.mul b a) b) a *)
apply A; congruence.
(* BG Goal: Z.divide b a *)
-
(* Goal: Z.divide b a *)
apply Z.mod_divide; assumption.
Qed.
Lemma mod_0_r: forall (m: Z),
m mod 0 = 0.
Proof.
(* Goal: forall m : Z, @eq Z (Z.modulo m Z0) Z0 *)
intros.
(* Goal: @eq Z (Z.modulo m Z0) Z0 *)
destruct m; reflexivity.
Qed.
Lemma sub_mod_0: forall (a b m: Z),
a mod m = 0 ->
b mod m = 0 ->
(a - b) mod m = 0.
Proof.
(* Goal: forall (a b m : Z) (_ : @eq Z (Z.modulo a m) Z0) (_ : @eq Z (Z.modulo b m) Z0), @eq Z (Z.modulo (Z.sub a b) m) Z0 *)
intros *.
(* Goal: forall (_ : @eq Z (Z.modulo a m) Z0) (_ : @eq Z (Z.modulo b m) Z0), @eq Z (Z.modulo (Z.sub a b) m) Z0 *)
intros E1 E2.
(* Goal: @eq Z (Z.modulo (Z.sub a b) m) Z0 *)
rewrite Zminus_mod.
(* Goal: @eq Z (Z.modulo (Z.sub (Z.modulo a m) (Z.modulo b m)) m) Z0 *)
rewrite E1.
(* Goal: @eq Z (Z.modulo (Z.sub Z0 (Z.modulo b m)) m) Z0 *)
rewrite E2.
(* Goal: @eq Z (Z.modulo (Z.sub Z0 Z0) m) Z0 *)
reflexivity.
Qed.
Lemma add_mod_0: forall a b m : Z,
a mod m = 0 ->
b mod m = 0 ->
(a + b) mod m = 0.
Proof.
(* Goal: forall (a b m : Z) (_ : @eq Z (Z.modulo a m) Z0) (_ : @eq Z (Z.modulo b m) Z0), @eq Z (Z.modulo (Z.add a b) m) Z0 *)
intros *.
(* Goal: forall (_ : @eq Z (Z.modulo a m) Z0) (_ : @eq Z (Z.modulo b m) Z0), @eq Z (Z.modulo (Z.add a b) m) Z0 *)
intros E1 E2.
(* Goal: @eq Z (Z.modulo (Z.add a b) m) Z0 *)
rewrite Zplus_mod.
(* Goal: @eq Z (Z.modulo (Z.add (Z.modulo a m) (Z.modulo b m)) m) Z0 *)
rewrite E1.
(* Goal: @eq Z (Z.modulo (Z.add Z0 (Z.modulo b m)) m) Z0 *)
rewrite E2.
(* Goal: @eq Z (Z.modulo (Z.add Z0 Z0) m) Z0 *)
reflexivity.
Qed.
Lemma Z_mod_mult': forall a b : Z,
(a * b) mod a = 0.
Proof.
(* Goal: forall a b : Z, @eq Z (Z.modulo (Z.mul a b) a) Z0 *)
intros.
(* Goal: @eq Z (Z.modulo (Z.mul a b) a) Z0 *)
rewrite Z.mul_comm.
(* Goal: @eq Z (Z.modulo (Z.mul b a) a) Z0 *)
apply Z_mod_mult.
Qed.
Lemma mod_add_r: forall a b,
b <> 0 ->
(a + b) mod b = a mod b.
Proof.
(* Goal: forall (a b : Z) (_ : not (@eq Z b Z0)), @eq Z (Z.modulo (Z.add a b) b) (Z.modulo a b) *)
intros.
(* Goal: @eq Z (Z.modulo (Z.add a b) b) (Z.modulo a b) *)
rewrite <- Z.add_mod_idemp_r by omega.
(* Goal: @eq Z (Z.modulo (Z.add a (Z.modulo b b)) b) (Z.modulo a b) *)
rewrite Z.mod_same by omega.
(* Goal: @eq Z (Z.modulo (Z.add a Z0) b) (Z.modulo a b) *)
rewrite Z.add_0_r.
(* Goal: @eq Z (Z.modulo a b) (Z.modulo a b) *)
reflexivity.
Qed.
Lemma mod_pow2_same_cases: forall a n,
a mod 2 ^ n = a ->
2 ^ n = 0 /\ a = 0 \/ 0 <= a < 2 ^ n.
Proof.
(* Goal: forall (a n : Z) (_ : @eq Z (Z.modulo a (Z.pow (Zpos (xO xH)) n)) a), or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
intros.
(* Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
assert (n < 0 \/ 0 <= n) as C by omega.
(* Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
destruct C as [C | C].
(* Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
(* Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
-
(* Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
left.
(* Goal: and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0) *)
rewrite (Z.pow_neg_r 2 n C) in *.
(* Goal: and (@eq Z Z0 Z0) (@eq Z a Z0) *)
rewrite mod_0_r in H.
(* Goal: and (@eq Z Z0 Z0) (@eq Z a Z0) *)
auto.
(* BG Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
-
(* Goal: or (and (@eq Z (Z.pow (Zpos (xO xH)) n) Z0) (@eq Z a Z0)) (and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n))) *)
right.
(* Goal: and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n)) *)
rewrite <- H.
(* Goal: and (Z.le Z0 (Z.modulo a (Z.pow (Zpos (xO xH)) n))) (Z.lt (Z.modulo a (Z.pow (Zpos (xO xH)) n)) (Z.pow (Zpos (xO xH)) n)) *)
apply Z.mod_pos_bound.
(* Goal: Z.lt Z0 (Z.pow (Zpos (xO xH)) n) *)
apply Z.pow_pos_nonneg; omega.
Qed.
Lemma mod_pow2_same_bounds: forall a n,
a mod 2 ^ n = a ->
0 <= n ->
0 <= a < 2 ^ n.
Proof.
(* Goal: forall (a n : Z) (_ : @eq Z (Z.modulo a (Z.pow (Zpos (xO xH)) n)) a) (_ : Z.le Z0 n), and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n)) *)
intros.
(* Goal: and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) n)) *)
rewrite <- H.
(* Goal: and (Z.le Z0 (Z.modulo a (Z.pow (Zpos (xO xH)) n))) (Z.lt (Z.modulo a (Z.pow (Zpos (xO xH)) n)) (Z.pow (Zpos (xO xH)) n)) *)
apply Z.mod_pos_bound.
(* Goal: Z.lt Z0 (Z.pow (Zpos (xO xH)) n) *)
apply Z.pow_pos_nonneg; omega.
Qed.
Lemma pow2_nonneg: forall n,
0 <= 2 ^ n.
Proof.
(* Goal: forall n : Z, Z.le Z0 (Z.pow (Zpos (xO xH)) n) *)
intros.
(* Goal: Z.le Z0 (Z.pow (Zpos (xO xH)) n) *)
apply Z.pow_nonneg.
(* Goal: Z.le Z0 (Zpos (xO xH)) *)
omega.
Qed.
Lemma pow2_pos: forall n,
0 <= n ->
0 < 2 ^ n.
Proof.
(* Goal: forall (n : Z) (_ : Z.le Z0 n), Z.lt Z0 (Z.pow (Zpos (xO xH)) n) *)
intros.
(* Goal: Z.lt Z0 (Z.pow (Zpos (xO xH)) n) *)
apply Z.pow_pos_nonneg; omega.
Qed.
Lemma pow2_times2: forall i,
0 < i ->
2 ^ i = 2 * 2 ^ (i - 1).
Proof.
(* Goal: forall (i : Z) (_ : Z.lt Z0 i), @eq Z (Z.pow (Zpos (xO xH)) i) (Z.mul (Zpos (xO xH)) (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH)))) *)
intros.
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) i) (Z.mul (Zpos (xO xH)) (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH)))) *)
rewrite <- Z.pow_succ_r by omega.
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) i) (Z.pow (Zpos (xO xH)) (Z.succ (Z.sub i (Zpos xH)))) *)
f_equal.
(* Goal: @eq Z i (Z.succ (Z.sub i (Zpos xH))) *)
omega.
Qed.
Lemma pow2_div2: forall i,
0 <= i ->
2 ^ (i - 1) = 2 ^ i / 2.
Proof.
(* Goal: forall (i : Z) (_ : Z.le Z0 i), @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
intros.
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
assert (i = 0 \/ 0 < i) as C by omega.
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
destruct C as [C | C].
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
-
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
subst.
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub Z0 (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) Z0) (Zpos (xO xH))) *)
reflexivity.
(* BG Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
-
(* Goal: @eq Z (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
rewrite Z.pow_sub_r by omega.
(* Goal: @eq Z (Z.div (Z.pow (Zpos (xO xH)) i) (Z.pow (Zpos (xO xH)) (Zpos xH))) (Z.div (Z.pow (Zpos (xO xH)) i) (Zpos (xO xH))) *)
reflexivity.
Qed.
Lemma div_mul_undo_le: forall a b,
0 <= a ->
0 < b ->
a / b * b <= a.
Proof.
(* Goal: forall (a b : Z) (_ : Z.le Z0 a) (_ : Z.lt Z0 b), Z.le (Z.mul (Z.div a b) b) a *)
intros.
(* Goal: Z.le (Z.mul (Z.div a b) b) a *)
pose proof (Zmod_eq_full a b) as P.
(* Goal: Z.le (Z.mul (Z.div a b) b) a *)
pose proof (Z.mod_bound_pos a b) as Q.
(* Goal: Z.le (Z.mul (Z.div a b) b) a *)
omega.
Qed.
Lemma testbit_true_nonneg: forall a i,
0 <= a ->
0 <= i ->
Z.testbit a i = true ->
Proof.
(* Goal: forall (a i : Z) (_ : Z.le Z0 a) (_ : Z.le Z0 i) (_ : @eq bool (Z.testbit a i) true), Z.le (Z.pow (Zpos (xO xH)) i) a *)
intros.
(* Goal: Z.le (Z.pow (Zpos (xO xH)) i) a *)
apply Z.testbit_true in H1; [|assumption].
(* Goal: Z.le (Z.pow (Zpos (xO xH)) i) a *)
pose proof (pow2_pos i H0).
(* Goal: Z.le (Z.pow (Zpos (xO xH)) i) a *)
eapply Z.le_trans; [| apply (div_mul_undo_le a (2 ^ i)); omega].
(* Goal: Z.le (Z.pow (Zpos (xO xH)) i) (Z.mul (Z.div a (Z.pow (Zpos (xO xH)) i)) (Z.pow (Zpos (xO xH)) i)) *)
replace (2 ^ i) with (1 * 2 ^ i) at 1 by omega.
(* Goal: Z.le (Z.mul (Zpos xH) (Z.pow (Zpos (xO xH)) i)) (Z.mul (Z.div a (Z.pow (Zpos (xO xH)) i)) (Z.pow (Zpos (xO xH)) i)) *)
apply Z.mul_le_mono_nonneg_r; [omega|].
(* Goal: Z.le (Zpos xH) (Z.div a (Z.pow (Zpos (xO xH)) i)) *)
pose proof (Z.div_pos a (2 ^ i)).
(* Goal: Z.le (Zpos xH) (Z.div a (Z.pow (Zpos (xO xH)) i)) *)
assert (a / 2 ^ i <> 0); [|omega].
(* Goal: not (@eq Z (Z.div a (Z.pow (Zpos (xO xH)) i)) Z0) *)
intro E.
(* Goal: False *)
rewrite E in H1.
(* Goal: False *)
cbv in H1.
(* Goal: False *)
discriminate H1.
Qed.
Lemma range_div_pos: forall a b c d,
0 < d ->
a <= b <= c ->
a / d <= b / d <= c / d.
Proof.
(* Goal: forall (a b c d : Z) (_ : Z.lt Z0 d) (_ : and (Z.le a b) (Z.le b c)), and (Z.le (Z.div a d) (Z.div b d)) (Z.le (Z.div b d) (Z.div c d)) *)
intuition idtac.
(* Goal: Z.le (Z.div b d) (Z.div c d) *)
(* Goal: Z.le (Z.div a d) (Z.div b d) *)
-
(* Goal: Z.le (Z.div a d) (Z.div b d) *)
apply (Z.div_le_mono _ _ _ H H1).
(* BG Goal: Z.le (Z.div b d) (Z.div c d) *)
-
(* Goal: Z.le (Z.div b d) (Z.div c d) *)
apply (Z.div_le_mono _ _ _ H H2).
Qed.
Lemma testbit_true_nonneg': forall a i,
0 <= i ->
2 ^ i <= a < 2 ^ (i + 1) ->
Z.testbit a i = true.
Proof.
(* Goal: forall (a i : Z) (_ : Z.le Z0 i) (_ : and (Z.le (Z.pow (Zpos (xO xH)) i) a) (Z.lt a (Z.pow (Zpos (xO xH)) (Z.add i (Zpos xH))))), @eq bool (Z.testbit a i) true *)
intros.
(* Goal: @eq bool (Z.testbit a i) true *)
apply Z.testbit_true; [assumption|].
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
destruct H0 as [A B].
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
pose proof (pow2_pos i H) as Q.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
apply (Z.div_le_mono _ _ _ Q) in A.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
rewrite Z_div_same in A by omega.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
pose proof (Z.div_lt_upper_bound a (2 ^ i) 2 Q) as P.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
rewrite Z.mul_comm in P.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
replace i with (i + 1 - 1) in P by omega.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
rewrite <- pow2_times2 in P by omega.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
specialize (P B).
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
replace (i + 1 - 1) with i in P by omega.
(* Goal: @eq Z (Z.modulo (Z.div a (Z.pow (Zpos (xO xH)) i)) (Zpos (xO xH))) (Zpos xH) *)
replace (a / 2 ^ i) with 1 by omega.
(* Goal: @eq Z (Z.modulo (Zpos xH) (Zpos (xO xH))) (Zpos xH) *)
reflexivity.
Qed.
Lemma testbit_false_nonneg: forall a i,
0 <= a < 2 ^ i ->
0 < i ->
Z.testbit a (i - 1) = false ->
Proof.
(* Goal: forall (a i : Z) (_ : and (Z.le Z0 a) (Z.lt a (Z.pow (Zpos (xO xH)) i))) (_ : Z.lt Z0 i) (_ : @eq bool (Z.testbit a (Z.sub i (Zpos xH))) false), Z.lt a (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) *)
intros.
(* Goal: Z.lt a (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) *)
assert (2 ^ (i - 1) <= a < 2 ^ i \/ a < 2 ^ (i - 1)) as C by omega.
(* Goal: Z.lt a (Z.pow (Zpos (xO xH)) (Z.sub i (Zpos xH))) *)
destruct C as [C | C]; [exfalso|assumption].
(* Goal: False *)
assert (Z.testbit a (i - 1) = true); [|congruence].
(* Goal: @eq bool (Z.testbit a (Z.sub i (Zpos xH))) true *)
replace i with (i - 1 + 1) in C at 2 by omega.
(* Goal: @eq bool (Z.testbit a (Z.sub i (Zpos xH))) true *)
apply testbit_true_nonneg'; omega.
Qed.
Lemma signed_bounds_to_sz_pos: forall sz n,
- 2 ^ (sz - 1) <= n < 2 ^ (sz - 1) ->
0 < sz.
Proof.
(* Goal: forall (sz n : Z) (_ : and (Z.le (Z.opp (Z.pow (Zpos (xO xH)) (Z.sub sz (Zpos xH)))) n) (Z.lt n (Z.pow (Zpos (xO xH)) (Z.sub sz (Zpos xH))))), Z.lt Z0 sz *)
intros.
(* Goal: Z.lt Z0 sz *)
assert (0 < sz \/ sz - 1 < 0) as C by omega.
(* Goal: Z.lt Z0 sz *)
destruct C as [C | C]; [assumption|exfalso].
(* Goal: False *)
rewrite Z.pow_neg_r in H by assumption.
(* Goal: False *)
omega.
Qed.
Lemma two_digits_encoding_inj_lo: forall base a b c d: Z,
0 <= b < base ->
0 <= d < base ->
base * a + b = base * c + d ->
b = d.
Proof.
(* Goal: forall (base a b c d : Z) (_ : and (Z.le Z0 b) (Z.lt b base)) (_ : and (Z.le Z0 d) (Z.lt d base)) (_ : @eq Z (Z.add (Z.mul base a) b) (Z.add (Z.mul base c) d)), @eq Z b d *)
intros.
(* Goal: @eq Z b d *)
pose proof Z.mod_unique as P.
(* Goal: @eq Z b d *)
specialize P with (b := base) (q := c) (r := d).
(* Goal: @eq Z b d *)
specialize P with (2 := H1).
(* Goal: @eq Z b d *)
rewrite P by omega.
(* Goal: @eq Z b (Z.modulo (Z.add (Z.mul base a) b) base) *)
rewrite <- Z.add_mod_idemp_l by omega.
(* Goal: @eq Z b (Z.modulo (Z.add (Z.modulo (Z.mul base a) base) b) base) *)
rewrite Z.mul_comm.
(* Goal: @eq Z b (Z.modulo (Z.add (Z.modulo (Z.mul a base) base) b) base) *)
rewrite Z.mod_mul by omega.
(* Goal: @eq Z b (Z.modulo (Z.add Z0 b) base) *)
rewrite Z.add_0_l.
(* Goal: @eq Z b (Z.modulo b base) *)
rewrite Z.mod_small by omega.
(* Goal: @eq Z b b *)
reflexivity.
Qed.
Lemma two_digits_encoding_inj_hi: forall base a b c d: Z,
0 <= b < base ->
0 <= d < base ->
base * a + b = base * c + d ->
a = c.
Proof.
(* Goal: forall (base a b c d : Z) (_ : and (Z.le Z0 b) (Z.lt b base)) (_ : and (Z.le Z0 d) (Z.lt d base)) (_ : @eq Z (Z.add (Z.mul base a) b) (Z.add (Z.mul base c) d)), @eq Z a c *)
intros.
(* Goal: @eq Z a c *)
nia.
Qed.
Lemma Z_to_nat_neg: forall (n: Z),
n < 0 ->
Z.to_nat n = 0%nat.
Proof.
(* Goal: forall (n : Z) (_ : Z.lt n Z0), @eq nat (Z.to_nat n) O *)
intros.
(* Goal: @eq nat (Z.to_nat n) O *)
destruct n; try lia.
(* Goal: @eq nat (Z.to_nat (Zneg p)) O *)
apply Z2Nat.inj_neg.
Qed.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelNC.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_29B.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct.
Require Export GeoCoq.Elements.OriginalProofs.lemma_samesidetransitive.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma lemma_Playfairhelper :
forall A B C D E,
Par A B C D -> Par A B C E -> CR A D B C -> CR A E B C ->
Col C D E.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @Par Ax0 A B C D) (_ : @Par Ax0 A B C E) (_ : @CR Ax0 A D B C) (_ : @CR Ax0 A E B C), @Col Ax0 C D E *)
intros.
(* Goal: @Col Ax0 C D E *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M D /\ BetS B M C)) by (conclude_def CR );destruct Tf as [M];spliter.
(* Goal: @Col Ax0 C D E *)
let Tf:=fresh in assert (Tf:exists m, (BetS A m E /\ BetS B m C)) by (conclude_def CR );destruct Tf as [m];spliter.
(* Goal: @Col Ax0 C D E *)
assert (neq B C) by (forward_using lemma_betweennotequal).
(* Goal: @Col Ax0 C D E *)
assert (BetS E m A) by (conclude axiom_betweennesssymmetry).
(* Goal: @Col Ax0 C D E *)
assert (BetS D M A) by (conclude axiom_betweennesssymmetry).
(* Goal: @Col Ax0 C D E *)
assert (Col B M C) by (conclude_def Col ).
(* Goal: @Col Ax0 C D E *)
assert (Col B m C) by (conclude_def Col ).
(* Goal: @Col Ax0 C D E *)
assert (Col C B M) by (forward_using lemma_collinearorder).
(* Goal: @Col Ax0 C D E *)
assert (Col C B m) by (forward_using lemma_collinearorder).
(* Goal: @Col Ax0 C D E *)
assert (nCol B C E) by (forward_using lemma_parallelNC).
(* Goal: @Col Ax0 C D E *)
assert (nCol C B E) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (nCol B C D) by (forward_using lemma_parallelNC).
(* Goal: @Col Ax0 C D E *)
assert (nCol C B D) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (TS E C B A) by (conclude_def TS ).
(* Goal: @Col Ax0 C D E *)
assert (TS D C B A) by (conclude_def TS ).
(* Goal: @Col Ax0 C D E *)
assert (Par C D A B) by (conclude lemma_parallelsymmetric).
(* Goal: @Col Ax0 C D E *)
assert (Par C E A B) by (conclude lemma_parallelsymmetric).
(* Goal: @Col Ax0 C D E *)
assert (Par E C B A) by (forward_using lemma_parallelflip).
(* Goal: @Col Ax0 C D E *)
assert (Par D C B A) by (forward_using lemma_parallelflip).
(* Goal: @Col Ax0 C D E *)
assert (CongA E C B C B A) by (conclude proposition_29B).
(* Goal: @Col Ax0 C D E *)
assert (CongA D C B C B A) by (conclude proposition_29B).
(* Goal: @Col Ax0 C D E *)
assert (CongA C B A D C B) by (conclude lemma_equalanglessymmetric).
(* Goal: @Col Ax0 C D E *)
assert (CongA E C B D C B) by (conclude lemma_equalanglestransitive).
(* Goal: @Col Ax0 C D E *)
assert (neq C E) by (forward_using lemma_NCdistinct).
(* Goal: @Col Ax0 C D E *)
assert (neq C D) by (forward_using lemma_NCdistinct).
(* Goal: @Col Ax0 C D E *)
let Tf:=fresh in assert (Tf:exists e, (Out C E e /\ Cong C e C D)) by (conclude lemma_layoff);destruct Tf as [e];spliter.
(* Goal: @Col Ax0 C D E *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @Col Ax0 C D E *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: @Col Ax0 C D E *)
assert (Out C B B) by (conclude lemma_ray4).
(* Goal: @Col Ax0 C D E *)
assert (Cong C B C B) by (conclude cn_congruencereflexive).
(* Goal: @Col Ax0 C D E *)
assert (nCol E C B) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (CongA E C B E C B) by (conclude lemma_equalanglesreflexive).
(* Goal: @Col Ax0 C D E *)
assert (CongA E C B e C B) by (conclude lemma_equalangleshelper).
(* Goal: @Col Ax0 C D E *)
assert (CongA e C B E C B) by (conclude lemma_equalanglessymmetric).
(* Goal: @Col Ax0 C D E *)
assert (CongA e C B D C B) by (conclude lemma_equalanglestransitive).
(* Goal: @Col Ax0 C D E *)
assert (Col C E e) by (conclude lemma_rayimpliescollinear).
(* Goal: @Col Ax0 C D E *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @Col Ax0 C D E *)
assert (Col C E C) by (conclude_def Col ).
(* Goal: @Col Ax0 C D E *)
assert (nCol C E B) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (neq C e) by (conclude lemma_raystrict).
(* Goal: @Col Ax0 C D E *)
assert (nCol C e B) by (conclude lemma_NChelper).
(* Goal: @Col Ax0 C D E *)
assert (nCol e C B) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (Triangle e C B) by (conclude_def Triangle ).
(* Goal: @Col Ax0 C D E *)
assert (nCol D C B) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (Triangle D C B) by (conclude_def Triangle ).
(* Goal: @Col Ax0 C D E *)
assert (Cong e B D B) by (conclude proposition_04).
(* Goal: @Col Ax0 C D E *)
assert (nCol B C E) by (forward_using lemma_parallelNC).
(* Goal: @Col Ax0 C D E *)
assert (nCol C B E) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (nCol B C D) by (forward_using lemma_parallelNC).
(* Goal: @Col Ax0 C D E *)
assert (nCol C B D) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (OS E D C B) by (conclude_def OS ).
(* Goal: @Col Ax0 C D E *)
assert (nCol C B e) by (forward_using lemma_NCorder).
(* Goal: @Col Ax0 C D E *)
assert (Col C C B) by (conclude_def Col ).
(* Goal: @Col Ax0 C D E *)
assert (Out C e E) by (conclude lemma_ray5).
(* Goal: @Col Ax0 C D E *)
assert (OS e e C B) by (conclude lemma_samesidereflexive).
(* Goal: @Col Ax0 C D E *)
assert (OS e E C B) by (conclude lemma_sameside2).
(* Goal: @Col Ax0 C D E *)
assert (OS e D C B) by (conclude lemma_samesidetransitive).
(* Goal: @Col Ax0 C D E *)
assert (Cong e C D C) by (forward_using lemma_congruenceflip).
(* Goal: @Col Ax0 C D E *)
assert (eq e D) by (conclude proposition_07).
(* Goal: @Col Ax0 C D E *)
assert (Col C E D) by (conclude cn_equalitysub).
(* Goal: @Col Ax0 C D E *)
assert (Col C D E) by (forward_using lemma_collinearorder).
(* Goal: @Col Ax0 C D E *)
close.
Qed.
End Euclid.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq div fintype bigop.
From mathcomp
Require Import finset fingroup morphism perm automorphism quotient action.
From mathcomp
Require Import gproduct gfunctor cyclic.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Section Defs.
Variable gT : finGroupType.
Definition center (A : {set gT}) := 'C_A(A).
Canonical center_group (G : {group gT}) : {group gT} :=
Eval hnf in [group of center G].
End Defs.
Arguments center {gT} A%g.
Notation "''Z' ( A )" := (center A) : group_scope.
Notation "''Z' ( H )" := (center_group H) : Group_scope.
Lemma morphim_center : GFunctor.pcontinuous (@center).
Proof.
(* Goal: GFunctor.pcontinuous (@center) *)
by move=> gT rT G D f; apply: morphim_subcent.
Qed.
Canonical center_igFun := [igFun by fun _ _ => subsetIl _ _ & morphim_center].
Canonical center_gFun := [gFun by morphim_center].
Canonical center_pgFun := [pgFun by morphim_center].
Section Center.
Variables gT : finGroupType.
Implicit Type rT : finGroupType.
Implicit Types (x y : gT) (A B : {set gT}) (G H K D : {group gT}).
Lemma subcentP A B x : reflect (x \in A /\ centralises x B) (x \in 'C_A(B)).
Proof.
(* Goal: Bool.reflect (and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)))) (@centralises gT x B)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@centraliser gT B))))) *)
rewrite inE.
(* Goal: Bool.reflect (and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)))) (@centralises gT x B)) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT B))))) *)
case: (x \in A); last by right; case.
(* Goal: Bool.reflect (and (is_true true) (@centralises gT x B)) (andb true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT B))))) *)
by apply: (iffP centP) => [|[]].
Qed.
Lemma subcent_sub A B : 'C_A(B) \subset 'N_A(B).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@centraliser gT B)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT B))))) *)
by rewrite setIS ?cent_sub.
Qed.
Lemma subcent_norm G B : 'N_G(B) \subset 'N('C_G(B)).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT B)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT B)))))) *)
by rewrite normsI ?subIset ?normG // orbC cent_norm.
Qed.
Lemma subcent_normal G B : 'C_G(B) <| 'N_G(B).
Proof.
(* Goal: is_true (@normal gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT B)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT B))) *)
by rewrite /normal subcent_sub subcent_norm.
Qed.
Lemma subcent_char G H K : H \char G -> K \char G -> 'C_H(K) \char G.
Lemma centerP A x : reflect (x \in A /\ centralises x A) (x \in 'Z(A)).
Proof.
(* Goal: Bool.reflect (and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)))) (@centralises gT x A)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT A)))) *)
exact: subcentP.
Qed.
Lemma center_sub A : 'Z(A) \subset A.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))) *)
exact: subsetIl.
Qed.
Lemma center1 : 'Z(1) = 1 :> {set gT}.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@center gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
exact: gF1.
Qed.
Lemma centerC A : {in A, centralised 'Z(A)}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @centralises gT x (@center gT A)) (inPhantom (@centralised gT (@center gT A))) *)
by apply/centsP; rewrite centsC subsetIr.
Qed.
Lemma center_normal G : 'Z(G) <| G.
Proof.
(* Goal: is_true (@normal gT (@center gT (@gval gT G)) (@gval gT G)) *)
exact: gFnormal.
Qed.
Lemma sub_center_normal H G : H \subset 'Z(G) -> H <| G.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))), is_true (@normal gT (@gval gT H) (@gval gT G)) *)
by rewrite subsetI centsC /normal => /andP[-> /cents_norm].
Qed.
Lemma center_abelian G : abelian 'Z(G).
Proof.
(* Goal: is_true (@abelian gT (@center gT (@gval gT G))) *)
by rewrite /abelian subIset // centsC subIset // subxx orbT.
Qed.
Lemma center_char G : 'Z(G) \char G.
Proof.
(* Goal: is_true (@characteristic gT (@center gT (@gval gT G)) (@gval gT G)) *)
exact: gFchar.
Qed.
Lemma center_idP A : reflect ('Z(A) = A) (abelian A).
Proof.
(* Goal: Bool.reflect (@eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@center gT A) A) (@abelian gT A) *)
exact: setIidPl.
Qed.
Lemma center_class_formula G :
#|G| = #|'Z(G)| + \sum_(xG in [set x ^: G | x in G :\: 'C(G)]) #|xG|.
Proof.
(* Goal: @eq nat (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (addn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun xG : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) xG addn (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) xG (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (set_of_finType (FinGroup.finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @class gT x (@gval gT G)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@centraliser gT (@gval gT G))))))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) xG)))))) *)
by rewrite acts_sum_card_orbit ?cardsID // astabsJ normsD ?norms_cent ?normG.
Qed.
Lemma subcent1P A x y : reflect (y \in A /\ commute x y) (y \in 'C_A[x]).
Proof.
(* Goal: Bool.reflect (and (is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)))) (@commute (FinGroup.base gT) x y)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) *)
rewrite inE; case: (y \in A); last by right; case.
(* Goal: Bool.reflect (and (is_true true) (@commute (FinGroup.base gT) x y)) (andb true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) *)
by apply: (iffP cent1P) => [|[]].
Qed.
Lemma subcent1_id x G : x \in G -> x \in 'C_G[x].
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) *)
by move=> Gx; rewrite inE Gx; apply/cent1P.
Qed.
Lemma subcent1_sub x G : 'C_G[x] \subset G.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
exact: subsetIl.
Qed.
Lemma subcent1C x y G : x \in G -> y \in 'C_G[x] -> x \in 'C_G[y].
Proof.
(* Goal: forall (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) y)))))) *)
by move=> Gx /subcent1P[_ cxy]; apply/subcent1P.
Qed.
Lemma subcent1_cycle_sub x G : x \in G -> <[x]> \subset 'C_G[x].
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cycle gT x))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))) *)
by move=> Gx; rewrite cycle_subG ?subcent1_id.
Qed.
Lemma subcent1_cycle_norm x G : 'C_G[x] \subset 'N(<[x]>).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@cycle gT x))))) *)
by rewrite cents_norm // cent_gen cent_set1 subsetIr.
Qed.
Lemma subcent1_cycle_normal x G : x \in G -> <[x]> <| 'C_G[x].
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (@normal gT (@cycle gT x) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) *)
by move=> Gx; rewrite /normal subcent1_cycle_norm subcent1_cycle_sub.
Qed.
Lemma cyclic_center_factor_abelian G : cyclic (G / 'Z(G)) -> abelian G.
Proof.
(* Goal: forall _ : is_true (@cyclic (@coset_groupType gT (@center gT (@gval gT G))) (@quotient gT (@gval gT G) (@center gT (@gval gT G)))), is_true (@abelian gT (@gval gT G)) *)
case/cyclicP=> a Ga; case: (cosetP a) => /= z Nz def_a.
(* Goal: is_true (@abelian gT (@gval gT G)) *)
have G_Zz: G :=: 'Z(G) * <[z]>.
(* Goal: is_true (@abelian gT (@gval gT G)) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gval gT G) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@center gT (@gval gT G)) (@cycle gT z)) *)
rewrite -quotientK ?cycle_subG ?quotient_cycle //=.
(* Goal: is_true (@abelian gT (@gval gT G)) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@gval gT G) (@morphpre gT (@coset_groupType gT (@center gT (@gval gT G))) (@normaliser gT (@center gT (@gval gT G))) (@coset_morphism gT (@center gT (@gval gT G))) (@MorPhantom gT (@coset_groupType gT (@center gT (@gval gT G))) (@coset gT (@center gT (@gval gT G)))) (@cycle (@coset_groupType gT (@center gT (@gval gT G))) (@coset gT (@center gT (@gval gT G)) z))) *)
by rewrite -def_a -Ga quotientGK // center_normal.
(* Goal: is_true (@abelian gT (@gval gT G)) *)
rewrite G_Zz abelianM cycle_abelian center_abelian centsC /= G_Zz.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@center gT (@gval gT G)) (@cycle gT z))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@cycle gT z))))) *)
by rewrite subIset ?centS ?orbT ?mulG_subr.
Qed.
Lemma cyclic_factor_abelian H G :
H \subset 'Z(G) -> cyclic (G / H) -> abelian G.
Section Injm.
Variables (rT : finGroupType) (D : {group gT}) (f : {morphism D >-> rT}).
Hypothesis injf : 'injm f.
Lemma injm_center G : G \subset D -> f @* 'Z(G) = 'Z(f @* G).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT D)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@center gT (@gval gT G))) (@center rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) *)
exact: injm_subcent.
Qed.
End Injm.
End Center.
Arguments center_idP {gT A}.
Lemma isog_center (aT rT : finGroupType) (G : {group aT}) (H : {group rT}) :
G \isog H -> 'Z(G) \isog 'Z(H).
Proof.
(* Goal: forall _ : is_true (@isog aT rT (@gval aT G) (@gval rT H)), is_true (@isog aT rT (@center aT (@gval aT G)) (@center rT (@gval rT H))) *)
exact: gFisog.
Qed.
Section Product.
Variable gT : finGroupType.
Implicit Types (A B C : {set gT}) (G H K : {group gT}).
Lemma center_prod H K : K \subset 'C(H) -> 'Z(H) * 'Z(K) = 'Z(H * K).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H))))), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@center gT (@gval gT H)) (@center gT (@gval gT K))) (@center gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K))) *)
move=> cHK; apply/setP=> z; rewrite {3}/center centM !inE.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@center gT (@gval gT H)) (@center gT (@gval gT K)))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K))))))) *)
have cKH: H \subset 'C(K) by rewrite centsC.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@center gT (@gval gT H)) (@center gT (@gval gT K)))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K))))))) *)
apply/imset2P/and3P=> [[x y /setIP[Hx cHx] /setIP[Ky cKy] ->{z}]| []].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K)))))), @imset2_spec (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)))) (fun _ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)))) z *)
(* Goal: and3 (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H)))))) (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K)))))) *)
by rewrite mem_imset2 ?groupM // ?(subsetP cHK) ?(subsetP cKH).
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) z (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K)))))), @imset2_spec (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)))) (fun _ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)))) z *)
case/imset2P=> x y Hx Ky ->{z}.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K)))))), @imset2_spec (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)))) (fun _ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)))) (@mulg (FinGroup.base gT) x y) *)
rewrite groupMr => [cHx|]; last exact: subsetP Ky.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT K))))), @imset2_spec (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)))) (fun _ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)))) (@mulg (FinGroup.base gT) x y) *)
rewrite groupMl => [cKy|]; last exact: subsetP Hx.
(* Goal: @imset2_spec (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)))) (fun _ : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)))) (@mulg (FinGroup.base gT) x y) *)
by exists x y; rewrite ?inE ?Hx ?Ky.
Qed.
Lemma center_cprod A B G : A \* B = G -> 'Z(A) \* 'Z(B) = 'Z(G).
Proof.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (central_product gT A B) (@gval gT G), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (central_product gT (@center gT A) (@center gT B)) (@center gT (@gval gT G)) *)
case/cprodP => [[H K -> ->] <- cHK].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (central_product gT (@center gT (@gval gT H)) (@center gT (@gval gT K))) (@center gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT H) (@gval gT K))) *)
rewrite cprodE ?center_prod //= subIset ?(subset_trans cHK) //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@centraliser gT (@center gT (@gval gT H)))))) *)
by rewrite centS ?center_sub.
Qed.
Lemma center_bigcprod I r P (F : I -> {set gT}) G :
\big[cprod/1]_(i <- r | P i) F i = G ->
\big[cprod/1]_(i <- r | P i) 'Z(F i) = 'Z(G).
Proof.
(* Goal: forall _ : @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@BigOp.bigop (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) I (oneg (group_set_of_baseGroupType (FinGroup.base gT))) r (fun i : I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) I i (central_product gT) (P i) (F i))) (@gval gT G), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@BigOp.bigop (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) I (oneg (group_set_of_baseGroupType (FinGroup.base gT))) r (fun i : I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) I i (central_product gT) (P i) (@center gT (F i)))) (@center gT (@gval gT G)) *)
elim/big_ind2: _ G => [_ <-|A B C D IHA IHB G dG|_ _ G ->]; rewrite ?center1 //.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (central_product gT A C) (@center gT (@gval gT G)) *)
case/cprodP: dG IHA IHB (dG) => [[H K -> ->] _ _] IHH IHK dG.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (central_product gT A C) (@center gT (@gval gT G)) *)
by rewrite (IHH H) // (IHK K) // (center_cprod dG).
Qed.
Lemma cprod_center_id G : G \* 'Z(G) = G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (central_product gT (@gval gT G) (@center gT (@gval gT G))) (@gval gT G) *)
by rewrite cprodE ?subsetIr // mulGSid ?center_sub.
Qed.
Lemma center_dprod A B G : A \x B = G -> 'Z(A) \x 'Z(B) = 'Z(G).
Proof.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT A B) (@gval gT G), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@center gT A) (@center gT B)) (@center gT (@gval gT G)) *)
case/dprodP=> [[H1 H2 -> ->] defG cH12 trH12].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@center gT (@gval gT H1)) (@center gT (@gval gT H2))) (@center gT (@gval gT G)) *)
move: defG; rewrite -cprodE // => /center_cprod/cprodP[_ /= <- cZ12].
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (direct_product gT (@center gT (@gval gT H1)) (@center gT (@gval gT H2))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@center gT (@gval gT H1)) (@center gT (@gval gT H2))) *)
by apply: dprodE; rewrite //= setIAC setIA -setIA trH12 (setIidPl _) ?sub1G.
Qed.
Lemma center_bigdprod I r P (F: I -> {set gT}) G :
\big[dprod/1]_(i <- r | P i) F i = G ->
\big[dprod/1]_(i <- r | P i) 'Z(F i) = 'Z(G).
Proof.
(* Goal: forall _ : @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@BigOp.bigop (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) I (oneg (group_set_of_baseGroupType (FinGroup.base gT))) r (fun i : I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) I i (direct_product gT) (P i) (F i))) (@gval gT G), @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@BigOp.bigop (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) I (oneg (group_set_of_baseGroupType (FinGroup.base gT))) r (fun i : I => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) I i (direct_product gT) (P i) (@center gT (F i)))) (@center gT (@gval gT G)) *)
elim/big_ind2: _ G => [_ <-|A B C D IHA IHB G dG|_ _ G ->]; rewrite ?center1 //.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (direct_product gT A C) (@center gT (@gval gT G)) *)
case/dprodP: dG IHA IHB (dG) => [[H K -> ->] _ _ _] IHH IHK dG.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (direct_product gT A C) (@center gT (@gval gT G)) *)
by rewrite (IHH H) // (IHK K) // (center_dprod dG).
Qed.
Lemma Aut_cprod_full G H K :
H \* K = G -> 'Z(H) = 'Z(K) ->
Aut_in (Aut H) 'Z(H) \isog Aut 'Z(H) ->
Aut_in (Aut K) 'Z(K) \isog Aut 'Z(K) ->
Aut_in (Aut G) 'Z(G) \isog Aut 'Z(G).
Proof.
(* Goal: forall (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (central_product gT (@gval gT H) (@gval gT K)) (@gval gT G)) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@center gT (@gval gT H)) (@center gT (@gval gT K))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT H)) (@center gT (@gval gT H))) (@Aut gT (@center gT (@gval gT H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT K)) (@center gT (@gval gT K))) (@Aut gT (@center gT (@gval gT K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))) *)
move=> defG eqZHK; have [_ defHK cHK] := cprodP defG.
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT H)) (@center gT (@gval gT H))) (@Aut gT (@center gT (@gval gT H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT K)) (@center gT (@gval gT K))) (@Aut gT (@center gT (@gval gT K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))) *)
have defZ: 'Z(G) = 'Z(H) by rewrite -defHK -center_prod // eqZHK mulGid.
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT H)) (@center gT (@gval gT H))) (@Aut gT (@center gT (@gval gT H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT K)) (@center gT (@gval gT K))) (@Aut gT (@center gT (@gval gT K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))) *)
have ziHK: H :&: K = 'Z(K).
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT H)) (@center gT (@gval gT H))) (@Aut gT (@center gT (@gval gT H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT K)) (@center gT (@gval gT K))) (@Aut gT (@center gT (@gval gT K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT K)) (@center gT (@gval gT K)) *)
by apply/eqP; rewrite eqEsubset subsetI -{1 2}eqZHK !center_sub setIS.
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT H)) (@center gT (@gval gT H))) (@Aut gT (@center gT (@gval gT H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT K)) (@center gT (@gval gT K))) (@Aut gT (@center gT (@gval gT K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))) *)
have AutZP := Aut_sub_fullP (@center_sub gT _).
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT H)) (@center gT (@gval gT H))) (@Aut gT (@center gT (@gval gT H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT K)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT K)) (@center gT (@gval gT K))) (@Aut gT (@center gT (@gval gT K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))) *)
move/AutZP=> AutZHfull /AutZP AutZKfull; apply/AutZP=> g injg gZ.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have [gH [def_gH ker_gH _ im_gH]] := domP g defZ.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have [gK [def_gK ker_gK _ im_gK]] := domP g (etrans defZ eqZHK).
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have [injgH injgK]: 'injm gH /\ 'injm gK by rewrite ker_gH ker_gK.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have [gHH gKK]: gH @* 'Z(H) = 'Z(H) /\ gK @* 'Z(K) = 'Z(K).
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
(* Goal: and (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@center gT (@gval gT H)) gH (@MorPhantom gT gT (@mfun gT gT (@center gT (@gval gT H)) gH)) (@center gT (@gval gT H))) (@center gT (@gval gT H))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@center gT (@gval gT K)) gK (@MorPhantom gT gT (@mfun gT gT (@center gT (@gval gT K)) gK)) (@center gT (@gval gT K))) (@center gT (@gval gT K))) *)
by rewrite im_gH im_gK -eqZHK -defZ.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have [|fH [injfH im_fH fHZ]] := AutZHfull gH injgH.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT (@center_group gT H)) gH (@MorPhantom gT gT (@mfun gT gT (@gval gT (@center_group gT H)) gH)) (@gval gT (@center_group gT H))) (@gval gT (@center_group gT H)) *)
by rewrite im_gH /= -defZ.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have [|fK [injfK im_fK fKZ]] := AutZKfull gK injgK.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT (@center_group gT K)) gK (@MorPhantom gT gT (@mfun gT gT (@gval gT (@center_group gT K)) gK)) (@gval gT (@center_group gT K))) (@gval gT (@center_group gT K)) *)
by rewrite im_gK /= -eqZHK -defZ.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have cfHK: fK @* K \subset 'C(fH @* H) by rewrite im_fH im_fK.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
have eq_fHK: {in H :&: K, fH =1 fK}.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@gval gT K)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT H) fH x) (@mfun gT gT (@gval gT K) fK x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT H) fH) (@mfun gT gT (@gval gT K) fK))) *)
by move=> z; rewrite ziHK => Zz; rewrite fHZ ?fKZ /= ?eqZHK // def_gH def_gK.
(* Goal: @ex (@morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (fun g0 : @morphism_for gT gT (@gval gT G) (Phant (FinGroup.arg_sort (FinGroup.base gT))) => and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) g0 (@MorPhantom gT gT (@mfun gT gT (@gval gT G) g0)) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0 x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) g0) (@mfun gT gT (@gval gT (@center_group gT G)) g))))) *)
exists (cprodm_morphism defG cfHK eq_fHK).
(* Goal: and3 (is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@ker gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK) (@MorPhantom gT gT (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (oneg (group_set_baseGroupType (FinGroup.base gT))))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@morphim gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK) (@MorPhantom gT gT (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK))) (@gval gT G)) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK) x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK)) (@mfun gT gT (@gval gT (@center_group gT G)) g)))) *)
rewrite injm_cprodm injfH injfK im_cprodm im_fH im_fK defHK.
(* Goal: and3 (is_true (andb true (andb true (@eq_op (set_of_eqType (FinGroup.finType (FinGroup.base gT))) (@setI (FinGroup.finType (FinGroup.base gT)) (@gval gT H) (@gval gT K)) (@morphim gT gT (@gval gT H) fH (@MorPhantom gT gT (@mfun gT gT (@gval gT H) fH)) (@gval gT K)))))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@gval gT G) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK) x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK)) (@mfun gT gT (@gval gT (@center_group gT G)) g)))) *)
rewrite -morphimIdom ziHK -eqZHK injm_center // im_fH eqxx.
(* Goal: and3 (is_true (andb true (andb true true))) (@eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@gval gT G) (@gval gT G)) (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@center_group gT G)))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (FinGroup.sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK) x) (@mfun gT gT (@gval gT (@center_group gT G)) g x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (@mfun gT gT (@gval gT G) (@cprodm_morphism gT gT H K G fH fK defG cfHK eq_fHK)) (@mfun gT gT (@gval gT (@center_group gT G)) g)))) *)
split=> //= z; rewrite {1}defZ => Zz; have [Hz _] := setIP Zz.
(* Goal: @eq (FinGroup.sort (FinGroup.base gT)) (@cprodm gT gT H K G fH fK defG cfHK eq_fHK z) (@mfun gT gT (@center gT (@gval gT G)) g z) *)
by rewrite cprodmEl // fHZ // def_gH.
Qed.
End Product.
Section CprodBy.
Variables gTH gTK : finGroupType.
Variables (H : {group gTH}) (K : {group gTK}) (gz : {morphism 'Z(H) >-> gTK}).
Definition ker_cprod_by of isom 'Z(H) 'Z(K) gz :=
[set xy | let: (x, y) := xy in (x \in 'Z(H)) && (y == (gz x)^-1)].
Hypothesis isoZ : isom 'Z(H) 'Z(K) gz.
Let kerHK := ker_cprod_by isoZ.
Let gzZ : gz @* 'Z(H) = 'Z(K). Proof. by case/isomP: isoZ. Qed.
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gTK)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gTK))))) (@morphim gTH gTK (@center gTH (@gval gTH H)) gz (@MorPhantom gTH gTK (@mfun gTH gTK (@center gTH (@gval gTH H)) gz)) (@center gTH (@gval gTH H))) (@center gTK (@gval gTK K)) *)
by case/isomP: isoZ.
Qed.
Let sgzZZ : gz @* 'Z(H) \subset 'Z(K) := char_sub gzZchar.
Let sZH := center_sub H.
Let sZK := center_sub K.
Let sgzZG : gz @* 'Z(H) \subset K := subset_trans sgzZZ sZK.
Lemma ker_cprod_by_is_group : group_set kerHK.
Proof.
(* Goal: is_true (@group_set (prod_group gTH gTK) kerHK) *)
apply/group_setP; rewrite inE /= group1 morph1 invg1 /=.
(* Goal: and (is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gTK))) (oneg (FinGroup.base gTK)) (oneg (FinGroup.base gTK)))) (@prop_in11 (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK)) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK)) (fun x y : prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) => is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@mulg (extprod_baseFinGroupType gTH gTK) x y) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK)))) (inPhantom (forall x y : prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)), is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@mulg (extprod_baseFinGroupType gTH gTK) x y) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK)))))) *)
split=> // [[x1 y1] [x2 y2]].
(* Goal: forall (_ : is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x1 y1) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK)))) (_ : is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x2 y2) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK)))), is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@mulg (extprod_baseFinGroupType gTH gTK) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x1 y1) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x2 y2)) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK))) *)
rewrite inE /= => /andP[Zx1 /eqP->]; have [_ cGx1] := setIP Zx1.
(* Goal: forall _ : is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x2 y2) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK))), is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@mulg (extprod_baseFinGroupType gTH gTK) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x1 (@invg (FinGroup.base gTK) (@mfun gTH gTK (@center gTH (@gval gTH H)) gz x1))) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x2 y2)) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK))) *)
rewrite inE /= => /andP[Zx2 /eqP->]; have [Gx2 _] := setIP Zx2.
(* Goal: is_true (@in_mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (@mulg (extprod_baseFinGroupType gTH gTK) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x1 (@invg (FinGroup.base gTK) (@mfun gTH gTK (@center gTH (@gval gTH H)) gz x1))) (@pair (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) x2 (@invg (FinGroup.base gTK) (@mfun gTH gTK (@center gTH (@gval gTH H)) gz x2)))) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) kerHK))) *)
by rewrite inE /= groupM //= -invMg (centP cGx1) // morphM.
Qed.
Canonical ker_cprod_by_group := Group ker_cprod_by_is_group.
Lemma ker_cprod_by_central : kerHK \subset 'Z(setX H K).
Proof.
(* Goal: is_true (@subset (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) (@mem (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK)))) (predPredType (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))))) (@SetDef.pred_of_set (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) kerHK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (@center (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)))))) *)
rewrite -(center_dprod (setX_dprod H K)) -morphim_pairg1 -morphim_pair1g.
(* Goal: is_true (@subset (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) (@mem (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK)))) (predPredType (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))))) (@SetDef.pred_of_set (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) kerHK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (direct_product (prod_group gTH gTK) (@center (prod_group gTH gTK) (@morphim gTH (prod_group gTH gTK) (@setTfor (FinGroup.arg_finType (FinGroup.base gTH)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@pairg1 gTH gTK)) (@gval gTH H))) (@center (prod_group gTH gTK) (@morphim gTK (prod_group gTH gTK) (@setTfor (FinGroup.arg_finType (FinGroup.base gTK)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@pair1g gTH gTK)) (@gval gTK K))))))) *)
rewrite -!injm_center ?subsetT ?injm_pair1g ?injm_pairg1 //=.
(* Goal: is_true (@subset (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) kerHK)) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (direct_product (prod_group gTH gTK) (@morphim gTH (prod_group gTH gTK) (@setTfor (FinGroup.arg_finType (FinGroup.base gTH)) (Phant (FinGroup.arg_sort (FinGroup.base gTH)))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@pairg1 gTH gTK)) (@center gTH (@gval gTH H))) (@morphim gTK (prod_group gTH gTK) (@setTfor (FinGroup.arg_finType (FinGroup.base gTK)) (Phant (FinGroup.arg_sort (FinGroup.base gTK)))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@pair1g gTH gTK)) (@center gTK (@gval gTK K))))))) *)
rewrite morphim_pairg1 morphim_pair1g setX_dprod.
(* Goal: is_true (@subset (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))) kerHK)) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH (@center_group gTH H)) (@gval gTK (@center_group gTK K)))))) *)
apply/subsetP=> [[x y]]; rewrite inE => /andP[Zx /eqP->].
(* Goal: is_true (@in_mem (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK)))) (@pair (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (Finite.sort (FinGroup.finType (FinGroup.base gTK))) x (@invg (FinGroup.base gTK) (@mfun gTH gTK (@center gTH (@gval gTH H)) gz x))) (@mem (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK)))) (predPredType (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.finType (FinGroup.base gTK))))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH (@center_group gTH H)) (@gval gTK (@center_group gTK K)))))) *)
by rewrite inE /= Zx groupV (subsetP sgzZZ) ?mem_morphim.
Qed.
Definition cprod_by_def := subFinGroupType [group of setX H K / kerHK].
Definition cprod_by := locked_with cprod_by_key cprod_by_def.
Local Notation C := [set: FinGroup.arg_sort (FinGroup.base cprod_by)].
Definition in_cprod : gTH * gTK -> cprod_by :=
let: tt as k := cprod_by_key return _ -> locked_with k cprod_by_def in
subg _ \o coset kerHK.
Lemma in_cprodM : {in setX H K &, {morph in_cprod : u v / u * v}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)))) (@mem (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)))) (predPredType (Finite.sort (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK))))) (@SetDef.pred_of_set (prod_finType (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK))) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)))) (fun x y : prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) => @eq (FinGroup.arg_sort (FinGroup.base cprod_by)) (in_cprod ((fun u v : prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) => @mulg (extprod_baseFinGroupType gTH gTK) u v) x y)) ((fun u v : FinGroup.arg_sort (FinGroup.base cprod_by) => @mulg (FinGroup.base cprod_by) u v) (in_cprod x) (in_cprod y))) (inPhantom (@morphism_2 (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (FinGroup.arg_sort (FinGroup.base cprod_by)) in_cprod (fun u v : prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)) => @mulg (extprod_baseFinGroupType gTH gTK) u v) (fun u v : FinGroup.arg_sort (FinGroup.base cprod_by) => @mulg (FinGroup.base cprod_by) u v))) *)
rewrite /in_cprod /cprod_by; case: cprod_by_key => /= u v Gu Gv.
(* Goal: @eq (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))) (@coset (prod_group gTH gTK) kerHK (@mulg (extprod_baseFinGroupType gTH gTK) u v))) (@mulg (@subBaseFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))) (@coset (prod_group gTH gTK) kerHK u)) (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))) (@coset (prod_group gTH gTK) kerHK v))) *)
have nkerHKG := normal_norm (sub_center_normal ker_cprod_by_central).
(* Goal: @eq (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))) (@coset (prod_group gTH gTK) kerHK (@mulg (extprod_baseFinGroupType gTH gTK) u v))) (@mulg (@subBaseFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))) (@coset (prod_group gTH gTK) kerHK u)) (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))) (@coset (prod_group gTH gTK) kerHK v))) *)
by rewrite -!morphM ?mem_quotient // (subsetP nkerHKG).
Qed.
Canonical in_cprod_morphism := Morphism in_cprodM.
Lemma ker_in_cprod : 'ker in_cprod = kerHK.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))))) (@ker (prod_group gTH gTK) cprod_by (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) in_cprod_morphism (@MorPhantom (prod_group gTH gTK) cprod_by in_cprod)) kerHK *)
transitivity ('ker (subg [group of setX H K / kerHK] \o coset kerHK)).
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))))) (@ker (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@morphpre (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK) (@MorPhantom (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@mfun (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK))) (@gval (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@comp_morphism (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@normaliser_group (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))) (@coset_morphism (prod_group gTH gTK) kerHK) (@subg_morphism (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@MorPhantom (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (FinGroup.arg_sort (FinGroup.base (@coset_groupType (prod_group gTH gTK) kerHK))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@coset (prod_group gTH gTK) kerHK)))) kerHK *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))))) (@ker (prod_group gTH gTK) cprod_by (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) in_cprod_morphism (@MorPhantom (prod_group gTH gTK) cprod_by in_cprod)) (@ker (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@morphpre (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK) (@MorPhantom (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@mfun (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK))) (@gval (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@comp_morphism (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@normaliser_group (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))) (@coset_morphism (prod_group gTH gTK) kerHK) (@subg_morphism (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@MorPhantom (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (FinGroup.arg_sort (FinGroup.base (@coset_groupType (prod_group gTH gTK) kerHK))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@coset (prod_group gTH gTK) kerHK)))) *)
rewrite /ker /morphpre /= /in_cprod /cprod_by; case: cprod_by_key => /=.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))))) (@ker (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@morphpre (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK) (@MorPhantom (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@mfun (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK))) (@gval (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@comp_morphism (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@normaliser_group (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))) (@coset_morphism (prod_group gTH gTK) kerHK) (@subg_morphism (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@MorPhantom (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (FinGroup.arg_sort (FinGroup.base (@coset_groupType (prod_group gTH gTK) kerHK))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@coset (prod_group gTH gTK) kerHK)))) kerHK *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (Phant (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))))) (@setI (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) (@preimset (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@coset_of (prod_group gTH gTK) kerHK) (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@coset (prod_group gTH gTK) kerHK)) (@mem (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (predPredType (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))))) (@SetDef.pred_of_set (FinGroup.arg_finType (@subBaseFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))))) (oneg (group_set_of_baseGroupType (@subBaseFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))))))))) (@setI (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@setI (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@normaliser (prod_group gTH gTK) kerHK) (@preimset (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@coset_of (prod_group gTH gTK) kerHK) (@coset (prod_group gTH gTK) kerHK) (@mem (@coset_of (prod_group gTH gTK) kerHK) (predPredType (@coset_of (prod_group gTH gTK) kerHK)) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType (prod_group gTH gTK) kerHK)) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@preimset (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@coset_of (prod_group gTH gTK) kerHK) (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (@coset (prod_group gTH gTK) kerHK)) (@mem (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))) (predPredType (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))))) (@SetDef.pred_of_set (FinGroup.arg_finType (@subBaseFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K))))) (oneg (group_set_of_baseGroupType (@subBaseFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK) (@morphim_groupset (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@normaliser_group (prod_group gTH gTK) kerHK) (@coset_morphism (prod_group gTH gTK) kerHK) (@setX_group gTH gTK H K)))))))))) *)
by rewrite ['N(_) :&: _]quotientGK ?sub_center_normal ?ker_cprod_by_central.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))))) (@ker (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@morphpre (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK) (@MorPhantom (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@mfun (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@gval (prod_group gTH gTK) (@normaliser_group (prod_group gTH gTK) kerHK)) (@coset_morphism (prod_group gTH gTK) kerHK))) (@gval (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@comp_morphism (prod_group gTH gTK) (@coset_groupType (prod_group gTH gTK) kerHK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@normaliser_group (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))) (@coset_morphism (prod_group gTH gTK) kerHK) (@subg_morphism (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK))))) (@MorPhantom (prod_group gTH gTK) (@subFinGroupType (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (FinGroup.arg_sort (FinGroup.base (@coset_groupType (prod_group gTH gTK) kerHK))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@coset (prod_group gTH gTK) kerHK)))) kerHK *)
by rewrite ker_comp ker_subg -kerE ker_coset.
Qed.
Lemma cpairg1_dom : H \subset 'dom (in_cprod \o @pairg1 gTH gTK).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gTH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@dom gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTH cprod_by (@funcomp (FinGroup.arg_sort (FinGroup.base cprod_by)) (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (FinGroup.arg_sort (FinGroup.base gTH)) tt in_cprod (@pairg1 gTH gTK))))))) *)
by rewrite -sub_morphim_pre ?subsetT // morphim_pairg1 setXS ?sub1G.
Qed.
Lemma cpair1g_dom : K \subset 'dom (in_cprod \o @pair1g gTH gTK).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gTK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@dom gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTK cprod_by (@funcomp (FinGroup.arg_sort (FinGroup.base cprod_by)) (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (FinGroup.arg_sort (FinGroup.base gTK)) tt in_cprod (@pair1g gTH gTK))))))) *)
by rewrite -sub_morphim_pre ?subsetT // morphim_pair1g setXS ?sub1G.
Qed.
Definition cpairg1 := tag (restrmP _ cpairg1_dom).
Definition cpair1g := tag (restrmP _ cpair1g_dom).
Local Notation CH := (mfun cpairg1 @* gval H).
Local Notation CK := (mfun cpair1g @* gval K).
Lemma injm_cpairg1 : 'injm cpairg1.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gTH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@ker gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (oneg (group_set_baseGroupType (FinGroup.base gTH)))))) *)
rewrite /cpairg1; case: restrmP => _ [_ -> _ _].
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gTH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H) (@ker gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism))))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (oneg (group_set_baseGroupType (FinGroup.base gTH)))))) *)
rewrite ker_comp ker_in_cprod; apply/subsetP=> x; rewrite 5!inE /=.
(* Goal: forall _ : is_true (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gTH)) x (@mem (FinGroup.arg_sort (FinGroup.base gTH)) (predPredType (FinGroup.arg_sort (FinGroup.base gTH))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H)))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gTH)) x (@mem (FinGroup.arg_sort (FinGroup.base gTH)) (predPredType (FinGroup.arg_sort (FinGroup.base gTH))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@center gTH (@gval gTH H))))) (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gTK))) (oneg (FinGroup.base gTK)) (@invg (FinGroup.base gTK) (@mfun gTH gTK (@center gTH (@gval gTH H)) gz x))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gTH)) x (@mem (FinGroup.arg_sort (FinGroup.base gTH)) (predPredType (FinGroup.arg_sort (FinGroup.base gTH))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (oneg (group_set_baseGroupType (FinGroup.base gTH)))))) *)
by case/and3P=> _ Zx; rewrite inE eq_sym (inv_eq invgK) invg1 morph_injm_eq1.
Qed.
Let injH := injm_cpairg1.
Lemma injm_cpair1g : 'injm cpair1g.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gTK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@ker gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (oneg (group_set_baseGroupType (FinGroup.base gTK)))))) *)
rewrite /cpair1g; case: restrmP => _ [_ -> _ _].
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gTK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@setI (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K) (@ker gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism))))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (oneg (group_set_baseGroupType (FinGroup.base gTK)))))) *)
rewrite ker_comp ker_in_cprod; apply/subsetP=> y; rewrite !inE /= morph1 invg1.
(* Goal: forall _ : is_true (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gTK)) y (@mem (FinGroup.arg_sort (FinGroup.base gTK)) (predPredType (FinGroup.arg_sort (FinGroup.base gTK))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K)))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gTH)) (oneg (FinGroup.base gTH)) (@mem (FinGroup.arg_sort (FinGroup.base gTH)) (predPredType (FinGroup.arg_sort (FinGroup.base gTH))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@center gTH (@gval gTH H))))) (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gTK))) y (oneg (FinGroup.base gTK))))), is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gTK))) y (oneg (FinGroup.base gTK))) *)
by case/and3P.
Qed.
Let injK := injm_cpair1g.
Lemma im_cpair_cent : CK \subset 'C(CH).
Proof.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base cprod_by)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base cprod_by)) (@centraliser cprod_by (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)))))) *)
rewrite /cpairg1 /cpair1g; do 2!case: restrmP => _ [_ _ _ -> //].
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base cprod_by)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism))) (@gval gTK K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base cprod_by)) (@centraliser cprod_by (@morphim gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism))) (@gval gTH H)))))) *)
rewrite !morphim_comp morphim_cents // morphim_pair1g morphim_pairg1.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (oneg (group_set_of_baseGroupType (FinGroup.base gTH))) (@gval gTK K)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))) (@centraliser (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (oneg (group_set_of_baseGroupType (FinGroup.base gTK)))))))) *)
by case/dprodP: (setX_dprod H K).
Qed.
Hint Resolve im_cpair_cent : core.
Lemma im_cpair : CH * CK = C.
Proof.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base cprod_by))) (@mulg (group_set_of_baseGroupType (FinGroup.base cprod_by)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K))) (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by)))) *)
rewrite /cpairg1 /cpair1g; do 2!case: restrmP => _ [_ _ _ -> //].
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base cprod_by))) (@mulg (group_set_of_baseGroupType (FinGroup.base cprod_by)) (@morphim gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@morphpre gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK) (@MorPhantom gTH (prod_group gTH gTK) (@mfun gTH (prod_group gTH gTK) (@gval gTH (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))))) (pairg1_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTH (prod_group gTH gTK) cprod_by (@setT_group gTH (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setX_group gTH gTK H K) (pairg1_morphism gTH gTK) in_cprod_morphism))) (@gval gTH H)) (@morphim gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism) (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@morphpre gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K))) (@comp_morphism gTK (prod_group gTH gTK) cprod_by (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))))) (@setX_group gTH gTK H K) (pair1g_morphism gTH gTK) in_cprod_morphism))) (@gval gTK K))) (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by)))) *)
rewrite !morphim_comp -morphimMl morphim_pairg1 ?setXS ?sub1G //.
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base cprod_by))) (@morphim (prod_group gTH gTK) cprod_by (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K)) in_cprod_morphism (@MorPhantom (prod_group gTH gTK) cprod_by (@mfun (prod_group gTH gTK) cprod_by (@gval (prod_group gTH gTK) (@setX_group gTH gTK H K)) in_cprod_morphism)) (@mulg (group_set_of_baseGroupType (FinGroup.base (prod_group gTH gTK))) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (oneg (group_set_of_baseGroupType (FinGroup.base gTK)))) (@morphim gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK) (@MorPhantom gTK (prod_group gTH gTK) (@mfun gTK (prod_group gTH gTK) (@gval gTK (@setT_group gTK (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))))) (pair1g_morphism gTH gTK))) (@gval gTK K)))) (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by)))) *)
rewrite morphim_pair1g setX_prod morphimEdom /= /in_cprod /cprod_by.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@locked_with cprod_by_key FinGroup.type cprod_by_def))) (Phant (FinGroup.arg_sort (FinGroup.base (@locked_with cprod_by_key FinGroup.type cprod_by_def))))) (@Imset.imset (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (FinGroup.finType (FinGroup.base (@locked_with cprod_by_key FinGroup.type cprod_by_def))) (let 'tt as k := cprod_by_key return (forall _ : Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK))), FinGroup.arg_sort (FinGroup.base (@locked_with k FinGroup.type cprod_by_def))) in @funcomp (@subg_of (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (FinGroup.arg_sort (FinGroup.base (@coset_groupType (prod_group gTH gTK) kerHK))) (Finite.sort (FinGroup.arg_finType (FinGroup.base (prod_group gTH gTK)))) tt (@subg (@coset_groupType (prod_group gTH gTK) kerHK) (@clone_group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient_group (prod_group gTH gTK) (@setX_group gTH gTK H K) kerHK) (@group (@coset_groupType (prod_group gTH gTK) kerHK) (@quotient (prod_group gTH gTK) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K)) kerHK)))) (@coset (prod_group gTH gTK) kerHK)) (@mem (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK))) (predPredType (prod (FinGroup.arg_sort (FinGroup.base gTH)) (FinGroup.arg_sort (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (extprod_baseFinGroupType gTH gTK)) (@setX (FinGroup.arg_finType (FinGroup.base gTH)) (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTH H) (@gval gTK K))))) (@setTfor (FinGroup.arg_finType (FinGroup.base (@locked_with cprod_by_key FinGroup.type cprod_by_def))) (Phant (FinGroup.arg_sort (FinGroup.base (@locked_with cprod_by_key FinGroup.type cprod_by_def))))) *)
by case: cprod_by_key; rewrite /= imset_comp imset_coset -morphimEdom im_subg.
Qed.
Lemma eq_cpairZ : {in 'Z(H), cpairg1 =1 cpair1g \o gz}.
Lemma setI_im_cpair : CH :&: CK = 'Z(CH).
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base cprod_by)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))))) (@setI (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K))) (@center cprod_by (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H))) *)
apply/eqP; rewrite eqEsubset setIS //=.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base cprod_by)) (@mem (FinGroup.sort (FinGroup.base cprod_by)) (predPredType (FinGroup.sort (FinGroup.base cprod_by))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@center cprod_by (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H))))) (@mem (FinGroup.sort (FinGroup.base cprod_by)) (predPredType (FinGroup.sort (FinGroup.base cprod_by))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@setI (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)))))) *)
rewrite subsetI center_sub -injm_center //.
(* Goal: is_true (andb true (@subset (FinGroup.finType (FinGroup.base cprod_by)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@center gTH (@gval gTH H))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)))))) *)
rewrite (eq_in_morphim _ eq_cpairZ); first by rewrite morphim_comp morphimS.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gTH)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H) (@center gTH (@gval gTH H))) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@morphpre gTH gTK (@gval gTH (@center_group gTH H)) gz (@MorPhantom gTH gTK (@mfun gTH gTK (@gval gTH (@center_group gTH H)) gz)) (@gval gTK K)) (@center gTH (@gval gTH H))) *)
by rewrite !(setIidPr _) // -sub_morphim_pre.
Qed.
Lemma cpair1g_center : cpair1g @* 'Z(K) = 'Z(C).
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base cprod_by)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))))) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@center gTK (@gval gTK K))) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) *)
case/cprodP: (center_cprod im_cpair_cprod) => _ <- _.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base cprod_by)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))))) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@center gTK (@gval gTK K))) (@mulg (group_set_of_baseGroupType (FinGroup.base cprod_by)) (@center cprod_by (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H))) (@center cprod_by (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)))) *)
by rewrite injm_center // -setI_im_cpair mulSGid //= setIC setIS 1?centsC.
Qed.
Lemma cpair_center_id : 'Z(CH) = 'Z(CK).
Lemma cpairg1_center : cpairg1 @* 'Z(H) = 'Z(C).
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base cprod_by)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))))) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@center gTH (@gval gTH H))) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) *)
by rewrite -cpair1g_center !injm_center // cpair_center_id.
Qed.
Section ExtCprodm.
Variable rT : finGroupType.
Variables (fH : {morphism H >-> rT}) (fK : {morphism K >-> rT}).
Hypothesis cfHK : fK @* K \subset 'C(fH @* H).
Hypothesis eq_fHK : {in 'Z(H), fH =1 fK \o gz}.
Let gH := ifactm fH injm_cpairg1.
Let gK := ifactm fK injm_cpair1g.
Lemma xcprodm_cent : gK @* CK \subset 'C(gH @* CH).
Proof.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK (@MorPhantom cprod_by rT (@mfun cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@centraliser rT (@morphim cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H))))))) *)
by rewrite !im_ifactm.
Qed.
Lemma xcprodmI : {in CH :&: CK, gH =1 gK}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base cprod_by)) (@setI (FinGroup.finType (FinGroup.base cprod_by)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K))))) (fun x : FinGroup.arg_sort (FinGroup.base cprod_by) => @eq (FinGroup.sort (FinGroup.base rT)) (@mfun cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH x) (@mfun cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK x)) (inPhantom (@eqfun (FinGroup.sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base cprod_by)) (@mfun cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH) (@mfun cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK))) *)
rewrite setI_im_cpair -injm_center // => fHx; case/morphimP=> x Gx Zx ->{fHx}.
(* Goal: @eq (FinGroup.sort (FinGroup.base rT)) (@mfun cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH (@mfun gTH cprod_by (@gval gTH H) cpairg1 x)) (@mfun cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK (@mfun gTH cprod_by (@gval gTH H) cpairg1 x)) *)
by rewrite {2}eq_cpairZ //= ?ifactmE ?eq_fHK //= (subsetP sgzZG) ?mem_morphim.
Qed.
Definition xcprodm := cprodm im_cpair_cprod xcprodm_cent xcprodmI.
Canonical xcprod_morphism := [morphism of xcprodm].
Lemma xcprodmEl : {in H, forall x, xcprodm (cpairg1 x) = fH x}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H))) (fun x : FinGroup.arg_sort (FinGroup.base gTH) => @eq (FinGroup.sort (FinGroup.base rT)) (xcprodm (@mfun gTH cprod_by (@gval gTH H) cpairg1 x)) (@mfun gTH rT (@gval gTH H) fH x)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gTH), @eq (FinGroup.sort (FinGroup.base rT)) (xcprodm (@mfun gTH cprod_by (@gval gTH H) cpairg1 x)) (@mfun gTH rT (@gval gTH H) fH x))) *)
by move=> x Hx; rewrite /xcprodm cprodmEl ?mem_morphim ?ifactmE.
Qed.
Lemma xcprodmEr : {in K, forall y, xcprodm (cpair1g y) = fK y}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K))) (fun y : FinGroup.arg_sort (FinGroup.base gTK) => @eq (FinGroup.sort (FinGroup.base rT)) (xcprodm (@mfun gTK cprod_by (@gval gTK K) cpair1g y)) (@mfun gTK rT (@gval gTK K) fK y)) (inPhantom (forall y : FinGroup.arg_sort (FinGroup.base gTK), @eq (FinGroup.sort (FinGroup.base rT)) (xcprodm (@mfun gTK cprod_by (@gval gTK K) cpair1g y)) (@mfun gTK rT (@gval gTK K) fK y))) *)
by move=> y Ky; rewrite /xcprodm cprodmEr ?mem_morphim ?ifactmE.
Qed.
Lemma xcprodmE :
{in H & K, forall x y, xcprodm (cpairg1 x * cpair1g y) = fH x * fK y}.
Proof.
(* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K))) (fun (x : FinGroup.arg_sort (FinGroup.base gTH)) (y : FinGroup.arg_sort (FinGroup.base gTK)) => @eq (FinGroup.sort (FinGroup.base rT)) (xcprodm (@mulg (FinGroup.base cprod_by) (@mfun gTH cprod_by (@gval gTH H) cpairg1 x) (@mfun gTK cprod_by (@gval gTK K) cpair1g y))) (@mulg (FinGroup.base rT) (@mfun gTH rT (@gval gTH H) fH x) (@mfun gTK rT (@gval gTK K) fK y))) (inPhantom (forall (x : FinGroup.arg_sort (FinGroup.base gTH)) (y : FinGroup.arg_sort (FinGroup.base gTK)), @eq (FinGroup.sort (FinGroup.base rT)) (xcprodm (@mulg (FinGroup.base cprod_by) (@mfun gTH cprod_by (@gval gTH H) cpairg1 x) (@mfun gTK cprod_by (@gval gTK K) cpair1g y))) (@mulg (FinGroup.base rT) (@mfun gTH rT (@gval gTH H) fH x) (@mfun gTK rT (@gval gTK K) fK y)))) *)
by move=> x y Hx Ky; rewrite /xcprodm cprodmE ?mem_morphim ?ifactmE.
Qed.
Lemma im_xcprodm : xcprodm @* C = fH @* H * fK @* K.
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim cprod_by rT (@gval cprod_by (@setT_group cprod_by (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) xcprod_morphism (@MorPhantom cprod_by rT xcprodm) (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@gval gTH H)) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) (@gval gTK K))) *)
by rewrite -im_cpair morphim_cprodm // !im_ifactm.
Qed.
Lemma im_xcprodml A : xcprodm @* (cpairg1 @* A) = fH @* A.
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim cprod_by rT (@gval cprod_by (@setT_group cprod_by (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) xcprod_morphism (@MorPhantom cprod_by rT xcprodm) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) A)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) A) *)
rewrite -!(morphimIdom _ A) morphim_cprodml ?morphimS ?subsetIl //.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H) A))) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H) A)) *)
by rewrite morphim_ifactm ?subsetIl.
Qed.
Lemma im_xcprodmr A : xcprodm @* (cpair1g @* A) = fK @* A.
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim cprod_by rT (@gval cprod_by (@setT_group cprod_by (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) xcprod_morphism (@MorPhantom cprod_by rT xcprodm) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) A)) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) A) *)
rewrite -!(morphimIdom _ A) morphim_cprodmr ?morphimS ?subsetIl //.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim cprod_by rT (@gval cprod_by (@morphim_group gTK cprod_by K cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) K)) gK (@MorPhantom cprod_by rT (@mfun cprod_by rT (@gval cprod_by (@morphim_group gTK cprod_by K cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) K)) gK)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@setI (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K) A))) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) (@setI (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK K) A)) *)
by rewrite morphim_ifactm ?subsetIl.
Qed.
Lemma injm_xcprodm : 'injm xcprodm = 'injm fH && 'injm fK.
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base cprod_by)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base cprod_by)) (@ker cprod_by rT (@gval cprod_by (@setT_group cprod_by (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) xcprod_morphism (@MorPhantom cprod_by rT xcprodm)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base cprod_by)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base cprod_by)) (oneg (group_set_baseGroupType (FinGroup.base cprod_by)))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gTH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@ker gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (oneg (group_set_baseGroupType (FinGroup.base gTH)))))) (@subset (FinGroup.arg_finType (FinGroup.base gTK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@ker gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (oneg (group_set_baseGroupType (FinGroup.base gTK))))))) *)
rewrite injm_cprodm !ker_ifactm !subG1 !morphim_injm_eq1 ?subsetIl // -!subG1.
(* Goal: @eq bool (andb (@subset (FinGroup.arg_finType (FinGroup.base gTH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH (@ker_group gTH rT H fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gTH)) (oneg (group_set_of_baseGroupType (FinGroup.base gTH)))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gTK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK (@ker_group gTK rT K fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gTK)) (oneg (group_set_of_baseGroupType (FinGroup.base gTK)))))) (@eq_op (set_of_eqType (FinGroup.finType (FinGroup.base rT))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH)) (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H))) (@morphim cprod_by rT (@gval cprod_by (@morphim_group gTK cprod_by K cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) K)) gK (@MorPhantom cprod_by rT (@mfun cprod_by rT (@gval cprod_by (@morphim_group gTK cprod_by K cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) K)) gK)) (@gval cprod_by (@morphim_group gTK cprod_by K cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) K)))) (@morphim cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH)) (@gval cprod_by (@morphim_group gTK cprod_by K cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) K)))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gTH)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH (@ker_group gTH rT H fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gTH))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gTH)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gTH)) (oneg (group_set_of_baseGroupType (FinGroup.base gTH)))))) (@subset (FinGroup.arg_finType (FinGroup.base gTK)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gTK)) (@gval gTK (@ker_group gTK rT K fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gTK))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gTK)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gTK)) (oneg (group_set_of_baseGroupType (FinGroup.base gTK))))))) *)
apply: andb_id2l => /= injfH; apply: andb_idr => _.
(* Goal: is_true (@eq_op (set_of_eqType (FinGroup.finType (FinGroup.base rT))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H))) (@morphim cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK (@MorPhantom cprod_by rT (@mfun cprod_by rT (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)) gK)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)))) (@morphim cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@gval gTH H)) gH)) (@morphim gTK cprod_by (@gval gTK K) cpair1g (@MorPhantom gTK cprod_by (@mfun gTK cprod_by (@gval gTK K) cpair1g)) (@gval gTK K)))) *)
rewrite !im_ifactm // -(morphimIdom gH) setI_im_cpair -injm_center //.
(* Goal: is_true (@eq_op (set_of_eqType (FinGroup.finType (FinGroup.base rT))) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@gval gTH H)) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) (@gval gTK K))) (@morphim cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH (@MorPhantom cprod_by rT (@mfun cprod_by rT (@gval cprod_by (@morphim_group gTH cprod_by H cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) H)) gH)) (@morphim gTH cprod_by (@gval gTH H) cpairg1 (@MorPhantom gTH cprod_by (@mfun gTH cprod_by (@gval gTH H) cpairg1)) (@center gTH (@gval gTH H))))) *)
rewrite morphim_ifactm // eqEsubset subsetI morphimS //=.
(* Goal: is_true (andb (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@setI (FinGroup.finType (FinGroup.base rT)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@gval gTH H)) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) (@gval gTK K))))) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@center gTH (@gval gTH H)))))) (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@center gTH (@gval gTH H))))) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) (@gval gTK K)))))) *)
rewrite {1}injm_center // setIS //=.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gTH rT (@gval gTH H) fH (@MorPhantom gTH rT (@mfun gTH rT (@gval gTH H) fH)) (@center gTH (@gval gTH H))))) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gTK rT (@gval gTK K) fK (@MorPhantom gTK rT (@mfun gTK rT (@gval gTK K) fK)) (@gval gTK K))))) *)
rewrite (eq_in_morphim _ eq_fHK); first by rewrite morphim_comp morphimS.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gTH)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gTH))))) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@gval gTH H) (@center gTH (@gval gTH H))) (@setI (FinGroup.arg_finType (FinGroup.base gTH)) (@morphpre gTH gTK (@gval gTH (@center_group gTH H)) gz (@MorPhantom gTH gTK (@mfun gTH gTK (@gval gTH (@center_group gTH H)) gz)) (@gval gTK K)) (@center gTH (@gval gTH H))) *)
by rewrite !(setIidPr _) // -sub_morphim_pre.
Qed.
End ExtCprodm.
Lemma Aut_cprod_by_full :
Aut_in (Aut H) 'Z(H) \isog Aut 'Z(H) ->
Aut_in (Aut K) 'Z(K) \isog Aut 'Z(K) ->
Aut_in (Aut C) 'Z(C) \isog Aut 'Z(C).
Proof.
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))))) (@Aut gTH (@gval gTH H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH)))))))) (FinGroup.arg_finType (FinGroup.base gTH)) (@center gTH (@gval gTH H)) (perm_action (FinGroup.arg_finType (FinGroup.base gTH)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))) (@Aut_in gTH (@Aut gTH (@gval gTH H)) (@center gTH (@gval gTH H))) (@Aut gTH (@center gTH (@gval gTH H))))) (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTK))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTK))))) (@Aut gTK (@gval gTK K)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTK))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTK))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTK)))))))) (FinGroup.arg_finType (FinGroup.base gTK)) (@center gTK (@gval gTK K)) (perm_action (FinGroup.arg_finType (FinGroup.base gTK)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTK))) (@Aut_in gTK (@Aut gTK (@gval gTK K)) (@center gTK (@gval gTK K))) (@Aut gTK (@center gTK (@gval gTK K))))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))))) (@Aut cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by)))))))) (FinGroup.arg_finType (FinGroup.base cprod_by)) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (perm_action (FinGroup.arg_finType (FinGroup.base cprod_by)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@Aut_in cprod_by (@Aut cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by)))))) (@Aut cprod_by (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))))) *)
move=> AutZinH AutZinK.
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))))) (@Aut cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by)))))))) (FinGroup.arg_finType (FinGroup.base cprod_by)) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (perm_action (FinGroup.arg_finType (FinGroup.base cprod_by)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@Aut_in cprod_by (@Aut cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by)))))) (@Aut cprod_by (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))))) *)
have Cfull:= Aut_cprod_full im_cpair_cprod cpair_center_id.
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))))) (@Aut cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by)))))))) (FinGroup.arg_finType (FinGroup.base cprod_by)) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (perm_action (FinGroup.arg_finType (FinGroup.base cprod_by)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base cprod_by))) (@Aut_in cprod_by (@Aut cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by)))))) (@Aut cprod_by (@center cprod_by (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))))) *)
by rewrite Cfull // -injm_center // injm_Aut_full ?center_sub.
Qed.
Section Isomorphism.
Let gzZ_lone (Y : {group gTK}) :
Y \subset 'Z(K) -> gz @* 'Z(H) \isog Y -> gz @* 'Z(H) = Y.
Variables (rT : finGroupType) (GH GK G : {group rT}).
Hypotheses (defG : GH \* GK = G) (ziGHK : GH :&: GK = 'Z(GH)).
Hypothesis AutZHfull : Aut_in (Aut H) 'Z(H) \isog Aut 'Z(H).
Hypotheses (isoGH : GH \isog H) (isoGK : GK \isog K).
Lemma cprod_by_uniq :
exists f : {morphism G >-> cprod_by},
[/\ isom G C f, f @* GH = CH & f @* GK = CK].
Lemma isog_cprod_by : G \isog C.
Proof.
(* Goal: is_true (@isog rT cprod_by (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base cprod_by)) (Phant (FinGroup.arg_sort (FinGroup.base cprod_by))))) *)
by have [f [isoG _ _]] := cprod_by_uniq; apply: isom_isog isoG.
Qed.
End Isomorphism.
End CprodBy.
Section ExtCprod.
Import finfun.
Variables gTH gTK : finGroupType.
Variables (H : {group gTH}) (K : {group gTK}).
Let gt_ b := if b then gTK else gTH.
Local Notation isob := ('Z(H) \isog 'Z(K)) (only parsing).
Let G_ b := if b as b' return {group gt_ b'} then K else H.
Lemma xcprod_subproof :
{gz : {morphism 'Z(H) >-> gt_ isob} | isom 'Z(H) 'Z(G_ isob) gz}.
Proof.
(* Goal: @sig (@morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))))) (fun gz : @morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))))))) => is_true (@isom gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (@center (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@gval (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (G_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))) (@mfun gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) gz))) *)
case: (pickP [pred f : {ffun _} | misom 'Z(H) 'Z(K) f]) => [f isoZ | no_f].
(* Goal: @sig (@morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))))) (fun gz : @morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))))))) => is_true (@isom gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (@center (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@gval (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (G_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))) (@mfun gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) gz))) *)
(* Goal: @sig (@morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))))) (fun gz : @morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))))))) => is_true (@isom gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (@center (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@gval (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (G_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))) (@mfun gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) gz))) *)
rewrite (misom_isog isoZ); case/andP: isoZ => fM isoZ.
(* Goal: @sig (@morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))))) (fun gz : @morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))))))) => is_true (@isom gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (@center (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@gval (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (G_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))) (@mfun gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) gz))) *)
(* Goal: @sig (@morphism_for gTH (gt_ true) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ true))))) (fun gz : @morphism_for gTH (gt_ true) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ true)))) => is_true (@isom gTH (gt_ true) (@center gTH (@gval gTH H)) (@center (gt_ true) (@gval (gt_ true) (G_ true))) (@mfun gTH (gt_ true) (@center gTH (@gval gTH H)) gz))) *)
by exists [morphism of morphm fM].
(* Goal: @sig (@morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))))) (fun gz : @morphism_for gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))))))) => is_true (@isom gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) (@center (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@gval (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (G_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))))) (@mfun gTH (gt_ (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K)))) (@center gTH (@gval gTH H)) gz))) *)
move/pred0P: no_f => not_isoZ; rewrite [isob](congr1 negb not_isoZ).
(* Goal: @sig (@morphism_for gTH (gt_ (negb true)) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (negb true)))))) (fun gz : @morphism_for gTH (gt_ (negb true)) (@center gTH (@gval gTH H)) (Phant (FinGroup.arg_sort (FinGroup.base (gt_ (negb true))))) => is_true (@isom gTH (gt_ (negb true)) (@center gTH (@gval gTH H)) (@center (gt_ (negb true)) (@gval (gt_ (negb true)) (G_ (negb true)))) (@mfun gTH (gt_ (negb true)) (@center gTH (@gval gTH H)) gz))) *)
by exists (idm_morphism _); apply/isomP; rewrite injm_idm im_idm.
Qed.
Definition xcprod := cprod_by (svalP xcprod_subproof).
Inductive xcprod_spec : finGroupType -> Prop :=
XcprodSpec gz isoZ : xcprod_spec (@cprod_by gTH gTK H K gz isoZ).
Lemma xcprodP : 'Z(H) \isog 'Z(K) -> xcprod_spec xcprod.
Proof.
(* Goal: forall _ : is_true (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))), xcprod_spec xcprod *)
by rewrite /xcprod => isoZ; move: xcprod_subproof; rewrite isoZ.
Qed.
Lemma isog_xcprod (rT : finGroupType) (GH GK G : {group rT}) :
Aut_in (Aut H) 'Z(H) \isog Aut 'Z(H) ->
GH \isog H -> GK \isog K -> GH \* GK = G -> 'Z(GH) = 'Z(GK) ->
G \isog [set: xcprod].
Proof.
(* Goal: forall (_ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))))) (@Aut gTH (@gval gTH H)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH)))))))) (FinGroup.arg_finType (FinGroup.base gTH)) (@center gTH (@gval gTH H)) (perm_action (FinGroup.arg_finType (FinGroup.base gTH)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gTH))) (@Aut_in gTH (@Aut gTH (@gval gTH H)) (@center gTH (@gval gTH H))) (@Aut gTH (@center gTH (@gval gTH H))))) (_ : is_true (@isog rT gTH (@gval rT GH) (@gval gTH H))) (_ : is_true (@isog rT gTK (@gval rT GK) (@gval gTK K))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (central_product rT (@gval rT GH) (@gval rT GK)) (@gval rT G)) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@center rT (@gval rT GH)) (@center rT (@gval rT GK))), is_true (@isog rT xcprod (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base xcprod)) (Phant (FinGroup.arg_sort (FinGroup.base xcprod))))) *)
move=> AutZinH isoGH isoGK defG eqZGHK; have [_ _ cGHK] := cprodP defG.
(* Goal: is_true (@isog rT xcprod (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base xcprod)) (Phant (FinGroup.arg_sort (FinGroup.base xcprod))))) *)
have [|gz isoZ] := xcprodP.
(* Goal: is_true (@isog rT (@cprod_by gTH gTK H K gz isoZ) (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base (@cprod_by gTH gTK H K gz isoZ))) (Phant (FinGroup.arg_sort (FinGroup.base (@cprod_by gTH gTK H K gz isoZ)))))) *)
(* Goal: is_true (@isog gTH gTK (@center gTH (@gval gTH H)) (@center gTK (@gval gTK K))) *)
have [[fH injfH <-] [fK injfK <-]] := (isogP isoGH, isogP isoGK).
(* Goal: is_true (@isog rT (@cprod_by gTH gTK H K gz isoZ) (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base (@cprod_by gTH gTK H K gz isoZ))) (Phant (FinGroup.arg_sort (FinGroup.base (@cprod_by gTH gTK H K gz isoZ)))))) *)
(* Goal: is_true (@isog gTH gTK (@center gTH (@morphim rT gTH (@gval rT GH) fH (@MorPhantom rT gTH (@mfun rT gTH (@gval rT GH) fH)) (@gval rT GH))) (@center gTK (@morphim rT gTK (@gval rT GK) fK (@MorPhantom rT gTK (@mfun rT gTK (@gval rT GK) fK)) (@gval rT GK)))) *)
rewrite -!injm_center -?(isog_transl _ (sub_isog _ _)) ?center_sub //=.
(* Goal: is_true (@isog rT (@cprod_by gTH gTK H K gz isoZ) (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base (@cprod_by gTH gTK H K gz isoZ))) (Phant (FinGroup.arg_sort (FinGroup.base (@cprod_by gTH gTK H K gz isoZ)))))) *)
(* Goal: is_true (@isog rT gTK (@center rT (@gval rT GH)) (@morphim rT gTK (@gval rT GK) fK (@MorPhantom rT gTK (@mfun rT gTK (@gval rT GK) fK)) (@center rT (@gval rT GK)))) *)
by rewrite eqZGHK sub_isog ?center_sub.
(* Goal: is_true (@isog rT (@cprod_by gTH gTK H K gz isoZ) (@gval rT G) (@setTfor (FinGroup.arg_finType (FinGroup.base (@cprod_by gTH gTK H K gz isoZ))) (Phant (FinGroup.arg_sort (FinGroup.base (@cprod_by gTH gTK H K gz isoZ)))))) *)
rewrite (isog_cprod_by _ defG) //.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT GH) (@gval rT GK)) (@center rT (@gval rT GH)) *)
by apply/eqP; rewrite eqEsubset setIS // subsetI {2}eqZGHK !center_sub.
Qed.
End ExtCprod.
Section IterCprod.
Variables (gT : finGroupType) (G : {group gT}).
Fixpoint ncprod_def n : finGroupType :=
if n is n'.+1 then xcprod G [set: ncprod_def n']
Definition ncprod := locked_with ncprod_key ncprod_def.
Local Notation G_ n := [set: gsort (ncprod n)].
Lemma ncprod0 : G_ 0 \isog 'Z(G).
Proof.
(* Goal: is_true (@isog (ncprod O) gT (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) (@center gT (@gval gT G))) *)
by rewrite [ncprod]unlock isog_sym isog_subg.
Qed.
Lemma center_ncprod0 : 'Z(G_ 0) = G_ 0.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (ncprod O)))))) (@center (ncprod O) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) *)
by apply: center_idP; rewrite (isog_abelian ncprod0) center_abelian.
Qed.
Lemma center_ncprod n : 'Z(G_ n) \isog 'Z(G).
Proof.
(* Goal: is_true (@isog (ncprod n) gT (@center (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n)))))) (@center gT (@gval gT G))) *)
elim: n => [|n]; first by rewrite center_ncprod0 ncprod0.
(* Goal: forall _ : is_true (@isog (ncprod n) gT (@center (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n)))))) (@center gT (@gval gT G))), is_true (@isog (ncprod (S n)) gT (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (@center gT (@gval gT G))) *)
rewrite [ncprod]unlock=> /isog_symr/xcprodP[gz isoZ] /=.
(* Goal: is_true (@isog (@xcprod gT (ncprod_def n) G (@setT_group (ncprod_def n) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod_def n)))))) gT (@center (@xcprod gT (ncprod_def n) G (@setT_group (ncprod_def n) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod_def n)))))) (@setTfor (FinGroup.arg_finType (FinGroup.base (@xcprod gT (ncprod_def n) G (@setT_group (ncprod_def n) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod_def n)))))))) (Phant (FinGroup.arg_sort (FinGroup.base (@xcprod gT (ncprod_def n) G (@setT_group (ncprod_def n) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod_def n))))))))))) (@center gT (@gval gT G))) *)
by rewrite -cpairg1_center isog_sym sub_isog ?center_sub ?injm_cpairg1.
Qed.
Lemma ncprodS n : xcprod_spec G [set: ncprod n] (ncprod n.+1).
Proof.
(* Goal: @xcprod_spec gT (ncprod n) G (@setT_group (ncprod n) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n))))) (ncprod (S n)) *)
by have:= xcprodP (isog_symr (center_ncprod n)); rewrite [ncprod]unlock.
Qed.
Lemma ncprod1 : G_ 1 \isog G.
Proof.
(* Goal: is_true (@isog (ncprod (S O)) gT (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S O)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S O)))))) (@gval gT G)) *)
case: ncprodS => gz isoZ; rewrite isog_sym /= -im_cpair.
(* Goal: is_true (@isog gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@mulg (group_set_of_baseGroupType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@morphim gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@cpairg1 gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@MorPhantom gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@mfun gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@cpairg1 gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@gval gT G)) (@morphim (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval (ncprod O) (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@cpair1g gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@MorPhantom (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@mfun (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval (ncprod O) (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@cpair1g gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@gval (ncprod O) (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))))))) *)
rewrite mulGSid /=; first by rewrite sub_isog ?injm_cpairg1.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@mem (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (predPredType (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@morphim (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) (@cpair1g gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@MorPhantom (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@mfun (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) (@cpair1g gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))))) (@mem (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (predPredType (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@morphim gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@cpairg1 gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@MorPhantom gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@mfun gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@cpairg1 gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@gval gT G))))) *)
rewrite -{3}center_ncprod0 injm_center ?injm_cpair1g //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@mem (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (predPredType (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@center (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@morphim (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval (ncprod O) (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@cpair1g gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@MorPhantom (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@mfun (ncprod O) (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval (ncprod O) (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@cpair1g gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@gval (ncprod O) (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))))))) (@mem (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (predPredType (FinGroup.arg_sort (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@morphim gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@cpairg1 gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@MorPhantom gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@mfun gT (@cprod_by gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ) (@gval gT G) (@cpairg1 gT (ncprod O) G (@setT_group (ncprod O) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))) gz isoZ))) (@gval gT G))))) *)
by rewrite -cpair_center_id center_sub.
Qed.
Lemma Aut_ncprod_full n :
Aut_in (Aut G) 'Z(G) \isog Aut 'Z(G) ->
Aut_in (Aut (G_ n)) 'Z(G_ n) \isog Aut 'Z(G_ n).
Proof.
(* Goal: forall _ : is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@center gT (@gval gT G))) (@Aut gT (@center gT (@gval gT G)))), is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod n)))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod n)))))) (@Aut (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n)))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod n)))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod n)))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod n))))))))) (FinGroup.arg_finType (FinGroup.base (ncprod n))) (@center (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n)))))) (perm_action (FinGroup.arg_finType (FinGroup.base (ncprod n))))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod n)))) (@Aut_in (ncprod n) (@Aut (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n)))))) (@center (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n))))))) (@Aut (ncprod n) (@center (ncprod n) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod n))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod n)))))))) *)
move=> AutZinG; elim: n => [|n IHn].
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))))) (@Aut (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))))))))) (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (perm_action (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))) (@Aut_in (ncprod (S n)) (@Aut (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n)))))))) (@Aut (ncprod (S n)) (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))))) *)
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod O)))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod O)))))) (@Aut (ncprod O) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod O)))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod O)))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod O))))))))) (FinGroup.arg_finType (FinGroup.base (ncprod O))) (@center (ncprod O) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (perm_action (FinGroup.arg_finType (FinGroup.base (ncprod O))))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod O)))) (@Aut_in (ncprod O) (@Aut (ncprod O) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))) (@center (ncprod O) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O))))))) (@Aut (ncprod O) (@center (ncprod O) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod O))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod O)))))))) *)
by rewrite center_ncprod0; apply/Aut_sub_fullP=> // g injg gG0; exists g.
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))))) (@Aut (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))))))))) (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (perm_action (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base (ncprod (S n))))) (@Aut_in (ncprod (S n)) (@Aut (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))) (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n)))))))) (@Aut (ncprod (S n)) (@center (ncprod (S n)) (@setTfor (FinGroup.arg_finType (FinGroup.base (ncprod (S n)))) (Phant (FinGroup.arg_sort (FinGroup.base (ncprod (S n))))))))) *)
by case: ncprodS => gz isoZ; apply: Aut_cprod_by_full.
Qed.
End IterCprod.
|
Require Import Ensf.
Parameter alph : Ensf.
Parameter epsilon : Elt.
Axiom not_dans_epsilon_alph : ~ dans epsilon alph.
Inductive inmonoid (X : Ensf) : Word -> Prop :=
| inmonoid_nil : inmonoid X nil
| inmonoid_cons :
forall (w : Word) (e : Elt),
inmonoid X w -> dans e X -> inmonoid X (cons e w).
Hint Resolve inmonoid_nil.
Hint Resolve inmonoid_cons.
Fixpoint Inmonoid (X : Ensf) (w : Word) {struct w} : Prop :=
match w with
| nil => True
| cons a w' => dans a X /\ Inmonoid X w'
end.
Lemma i_I : forall (X : Ensf) (w : Word), inmonoid X w -> Inmonoid X w.
Proof.
(* Goal: forall (X : Ensf) (w : Word) (_ : inmonoid X w), Inmonoid X w *)
intros X w H.
(* Goal: Inmonoid X w *)
elim H.
(* Goal: forall (w : Word) (e : Elt) (_ : inmonoid X w) (_ : Inmonoid X w) (_ : dans e X), Inmonoid X (cons e w) *)
(* Goal: Inmonoid X nil *)
red in |- *; simpl in |- *; exact I.
(* Goal: forall (w : Word) (e : Elt) (_ : inmonoid X w) (_ : Inmonoid X w) (_ : dans e X), Inmonoid X (cons e w) *)
intros.
(* Goal: Inmonoid X (cons e w0) *)
change (dans e X /\ Inmonoid X w0) in |- *.
(* Goal: and (dans e X) (Inmonoid X w0) *)
auto.
Qed.
Hint Resolve i_I.
Lemma I_i : forall (X : Ensf) (w : Word), Inmonoid X w -> inmonoid X w.
Proof.
(* Goal: forall (X : Ensf) (w : Word) (_ : Inmonoid X w), inmonoid X w *)
intros X.
(* Goal: forall (w : Word) (_ : Inmonoid X w), inmonoid X w *)
simple induction w.
(* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Inmonoid X w, inmonoid X w) (_ : Inmonoid X (cons e w)), inmonoid X (cons e w) *)
(* Goal: forall _ : Inmonoid X nil, inmonoid X nil *)
auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Inmonoid X w, inmonoid X w) (_ : Inmonoid X (cons e w)), inmonoid X (cons e w) *)
intros x w0 H H0.
(* Goal: inmonoid X (cons x w0) *)
cut (dans x X /\ Inmonoid X w0); auto.
(* Goal: forall _ : and (dans x X) (Inmonoid X w0), inmonoid X (cons x w0) *)
intro H1; elim H1; clear H1.
(* Goal: forall (_ : dans x X) (_ : Inmonoid X w0), inmonoid X (cons x w0) *)
auto.
Qed.
Hint Resolve I_i.
Lemma inmonoid_cons_inv :
forall (X : Ensf) (w : Word) (a : Elt),
inmonoid X (cons a w) -> inmonoid X w.
Proof.
(* Goal: forall (X : Ensf) (w : Word) (a : Elt) (_ : inmonoid X (cons a w)), inmonoid X w *)
intros.
(* Goal: inmonoid X w *)
cut (Inmonoid X w); auto.
(* Goal: Inmonoid X w *)
cut (Inmonoid X (cons a w)); auto.
(* Goal: forall _ : Inmonoid X (cons a w), Inmonoid X w *)
intro H0.
(* Goal: Inmonoid X w *)
cut (dans a X /\ Inmonoid X w); auto.
(* Goal: forall _ : and (dans a X) (Inmonoid X w), Inmonoid X w *)
intro H1; elim H1; clear H1.
(* Goal: forall (_ : dans a X) (_ : Inmonoid X w), Inmonoid X w *)
auto.
Qed.
Lemma inmonoid_cons_inv2 :
forall (X : Ensf) (a : Elt) (w : Word), inmonoid X (cons a w) -> dans a X.
Proof.
(* Goal: forall (X : Ensf) (a : Elt) (w : Word) (_ : inmonoid X (cons a w)), dans a X *)
intros.
(* Goal: dans a X *)
cut (Inmonoid X (cons a w)); auto.
(* Goal: forall _ : Inmonoid X (cons a w), dans a X *)
intro.
(* Goal: dans a X *)
cut (dans a X /\ Inmonoid X w); auto.
(* Goal: forall _ : and (dans a X) (Inmonoid X w), dans a X *)
intro H1; elim H1; clear H1.
(* Goal: forall (_ : dans a X) (_ : Inmonoid X w), dans a X *)
auto.
Qed.
Lemma inmonoid_inclus :
forall (E F : Ensf) (x : Word), inclus E F -> inmonoid E x -> inmonoid F x.
Proof.
(* Goal: forall (E F : Ensf) (x : Word) (_ : inclus E F) (_ : inmonoid E x), inmonoid F x *)
intros E F x inclus_E_F inmonoid_E_x.
(* Goal: inmonoid F x *)
elim inmonoid_E_x.
(* Goal: forall (w : Word) (e : Elt) (_ : inmonoid E w) (_ : inmonoid F w) (_ : dans e E), inmonoid F (cons e w) *)
(* Goal: inmonoid F nil *)
trivial.
(* Goal: forall (w : Word) (e : Elt) (_ : inmonoid E w) (_ : inmonoid F w) (_ : dans e E), inmonoid F (cons e w) *)
intros w e inmonoid_E_w inmonoid_F_w dans_e_E.
(* Goal: inmonoid F (cons e w) *)
apply inmonoid_cons; [ assumption | apply inclus_E_F; assumption ].
Qed.
Fixpoint Append (w1 : Word) : Word -> Word :=
fun w2 : Word =>
match w1 with
| nil => w2
| cons a w3 => cons a (Append w3 w2)
end.
Lemma Append_w_nil : forall w : Word, Append w nil = w :>Word.
Proof.
(* Goal: forall w : Word, @eq Word (Append w nil) w *)
simple induction w.
(* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (Append w nil) w), @eq Word (Append (cons e w) nil) (cons e w) *)
(* Goal: @eq Word (Append nil nil) nil *)
auto.
(* Goal: forall (e : Elt) (w : Word) (_ : @eq Word (Append w nil) w), @eq Word (Append (cons e w) nil) (cons e w) *)
intros x w0 H.
(* Goal: @eq Word (Append (cons x w0) nil) (cons x w0) *)
replace (Append (cons x w0) nil) with (cons x (Append w0 nil)); auto.
(* Goal: @eq Word (cons x (Append w0 nil)) (cons x w0) *)
rewrite H; auto.
Qed.
Inductive append : Word -> Word -> Word -> Prop :=
| append_nil : forall w : Word, append nil w w
| append_cons :
forall (w1 w2 w3 : Word) (a : Elt),
append w1 w2 w3 -> append (cons a w1) w2 (cons a w3).
Lemma Append_inmonoid_g :
forall (X : Ensf) (w1 w2 : Word), inmonoid X (Append w1 w2) -> inmonoid X w1.
Proof.
(* Goal: forall (X : Ensf) (w1 w2 : Word) (_ : inmonoid X (Append w1 w2)), inmonoid X w1 *)
intros X.
(* Goal: forall (w1 w2 : Word) (_ : inmonoid X (Append w1 w2)), inmonoid X w1 *)
simple induction w1.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (w2 : Word) (_ : inmonoid X (Append w w2)), inmonoid X w) (w2 : Word) (_ : inmonoid X (Append (cons e w) w2)), inmonoid X (cons e w) *)
(* Goal: forall (w2 : Word) (_ : inmonoid X (Append nil w2)), inmonoid X nil *)
auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (w2 : Word) (_ : inmonoid X (Append w w2)), inmonoid X w) (w2 : Word) (_ : inmonoid X (Append (cons e w) w2)), inmonoid X (cons e w) *)
intros x w H w2.
(* Goal: forall _ : inmonoid X (Append (cons x w) w2), inmonoid X (cons x w) *)
replace (Append (cons x w) w2) with (cons x (Append w w2)); auto.
(* Goal: forall _ : inmonoid X (cons x (Append w w2)), inmonoid X (cons x w) *)
intro.
(* Goal: inmonoid X (cons x w) *)
apply inmonoid_cons.
(* Goal: dans x X *)
(* Goal: inmonoid X w *)
apply (H w2).
(* Goal: dans x X *)
(* Goal: inmonoid X (Append w w2) *)
apply inmonoid_cons_inv with x; auto.
(* Goal: dans x X *)
apply inmonoid_cons_inv2 with (Append w w2); auto.
Qed.
Lemma Append_inmonoid_d :
forall (X : Ensf) (w1 w2 : Word), inmonoid X (Append w1 w2) -> inmonoid X w2.
Proof.
(* Goal: forall (X : Ensf) (w1 w2 : Word) (_ : inmonoid X (Append w1 w2)), inmonoid X w2 *)
intros X.
(* Goal: forall (w1 w2 : Word) (_ : inmonoid X (Append w1 w2)), inmonoid X w2 *)
simple induction w1.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (w2 : Word) (_ : inmonoid X (Append w w2)), inmonoid X w2) (w2 : Word) (_ : inmonoid X (Append (cons e w) w2)), inmonoid X w2 *)
(* Goal: forall (w2 : Word) (_ : inmonoid X (Append nil w2)), inmonoid X w2 *)
auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (w2 : Word) (_ : inmonoid X (Append w w2)), inmonoid X w2) (w2 : Word) (_ : inmonoid X (Append (cons e w) w2)), inmonoid X w2 *)
intros x w H w2.
(* Goal: forall _ : inmonoid X (Append (cons x w) w2), inmonoid X w2 *)
replace (Append (cons x w) w2) with (cons x (Append w w2)); auto.
(* Goal: forall _ : inmonoid X (cons x (Append w w2)), inmonoid X w2 *)
intro.
(* Goal: inmonoid X w2 *)
apply (H w2).
(* Goal: inmonoid X (Append w w2) *)
apply inmonoid_cons_inv with x; auto.
Qed.
Lemma inmonoid_Append :
forall (X : Ensf) (w1 w2 : Word),
inmonoid X w1 -> inmonoid X w2 -> inmonoid X (Append w1 w2).
Proof.
(* Goal: forall (X : Ensf) (w1 w2 : Word) (_ : inmonoid X w1) (_ : inmonoid X w2), inmonoid X (Append w1 w2) *)
intros X.
(* Goal: forall (w1 w2 : Word) (_ : inmonoid X w1) (_ : inmonoid X w2), inmonoid X (Append w1 w2) *)
simple induction w1.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (w2 : Word) (_ : inmonoid X w) (_ : inmonoid X w2), inmonoid X (Append w w2)) (w2 : Word) (_ : inmonoid X (cons e w)) (_ : inmonoid X w2), inmonoid X (Append (cons e w) w2) *)
(* Goal: forall (w2 : Word) (_ : inmonoid X nil) (_ : inmonoid X w2), inmonoid X (Append nil w2) *)
auto.
(* Goal: forall (e : Elt) (w : Word) (_ : forall (w2 : Word) (_ : inmonoid X w) (_ : inmonoid X w2), inmonoid X (Append w w2)) (w2 : Word) (_ : inmonoid X (cons e w)) (_ : inmonoid X w2), inmonoid X (Append (cons e w) w2) *)
intros x w H w2 H0 H1.
(* Goal: inmonoid X (Append (cons x w) w2) *)
replace (Append (cons x w) w2) with (cons x (Append w w2)); auto.
(* Goal: inmonoid X (cons x (Append w w2)) *)
apply inmonoid_cons.
(* Goal: dans x X *)
(* Goal: inmonoid X (Append w w2) *)
apply (H w2); auto.
(* Goal: dans x X *)
(* Goal: inmonoid X w *)
apply inmonoid_cons_inv with x; auto.
(* Goal: dans x X *)
apply inmonoid_cons_inv2 with w; auto.
Qed.
Definition wordset := Word -> Prop.
Definition eqwordset (l1 l2 : wordset) : Prop :=
forall w : Word, (l1 w -> l2 w) /\ (l2 w -> l1 w).
Lemma eqwordset_refl : forall L : wordset, eqwordset L L.
Proof.
(* Goal: forall L : wordset, eqwordset L L *)
red in |- *.
(* Goal: forall (L : wordset) (w : Word), and (forall _ : L w, L w) (forall _ : L w, L w) *)
auto.
Qed.
Lemma eqwordset_sym :
forall l1 l2 : wordset, eqwordset l1 l2 -> eqwordset l2 l1.
Proof.
(* Goal: forall (l1 l2 : wordset) (_ : eqwordset l1 l2), eqwordset l2 l1 *)
unfold eqwordset in |- *.
(* Goal: forall (l1 l2 : wordset) (_ : forall w : Word, and (forall _ : l1 w, l2 w) (forall _ : l2 w, l1 w)) (w : Word), and (forall _ : l2 w, l1 w) (forall _ : l1 w, l2 w) *)
intros.
(* Goal: and (forall _ : l2 w, l1 w) (forall _ : l1 w, l2 w) *)
elim (H w); clear H; intros; auto.
Qed.
Lemma eqwordset_trans :
forall l1 l2 l3 : wordset,
eqwordset l1 l2 -> eqwordset l2 l3 -> eqwordset l1 l3.
Proof.
(* Goal: forall (l1 l2 l3 : wordset) (_ : eqwordset l1 l2) (_ : eqwordset l2 l3), eqwordset l1 l3 *)
unfold eqwordset in |- *.
(* Goal: forall (l1 l2 l3 : wordset) (_ : forall w : Word, and (forall _ : l1 w, l2 w) (forall _ : l2 w, l1 w)) (_ : forall w : Word, and (forall _ : l2 w, l3 w) (forall _ : l3 w, l2 w)) (w : Word), and (forall _ : l1 w, l3 w) (forall _ : l3 w, l1 w) *)
intros.
(* Goal: and (forall _ : l1 w, l3 w) (forall _ : l3 w, l1 w) *)
elim (H0 w); clear H0; intros.
(* Goal: and (forall _ : l1 w, l3 w) (forall _ : l3 w, l1 w) *)
elim (H w); clear H; intros.
(* Goal: and (forall _ : l1 w, l3 w) (forall _ : l3 w, l1 w) *)
auto.
Qed.
Definition islanguage (X : Ensf) (L : wordset) : Prop :=
forall w : Word, L w -> inmonoid X w.
Fixpoint Word_ext (f : Elt -> Elt) (w : Word) {struct w} : Word :=
match w with
| nil => nil
| cons a w' => cons (f a) (Word_ext f w')
end.
Lemma inmonoid_map :
forall (f : Elt -> Elt) (a : Ensf) (w : Word),
inmonoid a w -> inmonoid (map f a) (Word_ext f w).
Proof.
(* Goal: forall (f : forall _ : Elt, Elt) (a : Ensf) (w : Word) (_ : inmonoid a w), inmonoid (map f a) (Word_ext f w) *)
intros.
(* Goal: inmonoid (map f a) (Word_ext f w) *)
elim H; [ unfold Word_ext in |- *; auto | idtac ].
(* Goal: forall (w : Word) (e : Elt) (_ : inmonoid a w) (_ : inmonoid (map f a) (Word_ext f w)) (_ : dans e a), inmonoid (map f a) (Word_ext f (cons e w)) *)
intros; unfold Word_ext in |- *; simpl in |- *.
(* Goal: inmonoid (map f a) (cons (f e) ((fix Word_ext (f : forall _ : Elt, Elt) (w : Word) {struct w} : Word := match w with | nil => nil | cons a w' => cons (f a) (Word_ext f w') end) f w0)) *)
apply inmonoid_cons; try apply dans_map_inv; auto.
Qed.
Hint Resolve inmonoid_map.
Lemma cons_cons :
forall (x1 x2 : Elt) (w1 w2 : Word),
x1 = x2 :>Elt -> w1 = w2 :>Word -> cons x1 w1 = cons x2 w2 :>Word.
Proof.
(* Goal: forall (x1 x2 : Elt) (w1 w2 : Word) (_ : @eq Elt x1 x2) (_ : @eq Word w1 w2), @eq Word (cons x1 w1) (cons x2 w2) *)
intros.
(* Goal: @eq Word (cons x1 w1) (cons x2 w2) *)
rewrite H0.
(* Goal: @eq Word (cons x1 w2) (cons x2 w2) *)
rewrite H.
(* Goal: @eq Word (cons x2 w2) (cons x2 w2) *)
auto.
Qed.
Hint Resolve cons_cons.
Definition fun_consaw_a (w : Word) : Elt :=
match w return Elt with
| nil =>
zero
| cons a w' => a
end.
Definition fun_consaw_w (w : Word) : Word :=
match w return Word with
| nil =>
nil
| cons a w' => w'
end.
Lemma cons_cons_inv :
forall (x1 x2 : Elt) (w1 w2 : Word),
cons x1 w1 = cons x2 w2 -> x1 = x2 /\ w1 = w2.
Proof.
(* Goal: forall (x1 x2 : Elt) (w1 w2 : Word) (_ : @eq Word (cons x1 w1) (cons x2 w2)), and (@eq Elt x1 x2) (@eq Word w1 w2) *)
intros.
(* Goal: and (@eq Elt x1 x2) (@eq Word w1 w2) *)
split.
(* Goal: @eq Word w1 w2 *)
(* Goal: @eq Elt x1 x2 *)
replace x1 with (fun_consaw_a (cons x1 w1)); auto.
(* Goal: @eq Word w1 w2 *)
(* Goal: @eq Elt (fun_consaw_a (cons x1 w1)) x2 *)
replace x2 with (fun_consaw_a (cons x2 w2)); auto.
(* Goal: @eq Word w1 w2 *)
(* Goal: @eq Elt (fun_consaw_a (cons x1 w1)) (fun_consaw_a (cons x2 w2)) *)
apply (f_equal (A:=Word) (B:=Elt)); auto.
(* Goal: @eq Word w1 w2 *)
replace w1 with (fun_consaw_w (cons x1 w1)); auto.
(* Goal: @eq Word (fun_consaw_w (cons x1 w1)) w2 *)
replace w2 with (fun_consaw_w (cons x2 w2)); auto.
(* Goal: @eq Word (fun_consaw_w (cons x1 w1)) (fun_consaw_w (cons x2 w2)) *)
apply (f_equal (A:=Word) (B:=Word)); auto.
Qed.
Hint Resolve cons_cons_inv.
Lemma cons_cons_inv1 :
forall (x1 x2 : Elt) (w1 w2 : Word),
cons x1 w1 = cons x2 w2 :>Word -> x1 = x2 :>Elt.
Proof.
(* Goal: forall (x1 x2 : Elt) (w1 w2 : Word) (_ : @eq Word (cons x1 w1) (cons x2 w2)), @eq Elt x1 x2 *)
intros.
(* Goal: @eq Elt x1 x2 *)
cut (x1 = x2 :>Elt /\ w1 = w2 :>Word); [ intuition | auto ].
Qed.
Lemma cons_cons_inv2 :
forall (x1 x2 : Elt) (w1 w2 : Word), cons x1 w1 = cons x2 w2 -> w1 = w2.
Proof.
(* Goal: forall (x1 x2 : Elt) (w1 w2 : Word) (_ : @eq Word (cons x1 w1) (cons x2 w2)), @eq Word w1 w2 *)
intros.
(* Goal: @eq Word w1 w2 *)
cut (x1 = x2 /\ w1 = w2); [ intuition | auto ].
Qed.
Lemma nil_or_cons :
forall w : Word,
w = nil \/ (exists x : Elt, (exists w0 : Word, w = cons x w0)).
Proof.
(* Goal: forall w : Word, or (@eq Word w nil) (@ex Elt (fun x : Elt => @ex Word (fun w0 : Word => @eq Word w (cons x w0)))) *)
simple induction w.
(* Goal: forall (e : Elt) (w : Word) (_ : or (@eq Word w nil) (@ex Elt (fun x : Elt => @ex Word (fun w0 : Word => @eq Word w (cons x w0))))), or (@eq Word (cons e w) nil) (@ex Elt (fun x : Elt => @ex Word (fun w0 : Word => @eq Word (cons e w) (cons x w0)))) *)
(* Goal: or (@eq Word nil nil) (@ex Elt (fun x : Elt => @ex Word (fun w0 : Word => @eq Word nil (cons x w0)))) *)
left; auto.
(* Goal: forall (e : Elt) (w : Word) (_ : or (@eq Word w nil) (@ex Elt (fun x : Elt => @ex Word (fun w0 : Word => @eq Word w (cons x w0))))), or (@eq Word (cons e w) nil) (@ex Elt (fun x : Elt => @ex Word (fun w0 : Word => @eq Word (cons e w) (cons x w0)))) *)
intros x w0 H.
(* Goal: or (@eq Word (cons x w0) nil) (@ex Elt (fun x0 : Elt => @ex Word (fun w1 : Word => @eq Word (cons x w0) (cons x0 w1)))) *)
right.
(* Goal: @ex Elt (fun x0 : Elt => @ex Word (fun w1 : Word => @eq Word (cons x w0) (cons x0 w1))) *)
exists x.
(* Goal: @ex Word (fun w1 : Word => @eq Word (cons x w0) (cons x w1)) *)
exists w0.
(* Goal: @eq Word (cons x w0) (cons x w0) *)
auto.
Qed.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_extension.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_interior5 :
forall A B C D a b c d,
BetS A B C -> BetS a b c -> Cong A B a b -> Cong B C b c -> Cong A D a d -> Cong C D c d ->
Cong B D b d.
Proof.
(* Goal: forall (A B C D a b c d : @Point Ax0) (_ : @BetS Ax0 A B C) (_ : @BetS Ax0 a b c) (_ : @Cong Ax0 A B a b) (_ : @Cong Ax0 B C b c) (_ : @Cong Ax0 A D a d) (_ : @Cong Ax0 C D c d), @Cong Ax0 B D b d *)
intros.
(* Goal: @Cong Ax0 B D b d *)
assert (neq B C) by (forward_using lemma_betweennotequal).
(* Goal: @Cong Ax0 B D b d *)
assert (neq A C) by (forward_using lemma_betweennotequal).
(* Goal: @Cong Ax0 B D b d *)
assert (~ eq C A).
(* Goal: @Cong Ax0 B D b d *)
(* Goal: not (@eq Ax0 C A) *)
{
(* Goal: not (@eq Ax0 C A) *)
intro.
(* Goal: False *)
assert (eq A C) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
contradict.
(* BG Goal: @Cong Ax0 B D b d *)
}
(* Goal: @Cong Ax0 B D b d *)
let Tf:=fresh in assert (Tf:exists M, (BetS C A M /\ Cong A M B C)) by (conclude lemma_extension);destruct Tf as [M];spliter.
(* Goal: @Cong Ax0 B D b d *)
assert (Cong A M M A) by (conclude cn_equalityreverse).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong M A A M) by (conclude lemma_congruencesymmetric).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong M A B C) by (conclude lemma_congruencetransitive).
(* Goal: @Cong Ax0 B D b d *)
assert (neq b c) by (conclude axiom_nocollapse).
(* Goal: @Cong Ax0 B D b d *)
assert (neq a c) by (forward_using lemma_betweennotequal).
(* Goal: @Cong Ax0 B D b d *)
assert (~ eq c a).
(* Goal: @Cong Ax0 B D b d *)
(* Goal: not (@eq Ax0 c a) *)
{
(* Goal: not (@eq Ax0 c a) *)
intro.
(* Goal: False *)
assert (eq a c) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
contradict.
(* BG Goal: @Cong Ax0 B D b d *)
}
(* Goal: @Cong Ax0 B D b d *)
let Tf:=fresh in assert (Tf:exists m, (BetS c a m /\ Cong a m b c)) by (conclude lemma_extension);destruct Tf as [m];spliter.
(* Goal: @Cong Ax0 B D b d *)
assert (Cong m a a m) by (conclude cn_equalityreverse).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong m a b c) by (conclude lemma_congruencetransitive).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong b c m a) by (conclude lemma_congruencesymmetric).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong B C m a) by (conclude lemma_congruencetransitive).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong M A m a) by (conclude lemma_congruencetransitive).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong A C a c) by (conclude cn_sumofparts).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong c a C A) by (forward_using lemma_doublereverse).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong C A c a) by (conclude lemma_congruencesymmetric).
(* Goal: @Cong Ax0 B D b d *)
assert (BetS C B A) by (conclude axiom_betweennesssymmetry).
(* Goal: @Cong Ax0 B D b d *)
assert (BetS B A M) by (conclude lemma_3_6a).
(* Goal: @Cong Ax0 B D b d *)
assert (BetS c b a) by (conclude axiom_betweennesssymmetry).
(* Goal: @Cong Ax0 B D b d *)
assert (BetS b a m) by (conclude lemma_3_6a).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong A M a m) by (forward_using lemma_congruenceflip).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong D M d m) by (conclude axiom_5_line).
(* Goal: @Cong Ax0 B D b d *)
assert (BetS m a b) by (conclude axiom_betweennesssymmetry).
(* Goal: @Cong Ax0 B D b d *)
assert (BetS M A B) by (conclude axiom_betweennesssymmetry).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong M D m d) by (forward_using lemma_congruenceflip).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong D B d b) by (conclude axiom_5_line).
(* Goal: @Cong Ax0 B D b d *)
assert (Cong B D b d) by (forward_using lemma_congruenceflip).
(* Goal: @Cong Ax0 B D b d *)
close.
Qed.
End Euclid.
|
Require Import Le.
Require Import Lt.
Require Import Ensf.
Require Export Arith.Max.
Definition Z (x : Elt) : nat := match x with
| natural n => S n
| _ => 0
end.
Fixpoint sup (e : Ensf) : nat :=
match e with
| empty => 0
| add x f => max (Z x) (sup f)
end.
Lemma sup_add :
forall (x : Elt) (e : Ensf), sup (add x e) = max (Z x) (sup e) :>nat.
Proof.
(* Goal: forall (x : Elt) (e : Ensf), @eq nat (sup (add x e)) (PeanoNat.Nat.max (Z x) (sup e)) *)
intros x.
(* Goal: forall e : Ensf, @eq nat (sup (add x e)) (PeanoNat.Nat.max (Z x) (sup e)) *)
simple induction e; auto.
Qed.
Hint Resolve sup_add.
Lemma elt_not_sym : forall a b : Elt, a <> b :>Elt -> b <> a :>Elt.
Proof.
(* Goal: forall (a b : Elt) (_ : not (@eq Elt a b)), not (@eq Elt b a) *)
auto.
Qed.
Lemma lt_n_Z : forall n : nat, n < Z (natural n).
Proof.
(* Goal: forall n : nat, lt n (Z (natural n)) *)
intro.
(* Goal: lt n (Z (natural n)) *)
replace (Z (natural n)) with (S n); auto.
Qed.
Lemma lt_n_sup : forall (x : Ensf) (n : nat), dans (natural n) x -> n < sup x.
Lemma sup_out : forall x : Ensf, ~ dans (natural (sup x)) x.
Proof.
(* Goal: forall x : Ensf, not (dans (natural (sup x)) x) *)
intro.
(* Goal: not (dans (natural (sup x)) x) *)
red in |- *.
(* Goal: forall _ : dans (natural (sup x)) x, False *)
intro.
(* Goal: False *)
cut (sup x < sup x).
(* Goal: lt (sup x) (sup x) *)
(* Goal: forall _ : lt (sup x) (sup x), False *)
change (~ sup x < sup x) in |- *.
(* Goal: lt (sup x) (sup x) *)
(* Goal: not (lt (sup x) (sup x)) *)
apply lt_irrefl.
(* Goal: lt (sup x) (sup x) *)
apply lt_n_sup.
(* Goal: dans (natural (sup x)) x *)
assumption.
Qed.
Lemma exist_other : forall e : Ensf, exists x : Elt, ~ dans x e.
Proof.
(* Goal: forall e : Ensf, @ex Elt (fun x : Elt => not (dans x e)) *)
intro.
(* Goal: @ex Elt (fun x : Elt => not (dans x e)) *)
exists (natural (sup e)).
(* Goal: not (dans (natural (sup e)) e) *)
apply sup_out.
Qed.
|
Require Export GeoCoq.Tarski_dev.Ch04_cong_bet.
Section T4_1.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma col_permutation_1 : forall A B C,Col A B C -> Col B C A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C), @Col Tn B C A *)
unfold Col.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))), or (@Bet Tn B C A) (or (@Bet Tn C A B) (@Bet Tn A B C)) *)
intros.
(* Goal: or (@Bet Tn B C A) (or (@Bet Tn C A B) (@Bet Tn A B C)) *)
intuition.
Qed.
Lemma col_permutation_2 : forall A B C, Col A B C -> Col C A B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C), @Col Tn C A B *)
unfold Col.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))), or (@Bet Tn C A B) (or (@Bet Tn A B C) (@Bet Tn B C A)) *)
intros.
(* Goal: or (@Bet Tn C A B) (or (@Bet Tn A B C) (@Bet Tn B C A)) *)
intuition.
Qed.
Lemma col_permutation_3 : forall A B C, Col A B C -> Col C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C), @Col Tn C B A *)
unfold Col.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))), or (@Bet Tn C B A) (or (@Bet Tn B A C) (@Bet Tn A C B)) *)
intros.
(* Goal: or (@Bet Tn C B A) (or (@Bet Tn B A C) (@Bet Tn A C B)) *)
intuition.
Qed.
Lemma col_permutation_4 : forall A B C, Col A B C -> Col B A C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C), @Col Tn B A C *)
unfold Col.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))), or (@Bet Tn B A C) (or (@Bet Tn A C B) (@Bet Tn C B A)) *)
intros.
(* Goal: or (@Bet Tn B A C) (or (@Bet Tn A C B) (@Bet Tn C B A)) *)
intuition.
Qed.
Lemma col_permutation_5 : forall A B C, Col A B C -> Col A C B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C), @Col Tn A C B *)
unfold Col.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))), or (@Bet Tn A C B) (or (@Bet Tn C B A) (@Bet Tn B A C)) *)
intros.
(* Goal: or (@Bet Tn A C B) (or (@Bet Tn C B A) (@Bet Tn B A C)) *)
intuition.
Qed.
End T4_1.
Hint Resolve bet_col col_permutation_1 col_permutation_2
col_permutation_3 col_permutation_4 col_permutation_5 : col.
Ltac Col := auto 3 with col.
Ltac Col5 := auto with col.
Section T4_2.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma not_col_permutation_1 :
forall (A B C : Tpoint), ~ Col A B C -> ~ Col B C A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), not (@Col Tn B C A) *)
intros.
(* Goal: not (@Col Tn B C A) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @Col Tn A B C *)
Col.
Qed.
Lemma not_col_permutation_2 :
forall (A B C : Tpoint), ~ Col A B C -> ~ Col C A B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), not (@Col Tn C A B) *)
intros.
(* Goal: not (@Col Tn C A B) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @Col Tn A B C *)
Col.
Qed.
Lemma not_col_permutation_3 :
forall (A B C : Tpoint), ~ Col A B C -> ~ Col C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), not (@Col Tn C B A) *)
intros.
(* Goal: not (@Col Tn C B A) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @Col Tn A B C *)
Col.
Qed.
Lemma not_col_permutation_4 :
forall (A B C : Tpoint), ~ Col A B C -> ~ Col B A C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), not (@Col Tn B A C) *)
intros.
(* Goal: not (@Col Tn B A C) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @Col Tn A B C *)
Col.
Qed.
Lemma not_col_permutation_5 :
forall (A B C : Tpoint), ~ Col A B C -> ~ Col A C B.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), not (@Col Tn A C B) *)
intros.
(* Goal: not (@Col Tn A C B) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @Col Tn A B C *)
Col.
Qed.
End T4_2.
Hint Resolve not_col_permutation_1 not_col_permutation_2
not_col_permutation_3 not_col_permutation_4 not_col_permutation_5 : col.
Section T4_3.
Context `{Tn:Tarski_neutral_dimensionless}.
Lemma Col_cases :
forall A B C,
Col A B C \/ Col A C B \/ Col B A C \/
Col B C A \/ Col C A B \/ Col C B A ->
Col A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (@Col Tn A B C) (or (@Col Tn A C B) (or (@Col Tn B A C) (or (@Col Tn B C A) (or (@Col Tn C A B) (@Col Tn C B A)))))), @Col Tn A B C *)
intros.
(* Goal: @Col Tn A B C *)
decompose [or] H; Col.
Qed.
Lemma Col_perm :
forall A B C,
Col A B C ->
Col A B C /\ Col A C B /\ Col B A C /\
Col B C A /\ Col C A B /\ Col C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : @Col Tn A B C), and (@Col Tn A B C) (and (@Col Tn A C B) (and (@Col Tn B A C) (and (@Col Tn B C A) (and (@Col Tn C A B) (@Col Tn C B A))))) *)
intros.
(* Goal: and (@Col Tn A B C) (and (@Col Tn A C B) (and (@Col Tn B A C) (and (@Col Tn B C A) (and (@Col Tn C A B) (@Col Tn C B A))))) *)
repeat split; Col.
Qed.
Lemma col_trivial_1 : forall A B, Col A A B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @Col Tn A A B *)
unfold Col.
(* Goal: forall A B : @Tpoint Tn, or (@Bet Tn A A B) (or (@Bet Tn A B A) (@Bet Tn B A A)) *)
intros.
(* Goal: or (@Bet Tn A A B) (or (@Bet Tn A B A) (@Bet Tn B A A)) *)
Between.
Qed.
Lemma col_trivial_2 : forall A B, Col A B B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @Col Tn A B B *)
unfold Col.
(* Goal: forall A B : @Tpoint Tn, or (@Bet Tn A B B) (or (@Bet Tn B B A) (@Bet Tn B A B)) *)
intros.
(* Goal: or (@Bet Tn A B B) (or (@Bet Tn B B A) (@Bet Tn B A B)) *)
Between.
Qed.
Lemma col_trivial_3 : forall A B, Col A B A.
Proof.
(* Goal: forall A B : @Tpoint Tn, @Col Tn A B A *)
unfold Col.
(* Goal: forall A B : @Tpoint Tn, or (@Bet Tn A B A) (or (@Bet Tn B A A) (@Bet Tn A A B)) *)
intros.
(* Goal: or (@Bet Tn A B A) (or (@Bet Tn B A A) (@Bet Tn A A B)) *)
right;Between.
Qed.
End T4_3.
Hint Immediate col_trivial_1 col_trivial_2 col_trivial_3: col.
Section T4_4.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma l4_13 : forall A B C A' B' C',
Col A B C -> Cong_3 A B C A' B' C' -> Col A' B' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Cong_3 Tn A B C A' B' C'), @Col Tn A' B' C' *)
unfold Col.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))) (_ : @Cong_3 Tn A B C A' B' C'), or (@Bet Tn A' B' C') (or (@Bet Tn B' C' A') (@Bet Tn C' A' B')) *)
intros.
(* Goal: or (@Bet Tn A' B' C') (or (@Bet Tn B' C' A') (@Bet Tn C' A' B')) *)
decompose [or] H; eauto 6 using l4_6 with cong3.
Qed.
Lemma l4_14 : forall A B C A' B',
Col A B C -> Cong A B A' B' -> exists C', Cong_3 A B C A' B' C'.
Proof.
(* Goal: forall (A B C A' B' : @Tpoint Tn) (_ : @Col Tn A B C) (_ : @Cong Tn A B A' B'), @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
unfold Col.
(* Goal: forall (A B C A' B' : @Tpoint Tn) (_ : or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))) (_ : @Cong Tn A B A' B'), @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
intuition.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
prolong A' B' C' B C.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
exists C'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @Cong_3 Tn A B C A' B' C' *)
assert (Cong A C A' C') by (eapply l2_11;eCong).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @Cong_3 Tn A B C A' B' C' *)
unfold Cong_3;intuition.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
assert (exists C', Bet A' C' B' /\ Cong_3 A C B A' C' B') by (eapply l4_5;Between).
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
ex_and H1 C'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
exists C'.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
(* Goal: @Cong_3 Tn A B C A' B' C' *)
auto with cong3.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
prolong B' A' C' A C.
(* Goal: @ex (@Tpoint Tn) (fun C' : @Tpoint Tn => @Cong_3 Tn A B C A' B' C') *)
exists C'.
(* Goal: @Cong_3 Tn A B C A' B' C' *)
assert (Cong B C B' C') by (eapply l2_11;eBetween;Cong).
(* Goal: @Cong_3 Tn A B C A' B' C' *)
unfold Cong_3;intuition.
Qed.
Lemma l4_16 : forall A B C D A' B' C' D',
FSC A B C D A' B' C' D' -> A<>B -> Cong C D C' D'.
Proof.
(* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : @FSC Tn A B C D A' B' C' D') (_ : not (@eq (@Tpoint Tn) A B)), @Cong Tn C D C' D' *)
unfold FSC.
(* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : and (@Col Tn A B C) (and (@Cong_3 Tn A B C A' B' C') (and (@Cong Tn A D A' D') (@Cong Tn B D B' D')))) (_ : not (@eq (@Tpoint Tn) A B)), @Cong Tn C D C' D' *)
unfold Col.
(* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : and (or (@Bet Tn A B C) (or (@Bet Tn B C A) (@Bet Tn C A B))) (and (@Cong_3 Tn A B C A' B' C') (and (@Cong Tn A D A' D') (@Cong Tn B D B' D')))) (_ : not (@eq (@Tpoint Tn) A B)), @Cong Tn C D C' D' *)
intros.
(* Goal: @Cong Tn C D C' D' *)
decompose [or and] H; clear H.
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
assert (Bet A' B' C') by (eapply l4_6;eauto).
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
unfold Cong_3 in *; spliter.
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
assert(OFSC A B C D A' B' C' D') by (unfold OFSC;repeat split; assumption).
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
eapply five_segment_with_def; eauto.
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
assert(Bet B' C' A') by (apply (l4_6 B C A B' C' A'); Cong;auto with cong3).
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @Cong Tn C D C' D' *)
apply (l4_2 B C A D B' C' A' D').
(* Goal: @Cong Tn C D C' D' *)
(* Goal: @IFSC Tn B C A D B' C' A' D' *)
unfold IFSC; unfold Cong_3 in *; spliter; repeat split;Between;Cong.
(* Goal: @Cong Tn C D C' D' *)
assert (Bet C' A' B') by (eapply (l4_6 C A B C' A' B'); auto with cong3).
(* Goal: @Cong Tn C D C' D' *)
eapply (five_segment_with_def B A C D B' A'); unfold OFSC; unfold Cong_3 in *; spliter; repeat split; Between; Cong.
Qed.
Lemma l4_17 : forall A B C P Q,
A<>B -> Col A B C -> Cong A P A Q -> Cong B P B Q -> Cong C P C Q.
Proof.
(* Goal: forall (A B C P Q : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Col Tn A B C) (_ : @Cong Tn A P A Q) (_ : @Cong Tn B P B Q), @Cong Tn C P C Q *)
intros.
(* Goal: @Cong Tn C P C Q *)
assert (FSC A B C P A B C Q) by (unfold FSC; unfold Cong_3;repeat split; Cong).
(* Goal: @Cong Tn C P C Q *)
eapply l4_16; eauto.
Qed.
Lemma l4_18 : forall A B C C',
A<>B -> Col A B C -> Cong A C A C' -> Cong B C B C' -> C=C'.
Proof.
(* Goal: forall (A B C C' : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Col Tn A B C) (_ : @Cong Tn A C A C') (_ : @Cong Tn B C B C'), @eq (@Tpoint Tn) C C' *)
intros.
(* Goal: @eq (@Tpoint Tn) C C' *)
apply cong_identity with C.
(* Goal: @Cong Tn C C' C C *)
apply (l4_17 A B); Cong.
Qed.
Lemma l4_19 : forall A B C C',
Bet A C B -> Cong A C A C' -> Cong B C B C' -> C=C'.
Proof.
(* Goal: forall (A B C C' : @Tpoint Tn) (_ : @Bet Tn A C B) (_ : @Cong Tn A C A C') (_ : @Cong Tn B C B C'), @eq (@Tpoint Tn) C C' *)
intros.
(* Goal: @eq (@Tpoint Tn) C C' *)
induction (eq_dec_points A B).
(* Goal: @eq (@Tpoint Tn) C C' *)
(* Goal: @eq (@Tpoint Tn) C C' *)
treat_equalities; reflexivity.
(* Goal: @eq (@Tpoint Tn) C C' *)
apply (l4_18 A B); Cong.
(* Goal: @Col Tn A B C *)
auto using bet_col with col.
Qed.
Lemma not_col_distincts : forall A B C ,
~ Col A B C ->
~ Col A B C /\ A <> B /\ B <> C /\ A <> C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (not (@eq (@Tpoint Tn) A C)))) *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@eq (@Tpoint Tn) A B)) (and (not (@eq (@Tpoint Tn) B C)) (not (@eq (@Tpoint Tn) A C)))) *)
repeat split;(auto;intro); subst; apply H; Col.
Qed.
Lemma NCol_cases :
forall A B C,
~ Col A B C \/ ~ Col A C B \/ ~ Col B A C \/
~ Col B C A \/ ~ Col C A B \/ ~ Col C B A ->
~ Col A B C.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : or (not (@Col Tn A B C)) (or (not (@Col Tn A C B)) (or (not (@Col Tn B A C)) (or (not (@Col Tn B C A)) (or (not (@Col Tn C A B)) (not (@Col Tn C B A))))))), not (@Col Tn A B C) *)
intros.
(* Goal: not (@Col Tn A B C) *)
decompose [or] H; Col.
Qed.
Lemma NCol_perm :
forall A B C,
~ Col A B C ->
~ Col A B C /\ ~ Col A C B /\ ~ Col B A C /\
~ Col B C A /\ ~ Col C A B /\ ~ Col C B A.
Proof.
(* Goal: forall (A B C : @Tpoint Tn) (_ : not (@Col Tn A B C)), and (not (@Col Tn A B C)) (and (not (@Col Tn A C B)) (and (not (@Col Tn B A C)) (and (not (@Col Tn B C A)) (and (not (@Col Tn C A B)) (not (@Col Tn C B A)))))) *)
intros.
(* Goal: and (not (@Col Tn A B C)) (and (not (@Col Tn A C B)) (and (not (@Col Tn B A C)) (and (not (@Col Tn B C A)) (and (not (@Col Tn C A B)) (not (@Col Tn C B A)))))) *)
repeat split; Col.
Qed.
Lemma col_cong_3_cong_3_eq : forall A B C A' B' C1 C2,
A <>B -> Col A B C -> Cong_3 A B C A' B' C1 -> Cong_3 A B C A' B' C2 -> C1 = C2.
Proof.
(* Goal: forall (A B C A' B' C1 C2 : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Col Tn A B C) (_ : @Cong_3 Tn A B C A' B' C1) (_ : @Cong_3 Tn A B C A' B' C2), @eq (@Tpoint Tn) C1 C2 *)
intros A B C A' B' C1 C2 HAB HCol HCong1 HCong2.
(* Goal: @eq (@Tpoint Tn) C1 C2 *)
apply l4_18 with A' B'; try apply l4_13 with A B C; Col; unfold Cong_3 in *; spliter.
(* Goal: @Cong Tn B' C1 B' C2 *)
(* Goal: @Cong Tn A' C1 A' C2 *)
(* Goal: not (@eq (@Tpoint Tn) A' B') *)
intro; treat_equalities; intuition.
(* Goal: @Cong Tn B' C1 B' C2 *)
(* Goal: @Cong Tn A' C1 A' C2 *)
apply cong_transitivity with A C; Cong.
(* Goal: @Cong Tn B' C1 B' C2 *)
apply cong_transitivity with B C; Cong.
Qed.
End T4_4.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_34.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct.
Require Export GeoCoq.Elements.OriginalProofs.lemma_equaltorightisright.
Require Export GeoCoq.Elements.OriginalProofs.proposition_29C.
Require Export GeoCoq.Elements.OriginalProofs.lemma_supplementofright.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma lemma_PGrectangle :
forall A B C D,
PG A C D B -> Per B A C ->
RE A C D B.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @PG Ax0 A C D B) (_ : @Per Ax0 B A C), @RE Ax0 A C D B *)
intros.
(* Goal: @RE Ax0 A C D B *)
assert ((Cong A B C D /\ Cong A C B D /\ CongA C A B B D C /\ CongA A B D D C A /\ Cong_3 C A B B D C)) by (conclude proposition_34).
(* Goal: @RE Ax0 A C D B *)
assert (Par A C D B) by (conclude_def PG ).
(* Goal: @RE Ax0 A C D B *)
assert (nCol A C B) by (forward_using lemma_parallelNC).
(* Goal: @RE Ax0 A C D B *)
assert (nCol A B C) by (forward_using lemma_NCorder).
(* Goal: @RE Ax0 A C D B *)
assert (nCol C A B) by (forward_using lemma_NCorder).
(* Goal: @RE Ax0 A C D B *)
assert (CongA C A B B A C) by (conclude lemma_ABCequalsCBA).
(* Goal: @RE Ax0 A C D B *)
assert (Per C A B) by (conclude lemma_8_2).
(* Goal: @RE Ax0 A C D B *)
assert (neq A B) by (forward_using lemma_NCdistinct).
(* Goal: @RE Ax0 A C D B *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: @RE Ax0 A C D B *)
assert (CongA B A C C A B) by (conclude lemma_equalanglessymmetric).
(* Goal: @RE Ax0 A C D B *)
assert (CongA B A C B D C) by (conclude lemma_equalanglestransitive).
(* Goal: @RE Ax0 A C D B *)
assert (CongA B D C B A C) by (conclude lemma_equalanglessymmetric).
(* Goal: @RE Ax0 A C D B *)
assert (Per B D C) by (conclude lemma_equaltorightisright).
(* Goal: @RE Ax0 A C D B *)
assert (Per C D B) by (conclude lemma_8_2).
(* Goal: @RE Ax0 A C D B *)
assert (Par A C B D) by (forward_using lemma_parallelflip).
(* Goal: @RE Ax0 A C D B *)
assert (Par A B C D) by (conclude_def PG ).
(* Goal: @RE Ax0 A C D B *)
assert (TP A B C D) by (conclude lemma_paralleldef2B).
(* Goal: @RE Ax0 A C D B *)
assert (OS C D A B) by (conclude_def TP ).
(* Goal: @RE Ax0 A C D B *)
assert (neq C A) by (forward_using lemma_NCdistinct).
(* Goal: @RE Ax0 A C D B *)
let Tf:=fresh in assert (Tf:exists E, (BetS B A E /\ Cong A E A B)) by (conclude lemma_extension);destruct Tf as [E];spliter.
(* Goal: @RE Ax0 A C D B *)
assert (BetS E A B) by (conclude axiom_betweennesssymmetry).
(* Goal: @RE Ax0 A C D B *)
assert (RT C A B A B D) by (conclude proposition_29C).
(* Goal: @RE Ax0 A C D B *)
let Tf:=fresh in assert (Tf:exists p q r s t, (Supp p q r s t /\ CongA C A B p q r /\ CongA A B D s q t)) by (conclude_def RT );destruct Tf as [p[q[r[s[t]]]]];spliter.
(* Goal: @RE Ax0 A C D B *)
assert (CongA p q r C A B) by (conclude lemma_equalanglessymmetric).
(* Goal: @RE Ax0 A C D B *)
assert (Per p q r) by (conclude lemma_equaltorightisright).
(* Goal: @RE Ax0 A C D B *)
assert (Per s q t) by (conclude lemma_supplementofright).
(* Goal: @RE Ax0 A C D B *)
assert (CongA s q t A B D) by (conclude lemma_equalanglessymmetric).
(* Goal: @RE Ax0 A C D B *)
assert (Per A B D) by (conclude lemma_equaltorightisright).
(* Goal: @RE Ax0 A C D B *)
assert (Per D B A) by (conclude lemma_8_2).
(* Goal: @RE Ax0 A C D B *)
assert (CongA D C A A B D) by (conclude lemma_equalanglessymmetric).
(* Goal: @RE Ax0 A C D B *)
assert (Per D C A) by (conclude lemma_equaltorightisright).
(* Goal: @RE Ax0 A C D B *)
assert (Per A C D) by (conclude lemma_8_2).
(* Goal: @RE Ax0 A C D B *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M D /\ BetS C M B)) by (conclude lemma_diagonalsmeet);destruct Tf as [M];spliter.
(* Goal: @RE Ax0 A C D B *)
assert (neq A D) by (forward_using lemma_betweennotequal).
(* Goal: @RE Ax0 A C D B *)
assert (neq C B) by (forward_using lemma_betweennotequal).
(* Goal: @RE Ax0 A C D B *)
assert (CR A D C B) by (conclude_def CR ).
(* Goal: @RE Ax0 A C D B *)
assert (RE A C D B) by (conclude_def RE ).
(* Goal: @RE Ax0 A C D B *)
close.
Qed.
End Euclid.
|
Require Import ZArith.
Require Import EqNat.
Require Import lemmas.
Lemma abs_opp : forall x : Z, Zabs_nat x = Zabs_nat (- x).
Proof.
(* Goal: forall x : Z, @eq nat (Z.abs_nat x) (Z.abs_nat (Z.opp x)) *)
simple induction x.
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zneg p)) (Z.abs_nat (Z.opp (Zneg p))) *)
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zpos p)) (Z.abs_nat (Z.opp (Zpos p))) *)
(* Goal: @eq nat (Z.abs_nat Z0) (Z.abs_nat (Z.opp Z0)) *)
simpl in |- *.
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zneg p)) (Z.abs_nat (Z.opp (Zneg p))) *)
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zpos p)) (Z.abs_nat (Z.opp (Zpos p))) *)
(* Goal: @eq nat O O *)
reflexivity.
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zneg p)) (Z.abs_nat (Z.opp (Zneg p))) *)
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zpos p)) (Z.abs_nat (Z.opp (Zpos p))) *)
simpl in |- *.
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zneg p)) (Z.abs_nat (Z.opp (Zneg p))) *)
(* Goal: forall p : positive, @eq nat (Pos.to_nat p) (Pos.to_nat p) *)
reflexivity.
(* Goal: forall p : positive, @eq nat (Z.abs_nat (Zneg p)) (Z.abs_nat (Z.opp (Zneg p))) *)
simpl in |- *.
(* Goal: forall p : positive, @eq nat (Pos.to_nat p) (Pos.to_nat p) *)
reflexivity.
Qed.
Lemma inj_abs_pos : forall x : Z, (x >= 0)%Z -> Z_of_nat (Zabs_nat x) = x.
Proof.
(* Goal: forall (x : Z) (_ : Z.ge x Z0), @eq Z (Z.of_nat (Z.abs_nat x)) x *)
simple induction x.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: forall (p : positive) (_ : Z.ge (Zpos p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zpos p))) (Zpos p) *)
(* Goal: forall _ : Z.ge Z0 Z0, @eq Z (Z.of_nat (Z.abs_nat Z0)) Z0 *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: forall (p : positive) (_ : Z.ge (Zpos p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zpos p))) (Zpos p) *)
intros.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Z.abs_nat (Zpos p))) (Zpos p) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat p)) (Zpos p) *)
induction p as [p Hrecp| p Hrecp| ].
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xI p))) (Zpos (xI p)) *)
rewrite BinInt.Zpos_xI.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xI p))) (Z.add (Z.mul (Zpos (xO xH)) (Zpos p)) (Zpos xH)) *)
rewrite <- Hrecp.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xI p))) (Z.add (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) (Zpos xH)) *)
replace (nat_of_P (xI p)) with (S (2 * nat_of_P p)).
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: @eq Z (Z.of_nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p)))) (Z.add (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) (Zpos xH)) *)
rewrite Znat.inj_S.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: @eq Z (Z.succ (Z.of_nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)))) (Z.add (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) (Zpos xH)) *)
rewrite Znat.inj_mult.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: @eq Z (Z.succ (Z.mul (Z.of_nat (S (S O))) (Z.of_nat (Pos.to_nat p)))) (Z.add (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) (Zpos xH)) *)
rewrite Hrecp.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq Z (Z.succ (Z.mul (Z.of_nat (S (S O))) (Zpos p))) (Z.add (Z.mul (Zpos (xO xH)) (Zpos p)) (Zpos xH)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq Z (Zpos (xI p)) (Zpos (xI p)) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
apply Zle_ge.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
(* Goal: Z.le Z0 (Zpos p) *)
apply Zorder.Zle_0_pos.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (S (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
replace 2 with (nat_of_P 2).
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (S (Init.Nat.mul (Pos.to_nat (xO xH)) (Pos.to_nat p))) (Pos.to_nat (xI p)) *)
rewrite <- nat_of_P_mult_morphism.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (S (Pos.to_nat (Pos.mul (xO xH) p))) (Pos.to_nat (xI p)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (S (Pos.to_nat (xO p))) (Pos.to_nat (xI p)) *)
rewrite <- nat_of_P_o_P_of_succ_nat_eq_succ.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (Pos.to_nat (Pos.of_succ_nat (Pos.to_nat (xO p)))) (Pos.to_nat (xI p)) *)
rewrite P_of_succ_nat_o_nat_of_P_eq_succ.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (Pos.to_nat (Pos.succ (xO p))) (Pos.to_nat (xI p)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (Pos.to_nat (xI p)) (Pos.to_nat (xI p)) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
apply Zle_ge.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
(* Goal: Z.le Z0 (Zpos p) *)
apply Zorder.Zle_0_pos.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Zpos (xO p)) *)
rewrite BinInt.Zpos_xO.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Z.mul (Zpos (xO xH)) (Zpos p)) *)
rewrite <- Hrecp.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat (xO p))) (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) *)
replace (nat_of_P (xO p)) with (2 * nat_of_P p).
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
(* Goal: @eq Z (Z.of_nat (Init.Nat.mul (S (S O)) (Pos.to_nat p))) (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) *)
rewrite Znat.inj_mult.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
(* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Z.of_nat (Pos.to_nat p))) (Z.mul (Zpos (xO xH)) (Z.of_nat (Pos.to_nat p))) *)
rewrite Hrecp.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Zpos p)) (Z.mul (Zpos (xO xH)) (Zpos p)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq Z (Zpos (xO p)) (Zpos (xO p)) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
(* Goal: Z.ge (Zpos p) Z0 *)
apply Zle_ge.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
(* Goal: Z.le Z0 (Zpos p) *)
apply Zorder.Zle_0_pos.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
replace 2 with (nat_of_P 2).
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (Init.Nat.mul (Pos.to_nat (xO xH)) (Pos.to_nat p)) (Pos.to_nat (xO p)) *)
rewrite <- nat_of_P_mult_morphism.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul (xO xH) p)) (Pos.to_nat (xO p)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
(* Goal: @eq nat (Pos.to_nat (xO p)) (Pos.to_nat (xO p)) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
(* Goal: @eq nat (Pos.to_nat (xO xH)) (S (S O)) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.ge (Zpos p) Z0 *)
apply Zle_ge.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos p) *)
apply Zorder.Zle_0_pos.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
(* Goal: @eq Z (Z.of_nat (Pos.to_nat xH)) (Zpos xH) *)
reflexivity.
(* Goal: forall (p : positive) (_ : Z.ge (Zneg p) Z0), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
intros.
(* Goal: @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *)
elim H.
(* Goal: @eq comparison (Z.compare (Zneg p) Z0) Lt *)
simpl in |- *.
(* Goal: @eq comparison Lt Lt *)
reflexivity.
Qed.
Lemma inj_abs_neg :
forall x : Z, (x < 0)%Z -> Z_of_nat (Zabs_nat x) = (- x)%Z.
Proof.
(* Goal: forall (x : Z) (_ : Z.lt x Z0), @eq Z (Z.of_nat (Z.abs_nat x)) (Z.opp x) *)
intros.
(* Goal: @eq Z (Z.of_nat (Z.abs_nat x)) (Z.opp x) *)
rewrite abs_opp.
(* Goal: @eq Z (Z.of_nat (Z.abs_nat (Z.opp x))) (Z.opp x) *)
apply inj_abs_pos.
(* Goal: Z.ge (Z.opp x) Z0 *)
apply Zle_ge.
(* Goal: Z.le Z0 (Z.opp x) *)
apply Zplus_le_reg_l with x.
(* Goal: Z.le (Z.add x Z0) (Z.add x (Z.opp x)) *)
rewrite <- Zplus_0_r_reverse.
(* Goal: Z.le x (Z.add x (Z.opp x)) *)
rewrite Zplus_opp_r.
(* Goal: Z.le x Z0 *)
apply Zlt_le_weak.
(* Goal: Z.lt x Z0 *)
assumption.
Qed.
Lemma abs_inj : forall n : nat, Zabs_nat (Z_of_nat n) = n.
Proof.
(* Goal: forall n : nat, @eq nat (Z.abs_nat (Z.of_nat n)) n *)
simple induction n.
(* Goal: forall (n : nat) (_ : @eq nat (Z.abs_nat (Z.of_nat n)) n), @eq nat (Z.abs_nat (Z.of_nat (S n))) (S n) *)
(* Goal: @eq nat (Z.abs_nat (Z.of_nat O)) O *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : @eq nat (Z.abs_nat (Z.of_nat n)) n), @eq nat (Z.abs_nat (Z.of_nat (S n))) (S n) *)
(* Goal: @eq nat O O *)
reflexivity.
(* Goal: forall (n : nat) (_ : @eq nat (Z.abs_nat (Z.of_nat n)) n), @eq nat (Z.abs_nat (Z.of_nat (S n))) (S n) *)
intros m IH.
(* Goal: @eq nat (Z.abs_nat (Z.of_nat (S m))) (S m) *)
rewrite <- IH.
(* Goal: @eq nat (Z.abs_nat (Z.of_nat (S (Z.abs_nat (Z.of_nat m))))) (S (Z.abs_nat (Z.of_nat m))) *)
simpl in |- *.
(* Goal: @eq nat (Pos.to_nat (Pos.of_succ_nat (Z.abs_nat (Z.of_nat m)))) (S (Z.abs_nat (Z.of_nat m))) *)
rewrite nat_of_P_o_P_of_succ_nat_eq_succ.
(* Goal: @eq nat (S (Z.abs_nat (Z.of_nat m))) (S (Z.abs_nat (Z.of_nat m))) *)
reflexivity.
Qed.
Lemma abs_mult : forall x y : Z, Zabs_nat (x * y) = Zabs_nat x * Zabs_nat y.
Proof.
(* Goal: forall x y : Z, @eq nat (Z.abs_nat (Z.mul x y)) (Init.Nat.mul (Z.abs_nat x) (Z.abs_nat y)) *)
simple induction x.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zpos p) y)) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
(* Goal: forall y : Z, @eq nat (Z.abs_nat (Z.mul Z0 y)) (Init.Nat.mul (Z.abs_nat Z0) (Z.abs_nat y)) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zpos p) y)) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
(* Goal: forall _ : Z, @eq nat O O *)
intro.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zpos p) y)) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
(* Goal: @eq nat O O *)
reflexivity.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zpos p) y)) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
intro.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall y : Z, @eq nat (Z.abs_nat (Z.mul (Zpos p) y)) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
simple induction y.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat (Z.abs_nat (Z.mul (Zpos p) Z0)) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat Z0)) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat O (Init.Nat.mul (Pos.to_nat p) O) *)
rewrite <- mult_n_O.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat O O *)
reflexivity.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
intro.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
rewrite <- nat_of_P_mult_morphism.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Pos.to_nat (Pos.mul p p0)) *)
reflexivity.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zpos p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall p0 : positive, @eq nat (Pos.to_nat (Pos.mul p p0)) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
intro.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
rewrite <- nat_of_P_mult_morphism.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Pos.to_nat (Pos.mul p p0)) *)
reflexivity.
(* Goal: forall (p : positive) (y : Z), @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
intro.
(* Goal: forall y : Z, @eq nat (Z.abs_nat (Z.mul (Zneg p) y)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
simple induction y.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat (Z.abs_nat (Z.mul (Zneg p) Z0)) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat Z0)) *)
simpl in |- *.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat O (Init.Nat.mul (Pos.to_nat p) O) *)
rewrite <- mult_n_O.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat O O *)
reflexivity.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zpos p0))) *)
intro.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zpos p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zpos p0))) *)
unfold Zabs_nat in |- *.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat match Z.mul (Zneg p) (Zpos p0) with | Z0 => O | Zpos p => Pos.to_nat p | Zneg p => Pos.to_nat p end (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
simpl in |- *.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
rewrite <- nat_of_P_mult_morphism.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Pos.to_nat (Pos.mul p p0)) *)
reflexivity.
(* Goal: forall p0 : positive, @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
intro.
(* Goal: @eq nat (Z.abs_nat (Z.mul (Zneg p) (Zneg p0))) (Init.Nat.mul (Z.abs_nat (Zneg p)) (Z.abs_nat (Zneg p0))) *)
unfold Zabs_nat in |- *.
(* Goal: @eq nat match Z.mul (Zneg p) (Zneg p0) with | Z0 => O | Zpos p => Pos.to_nat p | Zneg p => Pos.to_nat p end (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
simpl in |- *.
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Init.Nat.mul (Pos.to_nat p) (Pos.to_nat p0)) *)
rewrite <- nat_of_P_mult_morphism.
(* Goal: @eq nat (Pos.to_nat (Pos.mul p p0)) (Pos.to_nat (Pos.mul p p0)) *)
reflexivity.
Qed.
Lemma isnat_inj_abs :
forall (x : Z) (n : nat), x = Z_of_nat n -> n = Zabs_nat x.
Proof.
(* Goal: forall (x : Z) (n : nat) (_ : @eq Z x (Z.of_nat n)), @eq nat n (Z.abs_nat x) *)
intros.
(* Goal: @eq nat n (Z.abs_nat x) *)
rewrite H.
(* Goal: @eq nat n (Z.abs_nat (Z.of_nat n)) *)
rewrite abs_inj.
(* Goal: @eq nat n n *)
reflexivity.
Qed.
Lemma isnat_abs_inj :
forall (x : Z) (n : nat), (0 <= x)%Z -> n = Zabs_nat x -> x = Z_of_nat n.
Proof.
(* Goal: forall (x : Z) (n : nat) (_ : Z.le Z0 x) (_ : @eq nat n (Z.abs_nat x)), @eq Z x (Z.of_nat n) *)
intros.
(* Goal: @eq Z x (Z.of_nat n) *)
rewrite H0.
(* Goal: @eq Z x (Z.of_nat (Z.abs_nat x)) *)
rewrite inj_abs_pos.
(* Goal: Z.ge x Z0 *)
(* Goal: @eq Z x x *)
reflexivity.
(* Goal: Z.ge x Z0 *)
apply Zle_ge.
(* Goal: Z.le Z0 x *)
assumption.
Qed.
Lemma isnat_plus : forall x y : Z, (0 <= x)%Z -> (0 <= y)%Z -> (0 <= x + y)%Z.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y), Z.le Z0 (Z.add x y) *)
simple induction x.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zpos p) y) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 Z0) (_ : Z.le Z0 y), Z.le Z0 (Z.add Z0 y) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zpos p) y) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 Z0) (_ : Z.le Z0 y), Z.le Z0 y *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zpos p) y) *)
(* Goal: Z.le Z0 y *)
assumption.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zpos p) y) *)
intro.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zpos p) y) *)
simple induction y.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.add (Zpos p) (Zpos p0)) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), Z.le Z0 (Z.add (Zpos p) Z0) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.add (Zpos p) (Zpos p0)) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), Z.le Z0 (Zpos p) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.add (Zpos p) (Zpos p0)) *)
(* Goal: Z.le Z0 (Zpos p) *)
assumption.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.add (Zpos p) (Zpos p0)) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Zpos (Pos.add p p0)) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: Z.le Z0 (Zpos (Pos.add p p0)) *)
unfold Zle in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: not (@eq comparison (Z.compare Z0 (Zpos (Pos.add p p0))) Gt) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
(* Goal: not (@eq comparison Lt Gt) *)
discriminate.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
unfold Zle in H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: Z.le Z0 (Z.add (Zpos p) (Zneg p0)) *)
elim H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: @eq comparison (Z.compare Z0 (Zneg p0)) Gt *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
(* Goal: @eq comparison Gt Gt *)
reflexivity.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.add (Zneg p) y) *)
intros.
(* Goal: Z.le Z0 (Z.add (Zneg p) y) *)
unfold Zle in H.
(* Goal: Z.le Z0 (Z.add (Zneg p) y) *)
elim H.
(* Goal: @eq comparison (Z.compare Z0 (Zneg p)) Gt *)
simpl in |- *.
(* Goal: @eq comparison Gt Gt *)
reflexivity.
Qed.
Lemma isnat_mult : forall x y : Z, (0 <= x)%Z -> (0 <= y)%Z -> (0 <= x * y)%Z.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y), Z.le Z0 (Z.mul x y) *)
simple induction x.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 Z0) (_ : Z.le Z0 y), Z.le Z0 (Z.mul Z0 y) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 Z0) (_ : Z.le Z0 y), Z.le Z0 Z0 *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
(* Goal: Z.le Z0 Z0 *)
unfold Zle in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
(* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
(* Goal: not (@eq comparison Eq Gt) *)
discriminate.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
intro.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zpos p) y) *)
simple induction y.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.mul (Zpos p) (Zpos p0)) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), Z.le Z0 (Z.mul (Zpos p) Z0) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.mul (Zpos p) (Zpos p0)) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), Z.le Z0 Z0 *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.mul (Zpos p) (Zpos p0)) *)
(* Goal: Z.le Z0 Z0 *)
unfold Zle in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.mul (Zpos p) (Zpos p0)) *)
(* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.mul (Zpos p) (Zpos p0)) *)
(* Goal: not (@eq comparison Eq Gt) *)
discriminate.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Z.mul (Zpos p) (Zpos p0)) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), Z.le Z0 (Zpos (Pos.mul p p0)) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: Z.le Z0 (Zpos (Pos.mul p p0)) *)
unfold Zle in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: not (@eq comparison (Z.compare Z0 (Zpos (Pos.mul p p0))) Gt) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
(* Goal: not (@eq comparison Lt Gt) *)
discriminate.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
unfold Zle in H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: Z.le Z0 (Z.mul (Zpos p) (Zneg p0)) *)
elim H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: @eq comparison (Z.compare Z0 (Zneg p0)) Gt *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
(* Goal: @eq comparison Gt Gt *)
reflexivity.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), Z.le Z0 (Z.mul (Zneg p) y) *)
intros.
(* Goal: Z.le Z0 (Z.mul (Zneg p) y) *)
unfold Zle in H.
(* Goal: Z.le Z0 (Z.mul (Zneg p) y) *)
elim H.
(* Goal: @eq comparison (Z.compare Z0 (Zneg p)) Gt *)
simpl in |- *.
(* Goal: @eq comparison Gt Gt *)
reflexivity.
Qed.
Lemma lezle :
forall x y : Z,
(0 <= x)%Z -> (0 <= y)%Z -> (x <= y)%Z -> Zabs_nat x <= Zabs_nat y.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y) (_ : Z.le x y), le (Z.abs_nat x) (Z.abs_nat y) *)
intros.
(* Goal: le (Z.abs_nat x) (Z.abs_nat y) *)
elim (le_or_lt (Zabs_nat x) (Zabs_nat y)).
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), le (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: forall _ : le (Z.abs_nat x) (Z.abs_nat y), le (Z.abs_nat x) (Z.abs_nat y) *)
intros.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), le (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: le (Z.abs_nat x) (Z.abs_nat y) *)
assumption.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), le (Z.abs_nat x) (Z.abs_nat y) *)
intros.
(* Goal: le (Z.abs_nat x) (Z.abs_nat y) *)
elim (Zlt_not_le y x).
(* Goal: Z.le x y *)
(* Goal: Z.lt y x *)
rewrite <- (inj_abs_pos x).
(* Goal: Z.le x y *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.lt y (Z.of_nat (Z.abs_nat x)) *)
rewrite <- (inj_abs_pos y).
(* Goal: Z.le x y *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.ge y Z0 *)
(* Goal: Z.lt (Z.of_nat (Z.abs_nat y)) (Z.of_nat (Z.abs_nat x)) *)
apply Znat.inj_lt.
(* Goal: Z.le x y *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.ge y Z0 *)
(* Goal: lt (Z.abs_nat y) (Z.abs_nat x) *)
assumption.
(* Goal: Z.le x y *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.ge y Z0 *)
apply Zle_ge.
(* Goal: Z.le x y *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.le Z0 y *)
assumption.
(* Goal: Z.le x y *)
(* Goal: Z.ge x Z0 *)
apply Zle_ge.
(* Goal: Z.le x y *)
(* Goal: Z.le Z0 x *)
assumption.
(* Goal: Z.le x y *)
assumption.
Qed.
Lemma gtzgt :
forall x y : Z,
(0 <= x)%Z -> (0 <= y)%Z -> (x > y)%Z -> Zabs_nat x > Zabs_nat y.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y) (_ : Z.gt x y), gt (Z.abs_nat x) (Z.abs_nat y) *)
intros.
(* Goal: gt (Z.abs_nat x) (Z.abs_nat y) *)
elim (le_or_lt (Zabs_nat x) (Zabs_nat y)).
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: forall _ : le (Z.abs_nat x) (Z.abs_nat y), gt (Z.abs_nat x) (Z.abs_nat y) *)
intros.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: gt (Z.abs_nat x) (Z.abs_nat y) *)
elim (Zle_not_lt x y).
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.le x y *)
rewrite <- (inj_abs_pos x).
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.le (Z.of_nat (Z.abs_nat x)) y *)
rewrite <- (inj_abs_pos y).
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.ge y Z0 *)
(* Goal: Z.le (Z.of_nat (Z.abs_nat x)) (Z.of_nat (Z.abs_nat y)) *)
apply Znat.inj_le.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.ge y Z0 *)
(* Goal: le (Z.abs_nat x) (Z.abs_nat y) *)
assumption.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.ge y Z0 *)
apply Zle_ge.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.ge x Z0 *)
(* Goal: Z.le Z0 y *)
assumption.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.ge x Z0 *)
apply Zle_ge.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
(* Goal: Z.le Z0 x *)
assumption.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.lt y x *)
apply Zgt_lt.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
(* Goal: Z.gt x y *)
assumption.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), gt (Z.abs_nat x) (Z.abs_nat y) *)
unfold gt in |- *.
(* Goal: forall _ : lt (Z.abs_nat y) (Z.abs_nat x), lt (Z.abs_nat y) (Z.abs_nat x) *)
intro.
(* Goal: lt (Z.abs_nat y) (Z.abs_nat x) *)
assumption.
Qed.
Lemma ltzlt :
forall x y : Z,
(0 <= x)%Z -> (0 <= y)%Z -> (x < y)%Z -> Zabs_nat x < Zabs_nat y.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y) (_ : Z.lt x y), lt (Z.abs_nat x) (Z.abs_nat y) *)
intros.
(* Goal: lt (Z.abs_nat x) (Z.abs_nat y) *)
change (Zabs_nat y > Zabs_nat x) in |- *.
(* Goal: gt (Z.abs_nat y) (Z.abs_nat x) *)
apply gtzgt.
(* Goal: Z.gt y x *)
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
assumption.
(* Goal: Z.gt y x *)
(* Goal: Z.le Z0 x *)
assumption.
(* Goal: Z.gt y x *)
apply Zlt_gt.
(* Goal: Z.lt x y *)
assumption.
Qed.
Lemma abs_plus_pos :
forall x y : Z,
(0 <= x)%Z -> (0 <= y)%Z -> Zabs_nat (x + y) = Zabs_nat x + Zabs_nat y.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add x y)) (Init.Nat.add (Z.abs_nat x) (Z.abs_nat y)) *)
simple induction x.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zpos p) y)) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 Z0) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add Z0 y)) (Init.Nat.add (Z.abs_nat Z0) (Z.abs_nat y)) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zpos p) y)) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 Z0) (_ : Z.le Z0 y), @eq nat (Z.abs_nat y) (Z.abs_nat y) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zpos p) y)) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
(* Goal: @eq nat (Z.abs_nat y) (Z.abs_nat y) *)
reflexivity.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zpos p) y)) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
intro.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (y : Z) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zpos p) y)) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat y)) *)
simple induction y.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zpos p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), @eq nat (Z.abs_nat (Z.add (Zpos p) Z0)) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat Z0)) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zpos p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), @eq nat (Pos.to_nat p) (Init.Nat.add (Pos.to_nat p) O) *)
rewrite <- plus_n_O.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zpos p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: forall (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 Z0), @eq nat (Pos.to_nat p) (Pos.to_nat p) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zpos p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
(* Goal: @eq nat (Pos.to_nat p) (Pos.to_nat p) *)
reflexivity.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zpos p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zpos p0))) *)
simpl in |- *.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zpos p0)), @eq nat (Pos.to_nat (Pos.add p p0)) (Init.Nat.add (Pos.to_nat p) (Pos.to_nat p0)) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
(* Goal: @eq nat (Pos.to_nat (Pos.add p p0)) (Init.Nat.add (Pos.to_nat p) (Pos.to_nat p0)) *)
apply nat_of_P_plus_morphism.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: forall (p0 : positive) (_ : Z.le Z0 (Zpos p)) (_ : Z.le Z0 (Zneg p0)), @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
intros.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
unfold Zle in H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
simpl in H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: @eq nat (Z.abs_nat (Z.add (Zpos p) (Zneg p0))) (Init.Nat.add (Z.abs_nat (Zpos p)) (Z.abs_nat (Zneg p0))) *)
elim H0.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
(* Goal: @eq comparison Gt Gt *)
reflexivity.
(* Goal: forall (p : positive) (y : Z) (_ : Z.le Z0 (Zneg p)) (_ : Z.le Z0 y), @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
intros.
(* Goal: @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
unfold Zle in H.
(* Goal: @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
simpl in H.
(* Goal: @eq nat (Z.abs_nat (Z.add (Zneg p) y)) (Init.Nat.add (Z.abs_nat (Zneg p)) (Z.abs_nat y)) *)
elim H.
(* Goal: @eq comparison Gt Gt *)
reflexivity.
Qed.
Lemma abs_minus_pos :
forall x y : Z,
(0 <= x)%Z ->
(0 <= y)%Z -> (x >= y)%Z -> Zabs_nat (x - y) = Zabs_nat x - Zabs_nat y.
Proof.
(* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y) (_ : Z.ge x y), @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
intros.
(* Goal: @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
elim (Z_of_nat_complete x).
(* Goal: Z.le Z0 x *)
(* Goal: forall (x0 : nat) (_ : @eq Z x (Z.of_nat x0)), @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
intros nx Hx.
(* Goal: Z.le Z0 x *)
(* Goal: @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
elim (Z_of_nat_complete y).
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: forall (x0 : nat) (_ : @eq Z y (Z.of_nat x0)), @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
intros ny Hy.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
elim (Z_of_nat_complete (x - y)).
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: forall (x0 : nat) (_ : @eq Z (Z.sub x y) (Z.of_nat x0)), @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
intros d Hd.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq nat (Z.abs_nat (Z.sub x y)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat y)) *)
rewrite Hx.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq nat (Z.abs_nat (Z.sub (Z.of_nat nx) y)) (Init.Nat.sub (Z.abs_nat (Z.of_nat nx)) (Z.abs_nat y)) *)
rewrite Hy.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq nat (Z.abs_nat (Z.sub (Z.of_nat nx) (Z.of_nat ny))) (Init.Nat.sub (Z.abs_nat (Z.of_nat nx)) (Z.abs_nat (Z.of_nat ny))) *)
rewrite <- Znat.inj_minus1.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: le ny nx *)
(* Goal: @eq nat (Z.abs_nat (Z.of_nat (Init.Nat.sub nx ny))) (Init.Nat.sub (Z.abs_nat (Z.of_nat nx)) (Z.abs_nat (Z.of_nat ny))) *)
rewrite abs_inj.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: le ny nx *)
(* Goal: @eq nat (Init.Nat.sub nx ny) (Init.Nat.sub (Z.abs_nat (Z.of_nat nx)) (Z.abs_nat (Z.of_nat ny))) *)
rewrite abs_inj.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: le ny nx *)
(* Goal: @eq nat (Init.Nat.sub nx ny) (Init.Nat.sub nx (Z.abs_nat (Z.of_nat ny))) *)
rewrite abs_inj.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: le ny nx *)
(* Goal: @eq nat (Init.Nat.sub nx ny) (Init.Nat.sub nx ny) *)
reflexivity.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: le ny nx *)
rewrite (isnat_inj_abs x nx).
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: le ny (Z.abs_nat x) *)
rewrite (isnat_inj_abs y ny).
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: @eq Z y (Z.of_nat ny) *)
(* Goal: le (Z.abs_nat y) (Z.abs_nat x) *)
apply lezle.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: @eq Z y (Z.of_nat ny) *)
(* Goal: Z.le y x *)
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
assumption.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: @eq Z y (Z.of_nat ny) *)
(* Goal: Z.le y x *)
(* Goal: Z.le Z0 x *)
assumption.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: @eq Z y (Z.of_nat ny) *)
(* Goal: Z.le y x *)
apply Zge_le.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: @eq Z y (Z.of_nat ny) *)
(* Goal: Z.ge x y *)
assumption.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
(* Goal: @eq Z y (Z.of_nat ny) *)
assumption.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
(* Goal: @eq Z x (Z.of_nat nx) *)
assumption.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.sub x y) *)
unfold Zminus in |- *.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le Z0 (Z.add x (Z.opp y)) *)
apply Zle_left.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.le y x *)
apply Zge_le.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
(* Goal: Z.ge x y *)
assumption.
(* Goal: Z.le Z0 x *)
(* Goal: Z.le Z0 y *)
assumption.
(* Goal: Z.le Z0 x *)
assumption.
Qed.
Lemma abs_pred_pos :
forall x : Z, (0 < x)%Z -> pred (Zabs_nat x) = Zabs_nat (x - 1).
Proof.
(* Goal: forall (x : Z) (_ : Z.lt Z0 x), @eq nat (Init.Nat.pred (Z.abs_nat x)) (Z.abs_nat (Z.sub x (Zpos xH))) *)
intros.
(* Goal: @eq nat (Init.Nat.pred (Z.abs_nat x)) (Z.abs_nat (Z.sub x (Zpos xH))) *)
rewrite abs_minus_pos.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.le Z0 x *)
(* Goal: @eq nat (Init.Nat.pred (Z.abs_nat x)) (Init.Nat.sub (Z.abs_nat x) (Z.abs_nat (Zpos xH))) *)
replace (Zabs_nat 1) with 1.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.le Z0 x *)
(* Goal: @eq nat (S O) (Z.abs_nat (Zpos xH)) *)
(* Goal: @eq nat (Init.Nat.pred (Z.abs_nat x)) (Init.Nat.sub (Z.abs_nat x) (S O)) *)
rewrite predminus1.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.le Z0 x *)
(* Goal: @eq nat (S O) (Z.abs_nat (Zpos xH)) *)
(* Goal: @eq nat (Init.Nat.sub (Z.abs_nat x) (S O)) (Init.Nat.sub (Z.abs_nat x) (S O)) *)
reflexivity.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.le Z0 x *)
(* Goal: @eq nat (S O) (Z.abs_nat (Zpos xH)) *)
reflexivity.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.le Z0 x *)
apply Zlt_le_weak.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: Z.le Z0 (Zpos xH) *)
unfold Zle in |- *.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: not (@eq comparison (Z.compare Z0 (Zpos xH)) Gt) *)
simpl in |- *.
(* Goal: Z.ge x (Zpos xH) *)
(* Goal: not (@eq comparison Lt Gt) *)
discriminate.
(* Goal: Z.ge x (Zpos xH) *)
apply Zle_ge.
(* Goal: Z.le (Zpos xH) x *)
change (Zsucc 0 <= x)%Z in |- *.
(* Goal: Z.le (Z.succ Z0) x *)
apply Zlt_le_succ.
(* Goal: Z.lt Z0 x *)
assumption.
Qed.
Lemma abs_neq_lt : forall x : Z, x <> 0%Z -> 0 < Zabs_nat x.
Proof.
(* Goal: forall (x : Z) (_ : not (@eq Z x Z0)), lt O (Z.abs_nat x) *)
simple induction x.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: forall (p : positive) (_ : not (@eq Z (Zpos p) Z0)), lt O (Z.abs_nat (Zpos p)) *)
(* Goal: forall _ : not (@eq Z Z0 Z0), lt O (Z.abs_nat Z0) *)
intro.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: forall (p : positive) (_ : not (@eq Z (Zpos p) Z0)), lt O (Z.abs_nat (Zpos p)) *)
(* Goal: lt O (Z.abs_nat Z0) *)
elim H.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: forall (p : positive) (_ : not (@eq Z (Zpos p) Z0)), lt O (Z.abs_nat (Zpos p)) *)
(* Goal: @eq Z Z0 Z0 *)
reflexivity.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: forall (p : positive) (_ : not (@eq Z (Zpos p) Z0)), lt O (Z.abs_nat (Zpos p)) *)
intros.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: lt O (Z.abs_nat (Zpos p)) *)
change (Zabs_nat 0 < Zabs_nat (Zpos p)) in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: lt (Z.abs_nat Z0) (Z.abs_nat (Zpos p)) *)
apply ltzlt.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
(* Goal: Z.le Z0 Z0 *)
unfold Zle in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
(* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
(* Goal: not (@eq comparison Eq Gt) *)
discriminate.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
unfold Zle in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: not (@eq comparison (Z.compare Z0 (Zpos p)) Gt) *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: not (@eq comparison Lt Gt) *)
discriminate.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: Z.lt Z0 (Zpos p) *)
unfold Zlt in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: @eq comparison (Z.compare Z0 (Zpos p)) Lt *)
simpl in |- *.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
(* Goal: @eq comparison Lt Lt *)
reflexivity.
(* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), lt O (Z.abs_nat (Zneg p)) *)
intros.
(* Goal: lt O (Z.abs_nat (Zneg p)) *)
change (Zabs_nat 0 < Zabs_nat (Zpos p)) in |- *.
(* Goal: lt (Z.abs_nat Z0) (Z.abs_nat (Zpos p)) *)
apply ltzlt.
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
(* Goal: Z.le Z0 Z0 *)
unfold Zle in |- *.
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
(* Goal: not (@eq comparison (Z.compare Z0 Z0) Gt) *)
simpl in |- *.
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
(* Goal: not (@eq comparison Eq Gt) *)
discriminate.
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: Z.le Z0 (Zpos p) *)
unfold Zle in |- *.
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: not (@eq comparison (Z.compare Z0 (Zpos p)) Gt) *)
simpl in |- *.
(* Goal: Z.lt Z0 (Zpos p) *)
(* Goal: not (@eq comparison Lt Gt) *)
discriminate.
(* Goal: Z.lt Z0 (Zpos p) *)
unfold Zlt in |- *.
(* Goal: @eq comparison (Z.compare Z0 (Zpos p)) Lt *)
simpl in |- *.
(* Goal: @eq comparison Lt Lt *)
reflexivity.
Qed.
Lemma nat_ge_0 : forall n : nat, (Z_of_nat n >= 0)%Z.
Proof.
(* Goal: forall n : nat, Z.ge (Z.of_nat n) Z0 *)
simple induction n.
(* Goal: forall (n : nat) (_ : Z.ge (Z.of_nat n) Z0), Z.ge (Z.of_nat (S n)) Z0 *)
(* Goal: Z.ge (Z.of_nat O) Z0 *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : Z.ge (Z.of_nat n) Z0), Z.ge (Z.of_nat (S n)) Z0 *)
(* Goal: Z.ge Z0 Z0 *)
unfold Zge in |- *.
(* Goal: forall (n : nat) (_ : Z.ge (Z.of_nat n) Z0), Z.ge (Z.of_nat (S n)) Z0 *)
(* Goal: not (@eq comparison (Z.compare Z0 Z0) Lt) *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : Z.ge (Z.of_nat n) Z0), Z.ge (Z.of_nat (S n)) Z0 *)
(* Goal: not (@eq comparison Eq Lt) *)
discriminate.
(* Goal: forall (n : nat) (_ : Z.ge (Z.of_nat n) Z0), Z.ge (Z.of_nat (S n)) Z0 *)
intros m IHm.
(* Goal: Z.ge (Z.of_nat (S m)) Z0 *)
change (Z_of_nat (S m) >= Z_of_nat 0)%Z in |- *.
(* Goal: Z.ge (Z.of_nat (S m)) (Z.of_nat O) *)
apply Znat.inj_ge.
(* Goal: ge (S m) O *)
unfold ge in |- *.
(* Goal: le O (S m) *)
apply le_O_n.
Qed.
|
Inductive Z : Set :=
| OZ : Z
| pos : nat -> Z
| neg : nat -> Z.
Definition IZ := pos 0.
Definition is_posn (x y : Z) :=
match x, y with
| pos n, pos m => n = m
| _, _ => False
end.
Lemma tech_pos_not_posZ : forall n m : nat, n <> m -> pos n <> pos m.
Proof.
(* Goal: forall (n m : nat) (_ : not (@eq nat n m)), not (@eq Z (pos n) (pos m)) *)
unfold not in |- *; intros.
(* Goal: False *)
cut (is_posn (pos n) (pos m)).
(* Goal: is_posn (pos n) (pos m) *)
(* Goal: forall _ : is_posn (pos n) (pos m), False *)
simpl in |- *; exact H.
(* Goal: is_posn (pos n) (pos m) *)
rewrite H0; simpl in |- *; reflexivity.
Qed.
Lemma eq_OZ_dec : forall x : Z, {x = OZ} + {x <> OZ}.
Proof.
(* Goal: forall x : Z, sumbool (@eq Z x OZ) (not (@eq Z x OZ)) *)
intros; elim x.
(* Goal: forall n : nat, sumbool (@eq Z (neg n) OZ) (not (@eq Z (neg n) OZ)) *)
(* Goal: forall n : nat, sumbool (@eq Z (pos n) OZ) (not (@eq Z (pos n) OZ)) *)
(* Goal: sumbool (@eq Z OZ OZ) (not (@eq Z OZ OZ)) *)
left; reflexivity.
(* Goal: forall n : nat, sumbool (@eq Z (neg n) OZ) (not (@eq Z (neg n) OZ)) *)
(* Goal: forall n : nat, sumbool (@eq Z (pos n) OZ) (not (@eq Z (pos n) OZ)) *)
intros; right; discriminate.
(* Goal: forall n : nat, sumbool (@eq Z (neg n) OZ) (not (@eq Z (neg n) OZ)) *)
intros; right; discriminate.
Qed.
Definition posOZ (n : nat) :=
match n return Z with
| O => OZ
| S n' => pos n'
end.
Definition negOZ (n : nat) :=
match n return Z with
| O => OZ
| S n' => neg n'
end.
Definition absZ (x : Z) :=
match x return Z with
| OZ => OZ
| pos n => pos n
| neg n => pos n
end.
Definition sgnZ (x : Z) :=
match x return Z with
| OZ => OZ
| pos n => pos 0
| neg n => neg 0
end.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_PGrotate.
Require Export GeoCoq.Elements.OriginalProofs.proposition_33B.
Require Export GeoCoq.Elements.OriginalProofs.proposition_30.
Require Export GeoCoq.Elements.OriginalProofs.lemma_diagonalsbisect.
Require Export GeoCoq.Elements.OriginalProofs.lemma_triangletoparallelogram.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelbetween.
Require Export GeoCoq.Elements.OriginalProofs.proposition_43.
Require Export GeoCoq.Elements.OriginalProofs.proposition_43B.
Section Euclid.
Context `{Ax:area}.
Lemma proposition_44A :
forall A B D E F G J N,
PG B E F G -> CongA E B G J D N -> BetS A B E ->
exists X Y, PG A B X Y /\ CongA A B X J D N /\ EF B E F G Y X B A /\ BetS G B X.
Proof.
(* Goal: forall (A B D E F G J N : @Point Ax0) (_ : @PG Ax0 B E F G) (_ : @CongA Ax0 E B G J D N) (_ : @BetS Ax0 A B E), @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG E F G B) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG F G B E) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG G B E F) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G F B E) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol G B E) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq G B) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists q, (BetS G B q /\ Cong B q G B)) by (conclude lemma_extension);destruct Tf as [q];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol E B G) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A B E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E B A) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E B B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq A B) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol A B G) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G B q) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol G B A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq G q) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq q G) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G B G) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol q G A) by (conclude lemma_NChelper).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol G q A) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
rename_H H;let Tf:=fresh in assert (Tf:exists H h T, (BetS H A h /\ CongA h A B A B G /\ CongA h A B G B A /\ CongA B A h G B A /\ CongA H A B A B q /\ CongA H A B q B A /\ CongA B A H q B A /\ Par H h G q /\ Cong H A B q /\ Cong A h G B /\ Cong A T T B /\ Cong H T T q /\ Cong G T T h /\ BetS H T q /\ BetS G T h /\ BetS A T B)) by (conclude proposition_31);destruct Tf as [H[h[T]]];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H h q G) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G B q) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col q G B) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq B G) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H h B G) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H h G B) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B H h) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B h H) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col H A h) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col h H A) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq H A) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq A H) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B A H) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B H A) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A G B) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Cong H A G B) by (conclude lemma_congruencetransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A B B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A T B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A B T) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol B H A) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol A B H) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol H A B) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol A B H) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS H G A B) by (conclude_def OS ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert ((Par H G A B /\ Cong H G A B)) by (conclude proposition_33B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A B H G) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A B G H) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert ((Par G B E F /\ Par G F B E)) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G F E B) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A B E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E B A) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G F A B) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A B G F) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G H F) by (conclude lemma_Playfair).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A B G) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B F E) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par F E G B) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG H A B G) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists j, (BetS H j B /\ BetS A j G)) by (conclude lemma_diagonalsmeet);destruct Tf as [j];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists k, (BetS G k E /\ BetS B k F)) by (conclude lemma_diagonalsmeet);destruct Tf as [k];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS E B A) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq E E) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col F E E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G B B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col H A A) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol F E B) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq F E) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq G B) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol H A G) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq H A) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A F E) by (eauto using (proposition_30 _ _ _ _ _ _ _ _ _ _ H79 H1 H93)).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Cong G B F E) by (forward_using proposition_34).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Cong H A F E) by (conclude lemma_congruencetransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G F B E) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H G A B) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par B E G F) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A B H G) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (TP B E G F) by (conclude lemma_paralleldef2B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (TP A B H G) by (conclude lemma_paralleldef2B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS G F B E) by (conclude_def TP ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS H G A B) by (conclude_def TP ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A B E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq A E) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS H G A E) by (conclude lemma_samesidecollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS G F E B) by (conclude lemma_samesideflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E B A) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq E A) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS G F E A) by (conclude lemma_samesidecollinear).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS G F A E) by (conclude lemma_samesideflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (OS H F A E) by (conclude lemma_samesidetransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H F A E) by (conclude proposition_33B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A E F) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG H A E F) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol H F E) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol E F H) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists t, (Midpoint H t E /\ Midpoint A t F)) by (conclude lemma_diagonalsbisect);destruct Tf as [t];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert ((BetS H t E /\ Cong H t t E)) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert ((BetS A t F /\ Cong A t t F)) by (conclude_def Midpoint ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Cong A t F t) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Cong H t E t) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Cong t A t F) by (forward_using lemma_congruenceflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol H E F) by (forward_using lemma_NCorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists K, (BetS H B K /\ BetS F E K)) by (conclude postulate_Euclid5);destruct Tf as [K];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col F E K) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E F K) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq F K) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq K F) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A K F) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A F K) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par F K H A) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par F K A H) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A H H) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists L, (PG H L K F /\ Col A H L)) by (conclude lemma_triangletoparallelogram);destruct Tf as [L];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H L K F) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol L K F) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq L K) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq K L) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B E F) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B F E) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col F E E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col F E K) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq E K) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B E K) by (conclude lemma_collinearparallel2).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par E K G B) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G B B) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
let Tf:=fresh in assert (Tf:exists M, (PG B M K E /\ Col G B M)) by (conclude lemma_triangletoparallelogram);destruct Tf as [M];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG L K F H) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG K L H F) by (conclude lemma_PGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG L H F K) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG H F K L) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG A H G B) by (conclude lemma_PGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A H G B) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq K K) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq E E) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (eq F F) by (conclude cn_equalityreflexive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par B E M K) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M K B E) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par K M E B) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G F B E) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol E M K) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol B E K) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol G F B) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M K B E) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G F B E) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS K E F) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col M K K) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col B E E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G F F) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq M K) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq B E) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq G F) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M K G F) by (conclude proposition_30).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par K M F G) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par F G K M) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H F L K) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par L K H F) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par K L H F) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col H F G) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par K L G F) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par K L F G) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par F G K L) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col K M L) by (conclude lemma_Playfair).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col M K L) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par B E M K) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq L K) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par B E L K) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par L K B E) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par L K E B) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A B E) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E B A) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par L K A B) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A B L K) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par A B K L) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS K B H) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col L A H) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS L A H) by (conclude lemma_parallelbetween).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS H A L) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A G B) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol B M K) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq M B) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H A M B) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M B H A) by (conclude lemma_parallelsymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M B A H) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col A H L) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H L K F) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (nCol H L K) by (forward_using lemma_parallelNC).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq L H) by (forward_using lemma_NCdistinct).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M B L H) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par M B H L) by (forward_using lemma_parallelflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col L M K) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS L M K) by (conclude lemma_parallelbetween).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B E F) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col F E K) by (conclude_def Col ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col E F K) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq F K) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq K F) by (conclude lemma_inequalitysymmetric).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par G B K F) by (conclude lemma_collinearparallel).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col F G H) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS F G H) by (conclude lemma_parallelbetween).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS H G F) by (conclude axiom_betweennesssymmetry).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG A B G H) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG B G H A) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG G H A B) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG M K E B) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG K E B M) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG E B M K) by (conclude lemma_PGrotate).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (EF B E F G L M B A) by (conclude proposition_43).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG A H G B) by (conclude lemma_PGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG M B E K) by (conclude lemma_PGflip).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (PG A B M L) by (conclude proposition_43B).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col H G F) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq H F) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq L K) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq H G) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (neq M K) by (forward_using lemma_betweennotequal).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Par H F L K) by (conclude_def PG ).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (~ Meet H F L K) by (unfold Par in H251;decompose [ex and] H251;auto).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (Col G M B) by (forward_using lemma_collinearorder).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (BetS G B M) by (conclude lemma_collinearbetween).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (CongA A B M G B E) by (conclude proposition_15).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (CongA G B E E B G) by (conclude lemma_ABCequalsCBA).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (CongA A B M E B G) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
assert (CongA A B M J D N) by (conclude lemma_equalanglestransitive).
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => and (@PG Ax0 A B X Y) (and (@CongA Ax0 A B X J D N) (and (@EF Ax0 Ax1 Ax2 Ax B E F G Y X B A) (@BetS Ax0 G B X))))) *)
close.
Qed.
End Euclid.
|
Require Export Dependent_lists.
Require Export Lib_Arith.
Definition Inj (A : Set) (P : A -> Prop) (e : {x : A | P x}) :=
let (a, _) return A := e in a.
Fixpoint exp (e x : nat) {struct x} : nat :=
match x with
| O => 1
| S p => e * exp e p
end.
Section Numerals.
Definition BT := {b : nat | 0 < b}.
Variable BASE : BT.
Definition base := Inj nat (fun b : nat => 0 < b) BASE.
Definition digit := {x : nat | x < base}.
Definition val : digit -> nat := Inj nat (fun x : nat => x < base).
Definition num := list digit.
Definition inf (n : nat) := {x : nat | x < n}.
Definition val_inf (n : nat) : inf n -> nat :=
Inj nat (fun x : nat => x < n).
Let Cons := cons digit.
Let Nil := nil digit.
Fixpoint Val (n : nat) (X : num n) {struct X} : nat :=
match X with
| nil => 0
| cons p xp X' => val xp * exp base p + Val p X'
end.
Lemma Val_val : forall x : digit, Val 1 (Cons 0 x Nil) = val x.
Proof.
(* Goal: forall x : digit, @eq nat (Val (S O) (Cons O x Nil)) (val x) *)
simpl in |- *.
(* Goal: forall x : digit, @eq nat (Init.Nat.add (Init.Nat.mul (val x) (S O)) O) (val x) *)
intros x.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (val x) (S O)) O) (val x) *)
rewrite (mult_1_r (val x)).
(* Goal: @eq nat (Init.Nat.add (val x) O) (val x) *)
auto.
Qed.
Lemma upper_bound : forall (n : nat) (X : num n), Val n X < exp base n.
Proof.
(* Goal: forall (n : nat) (X : num n), lt (Val n X) (exp base n) *)
intros n X; elim X.
(* Goal: forall (n : nat) (a : digit) (l : list digit n) (_ : lt (Val n l) (exp base n)), lt (Val (S n) (cons digit n a l)) (exp base (S n)) *)
(* Goal: lt (Val O (nil digit)) (exp base O) *)
auto.
(* Goal: forall (n : nat) (a : digit) (l : list digit n) (_ : lt (Val n l) (exp base n)), lt (Val (S n) (cons digit n a l)) (exp base (S n)) *)
intros n0 y l H_rec.
(* Goal: lt (Val (S n0) (cons digit n0 y l)) (exp base (S n0)) *)
simpl in |- *.
(* Goal: lt (Init.Nat.add (Init.Nat.mul (val y) (exp base n0)) (Val n0 l)) (Init.Nat.mul base (exp base n0)) *)
apply lt_le_trans with (pred base * exp_n base n0 + exp_n base n0).
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
(* Goal: lt (Init.Nat.add (Init.Nat.mul (val y) (exp base n0)) (Val n0 l)) (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) *)
apply le_lt_plus_mult.
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
(* Goal: lt (Val n0 l) (exp_n base n0) *)
(* Goal: le (val y) (Init.Nat.pred base) *)
elim y.
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
(* Goal: lt (Val n0 l) (exp_n base n0) *)
(* Goal: forall (x : nat) (p : lt x base), le (val (@exist nat (fun x0 : nat => lt x0 base) x p)) (Init.Nat.pred base) *)
intros x H_y.
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
(* Goal: lt (Val n0 l) (exp_n base n0) *)
(* Goal: le (val (@exist nat (fun x : nat => lt x base) x H_y)) (Init.Nat.pred base) *)
simpl in |- *.
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
(* Goal: lt (Val n0 l) (exp_n base n0) *)
(* Goal: le x (Init.Nat.pred base) *)
auto.
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
(* Goal: lt (Val n0 l) (exp_n base n0) *)
trivial.
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.pred base) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
replace (pred base) with (base - 1).
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Init.Nat.add (Init.Nat.mul (Init.Nat.sub base (S O)) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
rewrite mult_minus_distr_r.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Init.Nat.add (Nat.sub (Nat.mul base (exp_n base n0)) (Nat.mul (S O) (exp_n base n0))) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
simpl in |- *.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Init.Nat.add (Nat.sub (Nat.mul base (exp_n base n0)) (Nat.add (exp_n base n0) O)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
elim plus_n_O.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Init.Nat.add (Nat.sub (Nat.mul base (exp_n base n0)) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
elim exp_n_plus_p1.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Init.Nat.add (Nat.sub (exp_n base (Init.Nat.add n0 (S O))) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
elim plus_Snm_nSm; simpl in |- *; elim plus_n_O.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Init.Nat.add (Nat.sub (Init.Nat.mul base (exp_n base n0)) (exp_n base n0)) (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
elim plus_comm.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (Nat.add (exp_n base n0) (Nat.sub (Init.Nat.mul base (exp_n base n0)) (exp_n base n0))) (Init.Nat.mul base (exp base n0)) *)
elim le_plus_minus.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (exp_n base n0) (Init.Nat.mul base (exp_n base n0)) *)
(* Goal: le (Init.Nat.mul base (exp_n base n0)) (Init.Nat.mul base (exp base n0)) *)
apply le_mult_cst; auto.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: le (exp_n base n0) (Init.Nat.mul base (exp_n base n0)) *)
apply le_exp_n_mult.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
(* Goal: lt O base *)
unfold base in |- *; case BASE; auto.
(* Goal: @eq nat (Init.Nat.sub base (S O)) (Init.Nat.pred base) *)
auto.
Qed.
Definition val_bound (n : nat) (X : num n) : inf (exp base n) :=
exist (fun p : nat => p < exp base n) (Val n X) (upper_bound n X).
Lemma comp_dif :
forall (n : nat) (x y : digit) (X Y : num n),
val x < val y -> Val (S n) (Cons n x X) < Val (S n) (Cons n y Y).
Proof.
(* Goal: forall (n : nat) (x y : digit) (X Y : num n) (_ : lt (val x) (val y)), lt (Val (S n) (Cons n x X)) (Val (S n) (Cons n y Y)) *)
simpl in |- *; intros.
(* Goal: lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (val y) (exp base n)) (Val n Y)) *)
elim H.
(* Goal: forall (m : nat) (_ : le (S (val x)) m) (_ : lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul m (exp base n)) (Val n Y))), lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (S m) (exp base n)) (Val n Y)) *)
(* Goal: lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (S (val x)) (exp base n)) (Val n Y)) *)
apply same_quotient_order; auto; apply upper_bound.
(* Goal: forall (m : nat) (_ : le (S (val x)) m) (_ : lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul m (exp base n)) (Val n Y))), lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (S m) (exp base n)) (Val n Y)) *)
intros; apply same_quotient_order; auto; apply upper_bound.
Qed.
Lemma comp_eq_most :
forall (n : nat) (x y : digit) (X Y : num n),
val x = val y ->
Val n X < Val n Y -> Val (S n) (Cons n x X) < Val (S n) (Cons n y Y).
Proof.
(* Goal: forall (n : nat) (x y : digit) (X Y : num n) (_ : @eq nat (val x) (val y)) (_ : lt (Val n X) (Val n Y)), lt (Val (S n) (Cons n x X)) (Val (S n) (Cons n y Y)) *)
intros n x y X Y e H.
(* Goal: lt (Val (S n) (Cons n x X)) (Val (S n) (Cons n y Y)) *)
simpl in |- *.
(* Goal: lt (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (val y) (exp base n)) (Val n Y)) *)
rewrite e.
(* Goal: lt (Init.Nat.add (Init.Nat.mul (val y) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (val y) (exp base n)) (Val n Y)) *)
apply plus_lt_compat_l; auto.
Qed.
Lemma com_eq :
forall (n : nat) (x y : digit) (X Y : num n),
val x = val y ->
Val n X = Val n Y -> Val (S n) (Cons n x X) = Val (S n) (Cons n y Y).
Proof.
(* Goal: forall (n : nat) (x y : digit) (X Y : num n) (_ : @eq nat (val x) (val y)) (_ : @eq nat (Val n X) (Val n Y)), @eq nat (Val (S n) (Cons n x X)) (Val (S n) (Cons n y Y)) *)
simpl in |- *.
(* Goal: forall (n : nat) (x y : digit) (X Y : num n) (_ : @eq nat (val x) (val y)) (_ : @eq nat (Val n X) (Val n Y)), @eq nat (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (val y) (exp base n)) (Val n Y)) *)
intros n x y X Y He HE.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (val x) (exp base n)) (Val n X)) (Init.Nat.add (Init.Nat.mul (val y) (exp base n)) (Val n Y)) *)
rewrite He; rewrite HE; auto.
Qed.
End Numerals. |
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat div seq fintype.
From mathcomp
Require Import bigop finset fingroup morphism perm automorphism quotient.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Section ActionDef.
Variables (aT : finGroupType) (D : {set aT}) (rT : Type).
Implicit Types a b : aT.
Implicit Type x : rT.
Definition act_morph to x := forall a b, to x (a * b) = to (to x a) b.
Definition is_action to :=
left_injective to /\ forall x, {in D &, act_morph to x}.
Record action := Action {act :> rT -> aT -> rT; _ : is_action act}.
Definition clone_action to :=
let: Action _ toP := to return {type of Action for to} -> action in
fun k => k toP.
End ActionDef.
Delimit Scope action_scope with act.
Bind Scope action_scope with action.
Arguments act_morph {aT rT%type} to x%g.
Arguments is_action {aT} D%g {rT} to.
Arguments act {aT D%g rT%type} to%act x%g a%g : rename.
Arguments clone_action [aT D%g rT%type to%act] _.
Notation "{ 'action' aT &-> T }" := (action [set: aT] T)
(at level 0, format "{ 'action' aT &-> T }") : type_scope.
Notation "[ 'action' 'of' to ]" := (clone_action (@Action _ _ _ to))
(at level 0, format "[ 'action' 'of' to ]") : form_scope.
Definition act_dom aT D rT of @action aT D rT := D.
Section TotalAction.
Variables (aT : finGroupType) (rT : Type) (to : rT -> aT -> rT).
Hypotheses (to1 : to^~ 1 =1 id) (toM : forall x, act_morph to x).
Lemma is_total_action : is_action setT to.
Proof.
(* Goal: @is_action aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) rT to *)
split=> [a | x a b _ _] /=; last by rewrite toM.
(* Goal: @injective rT rT (fun x0 : rT => to x0 a) *)
by apply: can_inj (to^~ a^-1) _ => x; rewrite -toM ?mulgV.
Qed.
Definition TotalAction := Action is_total_action.
End TotalAction.
Section ActionDefs.
Variables (aT aT' : finGroupType) (D : {set aT}) (D' : {set aT'}).
Definition morph_act rT rT' (to : action D rT) (to' : action D' rT') f fA :=
forall x a, f (to x a) = to' (f x) (fA a).
Variable rT : finType.
Implicit Type to : action D rT.
Implicit Type A : {set aT}.
Implicit Type S : {set rT}.
Definition actm to a := if a \in D then to^~ a else id.
Definition setact to S a := [set to x a | x in S].
Definition orbit to A x := to x @: A.
Definition amove to A x y := [set a in A | to x a == y].
Definition afix to A := [set x | A \subset [set a | to x a == x]].
Definition astab S to := D :&: [set a | S \subset [set x | to x a == x]].
Definition astabs S to := D :&: [set a | S \subset to^~ a @^-1: S].
Definition acts_on A S to := {in A, forall a x, (to x a \in S) = (x \in S)}.
Definition atrans A S to := S \in orbit to A @: S.
Definition faithful A S to := A :&: astab S to \subset [1].
Arguments act_inj : clear implicits.
Lemma actMin x : {in D &, act_morph to x}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) (fun a b : FinGroup.arg_sort (FinGroup.base aT) => @eq (Finite.sort rT) (@act aT D (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b)) (@act aT D (Finite.sort rT) to (@act aT D (Finite.sort rT) to x a) b)) (inPhantom (@act_morph aT (Finite.sort rT) (@act aT D (Finite.sort rT) to) x)) *)
by case: to => ? [].
Qed.
Lemma actmEfun a : a \in D -> actm to a = to^~ a.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D))), @eq (forall _ : Finite.sort rT, Finite.sort rT) (@actm aT D rT to a) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) *)
by rewrite /actm => ->.
Qed.
Lemma actmE a : a \in D -> actm to a =1 to^~ a.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D))), @eqfun (Finite.sort rT) (Finite.sort rT) (@actm aT D rT to a) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) *)
by move=> Da; rewrite actmEfun.
Qed.
Lemma setactE S a : to^* S a = [set to x a | x in S].
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@setact aT D rT to S a) (@Imset.imset rT rT (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by [].
Qed.
Lemma mem_setact S a x : x \in S -> to x a \in to^* S a.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))), is_true (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT D rT to S a)))) *)
exact: mem_imset.
Qed.
Lemma card_setact S a : #|to^* S a| = #|S|.
Proof.
(* Goal: @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT D rT to S a)))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by apply: card_imset; apply: act_inj.
Qed.
Lemma setact_is_action : is_action D to^*.
Proof.
(* Goal: @is_action aT D (@set_of rT (Phant (Finite.sort rT))) (@setact aT D rT to) *)
split=> [a R S eqRS | a b Da Db S]; last first.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) R S *)
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@setact aT D rT to a (@mulg (FinGroup.base aT) b Da)) (@setact aT D rT to (@setact aT D rT to a b) Da) *)
by rewrite /setact /= -imset_comp; apply: eq_imset => x; apply: actMin.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) R S *)
apply/setP=> x; apply/idP/idP=> /(mem_setact a).
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT D rT to S a)))), is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT D rT to R a)))), is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by rewrite eqRS => /imsetP[y Sy /act_inj->].
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT D rT to S a)))), is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) *)
by rewrite -eqRS => /imsetP[y Sy /act_inj->].
Qed.
Lemma orbitP A x y :
reflect (exists2 a, a \in A & to x a = y) (y \in orbit to A x).
Proof.
(* Goal: Bool.reflect (@ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) y)) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT D rT to A x)))) *)
by apply: (iffP imsetP) => [] [a]; exists a.
Qed.
Lemma mem_orbit A x a : a \in A -> to x a \in orbit to A x.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A))), is_true (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT D rT to A x)))) *)
exact: mem_imset.
Qed.
Lemma afixP A x : reflect (forall a, a \in A -> to x a = x) (x \in 'Fix_to(A)).
Proof.
(* Goal: Bool.reflect (forall (a : FinGroup.arg_sort (FinGroup.base aT)) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))), @eq (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) x) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT D rT to A)))) *)
rewrite inE; apply: (iffP subsetP) => [xfix a /xfix | xfix a Aa].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))), @eq (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) x *)
by rewrite inE => /eqP.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
by rewrite inE xfix.
Qed.
Lemma afixS A B : A \subset B -> 'Fix_to(B) \subset 'Fix_to(A).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B))), is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT D rT to B))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT D rT to A)))) *)
by move=> sAB; apply/subsetP=> u; rewrite !inE; apply: subset_trans.
Qed.
Lemma afixU A B : 'Fix_to(A :|: B) = 'Fix_to(A) :&: 'Fix_to(B).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT D rT to (@setU (FinGroup.arg_finType (FinGroup.base aT)) A B)) (@setI rT (@afix aT D rT to A) (@afix aT D rT to B)) *)
by apply/setP=> x; rewrite !inE subUset.
Qed.
Lemma afix1P a x : reflect (to x a = x) (x \in 'Fix_to[a]).
Proof.
(* Goal: Bool.reflect (@eq (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) x) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT D rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))))) *)
by rewrite inE sub1set inE; apply: eqP.
Qed.
Lemma astabIdom S : 'C_D(S | to) = 'C(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@setI (FinGroup.arg_finType (FinGroup.base aT)) D (@astab aT D rT S to)) (@astab aT D rT S to) *)
by rewrite setIA setIid.
Qed.
Lemma astab_dom S : {subset 'C(S | to) <= D}.
Proof.
(* Goal: @sub_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) *)
by move=> a /setIP[].
Qed.
Lemma astab_act S a x : a \in 'C(S | to) -> x \in S -> to x a = x.
Lemma astabS S1 S2 : S1 \subset S2 -> 'C(S2 | to) \subset 'C(S1 | to).
Proof.
(* Goal: forall _ : is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S1)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S2))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S2 to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S1 to)))) *)
move=> sS12; apply/subsetP=> x; rewrite !inE => /andP[->].
(* Goal: forall _ : is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S2)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x0 : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x0 x) x0))))), is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S1)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x0 : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x0 x) x0)))))) *)
exact: subset_trans.
Qed.
Lemma astabsIdom S : 'N_D(S | to) = 'N(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@setI (FinGroup.arg_finType (FinGroup.base aT)) D (@astabs aT D rT S to)) (@astabs aT D rT S to) *)
by rewrite setIA setIid.
Qed.
Lemma astabs_dom S : {subset 'N(S | to) <= D}.
Proof.
(* Goal: @sub_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) *)
by move=> a /setIdP[].
Qed.
Lemma astabs_act S a x : a \in 'N(S | to) -> (to x a \in S) = (x \in S).
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))), @eq bool (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
rewrite 2!inE subEproper properEcard => /andP[_].
(* Goal: forall _ : is_true (orb (@eq_op (set_of_eqType rT) S (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (andb (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (leq (Datatypes.S (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))))), @eq bool (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
rewrite (card_preimset _ (act_inj _)) ltnn andbF orbF => /eqP{2}->.
(* Goal: @eq bool (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) *)
by rewrite inE.
Qed.
Lemma astab_sub S : 'C(S | to) \subset 'N(S | to).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))) *)
apply/subsetP=> a cSa; rewrite !inE (astab_dom cSa).
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))) *)
by apply/subsetP=> x Sx; rewrite inE (astab_act cSa).
Qed.
Lemma astabsC S : 'N(~: S | to) = 'N(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT D rT (@setC rT S) to) (@astabs aT D rT S to) *)
apply/setP=> a; apply/idP/idP=> nSa; rewrite !inE (astabs_dom nSa).
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setC rT S))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setC rT S)))))))) *)
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))) *)
by rewrite -setCS -preimsetC; apply/subsetP=> x; rewrite inE astabs_act.
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setC rT S))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setC rT S)))))))) *)
by rewrite preimsetC setCS; apply/subsetP=> x; rewrite inE astabs_act.
Qed.
Lemma astabsI S T : 'N(S | to) :&: 'N(T | to) \subset 'N(S :&: T | to).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to) (@astabs aT D rT T to)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setI rT S T) to)))) *)
apply/subsetP=> a; rewrite !inE -!andbA preimsetI => /and4P[-> nSa _ nTa] /=.
(* Goal: is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S T))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT T))))))) *)
by rewrite setISS.
Qed.
Lemma astabs_setact S a : a \in 'N(S | to) -> to^* S a = S.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@setact aT D rT to S a) S *)
move=> nSa; apply/eqP; rewrite eqEcard card_setact leqnn andbT.
(* Goal: is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT D rT to S a))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by apply/subsetP=> _ /imsetP[x Sx ->]; rewrite astabs_act.
Qed.
Lemma astab1_set S : 'C[S | set_action] = 'N(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT D (set_of_finType rT) (@set1 (set_of_finType rT) S) set_action) (@astabs aT D rT S to) *)
apply/setP=> a; apply/idP/idP=> nSa.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D (set_of_finType rT) (@set1 (set_of_finType rT) S) set_action)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))) *)
case/setIdP: nSa => Da; rewrite !inE Da sub1set inE => /eqP defS.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D (set_of_finType rT) (@set1 (set_of_finType rT) S) set_action)))) *)
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))) *)
by apply/subsetP=> x Sx; rewrite inE -defS mem_setact.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D (set_of_finType rT) (@set1 (set_of_finType rT) S) set_action)))) *)
by rewrite !inE (astabs_dom nSa) sub1set inE /= astabs_setact.
Qed.
Lemma astabs_set1 x : 'N([set x] | to) = 'C[x | to].
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT D rT (@set1 rT x) to) (@astab aT D rT (@set1 rT x) to) *)
apply/eqP; rewrite eqEsubset astab_sub andbC setIS //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT x)))))))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))))))) *)
by apply/subsetP=> a; rewrite ?(inE,sub1set).
Qed.
Lemma acts_dom A S : [acts A, on S | to] -> A \subset D.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D))) *)
by move=> nSA; rewrite (subset_trans nSA) ?subsetIl.
Qed.
Lemma acts_act A S : [acts A, on S | to] -> {acts A, on S | to}.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))), @acts_on aT D rT A S to *)
by move=> nAS a Aa x; rewrite astabs_act ?(subsetP nAS).
Qed.
Lemma astabCin A S :
A \subset D -> (A \subset 'C(S | to)) = (S \subset 'Fix_to(A)).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S to)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT D rT to A)))) *)
move=> sAD; apply/subsetP/subsetP=> [sAC x xS | sSF a aA].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S to)))) *)
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT D rT to A)))) *)
by apply/afixP=> a aA; apply: astab_act (sAC _ aA) xS.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S to)))) *)
rewrite !inE (subsetP sAD _ aA); apply/subsetP=> x xS.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
by move/afixP/(_ _ aA): (sSF _ xS); rewrite inE => ->.
Qed.
Section ActsSetop.
Variables (A : {set aT}) (S T : {set rT}).
Hypotheses (AactS : [acts A, on S | to]) (AactT : [acts A, on T | to]).
Lemma astabU : 'C(S :|: T | to) = 'C(S | to) :&: 'C(T | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT D rT (@setU rT S T) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT D rT S to) (@astab aT D rT T to)) *)
by apply/setP=> a; rewrite !inE subUset; case: (a \in D).
Qed.
Lemma astabsU : 'N(S | to) :&: 'N(T | to) \subset 'N(S :|: T | to).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to) (@astabs aT D rT T to)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setU rT S T) to)))) *)
by rewrite -(astabsC S) -(astabsC T) -(astabsC (S :|: T)) setCU astabsI.
Qed.
Lemma astabsD : 'N(S | to) :&: 'N(T | to) \subset 'N(S :\: T| to).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to) (@astabs aT D rT T to)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setD rT S T) to)))) *)
by rewrite setDE -(astabsC T) astabsI.
Qed.
Lemma actsI : [acts A, on S :&: T | to].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setI rT S T) to)))) *)
by apply: subset_trans (astabsI S T); rewrite subsetI AactS.
Qed.
Lemma actsU : [acts A, on S :|: T | to].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setU rT S T) to)))) *)
by apply: subset_trans astabsU; rewrite subsetI AactS.
Qed.
Lemma actsD : [acts A, on S :\: T | to].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setD rT S T) to)))) *)
by apply: subset_trans astabsD; rewrite subsetI AactS.
Qed.
End ActsSetop.
Lemma acts_in_orbit A S x y :
[acts A, on S | to] -> y \in orbit to A x -> x \in S -> y \in S.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to))))) (_ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT D rT to A x))))) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by move=> nSA/imsetP[a Aa ->{y}] Sx; rewrite (astabs_act _ (subsetP nSA a Aa)).
Qed.
Lemma subset_faithful A B S :
B \subset A -> [faithful A, on S | to] -> [faithful B, on S | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))) (_ : is_true (@faithful aT D rT A S to)), is_true (@faithful aT D rT B S to) *)
by move=> sAB; apply: subset_trans; apply: setSI.
Qed.
Section Reindex.
Variables (vT : Type) (idx : vT) (op : Monoid.com_law idx) (S : {set rT}).
Lemma reindex_astabs a F : a \in 'N(S | to) ->
\big[op/idx]_(i in S) F i = \big[op/idx]_(i in S) F (to i a).
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to)))), @eq vT (@BigOp.bigop vT (Finite.sort rT) idx (index_enum rT) (fun i : Finite.sort rT => @BigBody vT (Finite.sort rT) i (@Monoid.operator vT idx (@Monoid.com_operator vT idx op)) (@in_mem (Finite.sort rT) i (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (F i))) (@BigOp.bigop vT (Finite.sort rT) idx (index_enum rT) (fun i : Finite.sort rT => @BigBody vT (Finite.sort rT) i (@Monoid.operator vT idx (@Monoid.com_operator vT idx op)) (@in_mem (Finite.sort rT) i (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (F (@act aT D (Finite.sort rT) to i a)))) *)
move=> nSa; rewrite (reindex_inj (act_inj a)); apply: eq_bigl => x.
(* Goal: @eq bool (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
exact: astabs_act.
Qed.
Lemma reindex_acts A a F : [acts A, on S | to] -> a \in A ->
\big[op/idx]_(i in S) F i = \big[op/idx]_(i in S) F (to i a).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))), @eq vT (@BigOp.bigop vT (Finite.sort rT) idx (index_enum rT) (fun i : Finite.sort rT => @BigBody vT (Finite.sort rT) i (@Monoid.operator vT idx (@Monoid.com_operator vT idx op)) (@in_mem (Finite.sort rT) i (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (F i))) (@BigOp.bigop vT (Finite.sort rT) idx (index_enum rT) (fun i : Finite.sort rT => @BigBody vT (Finite.sort rT) i (@Monoid.operator vT idx (@Monoid.com_operator vT idx op)) (@in_mem (Finite.sort rT) i (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (F (@act aT D (Finite.sort rT) to i a)))) *)
by move=> nSA /(subsetP nSA); apply: reindex_astabs.
Qed.
End Reindex.
End RawAction.
Arguments act_inj {aT D rT} to a [x1 x2] : rename.
Notation "to ^*" := (set_action to) : action_scope.
Arguments orbitP {aT D rT to A x y}.
Arguments afixP {aT D rT to A x}.
Arguments afix1P {aT D rT to a x}.
Arguments reindex_astabs [aT D rT] to [vT idx op S] a [F].
Arguments reindex_acts [aT D rT] to [vT idx op S A a F].
Section PartialAction.
Variables (aT : finGroupType) (D : {group aT}) (rT : finType).
Variable to : action D rT.
Implicit Types a : aT.
Implicit Types x y : rT.
Implicit Types A B : {set aT}.
Implicit Types G H : {group aT}.
Implicit Types S : {set rT}.
Lemma act1 x : to x 1 = x.
Proof.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (oneg (FinGroup.base aT))) x *)
by apply: (act_inj to 1); rewrite -actMin ?mulg1.
Qed.
Lemma actKin : {in D, right_loop invg to}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun y : FinGroup.arg_sort (FinGroup.base aT) => @cancel (Finite.sort rT) (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x y) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x (@invg (FinGroup.base aT) y))) (inPhantom (@right_loop (Finite.sort rT) (FinGroup.arg_sort (FinGroup.base aT)) (@invg (FinGroup.base aT)) (@act aT (@gval aT D) (Finite.sort rT) to))) *)
by move=> a Da /= x; rewrite -actMin ?groupV // mulgV act1.
Qed.
Lemma actKVin : {in D, rev_right_loop invg to}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun y : FinGroup.arg_sort (FinGroup.base aT) => @cancel (Finite.sort rT) (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x (@invg (FinGroup.base aT) y)) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x y)) (inPhantom (@rev_right_loop (Finite.sort rT) (FinGroup.arg_sort (FinGroup.base aT)) (@invg (FinGroup.base aT)) (@act aT (@gval aT D) (Finite.sort rT) to))) *)
by move=> a Da /= x; rewrite -{2}(invgK a) actKin ?groupV.
Qed.
Lemma setactVin S a : a \in D -> to^* S a^-1 = to^~ a @^-1: S.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@setact aT (@gval aT D) rT to S (@invg (FinGroup.base aT) a)) (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by move=> Da; apply: can2_imset_pre; [apply: actKVin | apply: actKin].
Qed.
Lemma actXin x a i : a \in D -> to x (a ^+ i) = iter i (to^~ a) x.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@expgn (FinGroup.base aT) a i)) (@iter (Finite.sort rT) i (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) x) *)
move=> Da; elim: i => /= [|i <-]; first by rewrite act1.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@expgn (FinGroup.base aT) a (S i))) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x (@expgn (FinGroup.base aT) a i)) a) *)
by rewrite expgSr actMin ?groupX.
Qed.
Lemma afix1 : 'Fix_to(1) = setT.
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT D) rT to (oneg (group_set_of_baseGroupType (FinGroup.base aT)))) (@setTfor rT (Phant (Finite.sort rT))) *)
by apply/setP=> x; rewrite !inE sub1set inE act1 eqxx.
Qed.
Lemma afixD1 G : 'Fix_to(G^#) = 'Fix_to(G).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT D) rT to (@setD (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@set1 (FinGroup.finType (FinGroup.base aT)) (oneg (FinGroup.base aT))))) (@afix aT (@gval aT D) rT to (@gval aT G)) *)
by rewrite -{2}(setD1K (group1 G)) afixU afix1 setTI.
Qed.
Lemma orbit_refl G x : x \in orbit to G x.
Proof.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) *)
by rewrite -{1}[x]act1 mem_orbit.
Qed.
Local Notation orbit_rel A := (fun x y => x \in orbit to A y).
Lemma contra_orbit G x y : x \notin orbit to G y -> x != y.
Proof.
(* Goal: forall _ : is_true (negb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) y))))), is_true (negb (@eq_op (Finite.eqType rT) x y)) *)
by apply: contraNneq => ->; apply: orbit_refl.
Qed.
Lemma orbit_in_sym G : G \subset D -> symmetric (orbit_rel G).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @symmetric (Finite.sort rT) (fun x y : Finite.sort rT => @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) y)))) *)
move=> sGD; apply: symmetric_from_pre => x y /imsetP[a Ga].
(* Goal: forall _ : @eq (Finite.sort rT) x (@act aT (@gval aT D) (Finite.sort rT) to y a), is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) *)
by move/(canLR (actKin (subsetP sGD a Ga))) <-; rewrite mem_orbit ?groupV.
Qed.
Lemma orbit_in_trans G : G \subset D -> transitive (orbit_rel G).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @transitive (Finite.sort rT) (fun x y : Finite.sort rT => @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) y)))) *)
move=> sGD _ _ z /imsetP[a Ga ->] /imsetP[b Gb ->].
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to z b) a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) z)))) *)
by rewrite -actMin ?mem_orbit ?groupM // (subsetP sGD).
Qed.
Lemma orbit_in_eqP G x y :
G \subset D -> reflect (orbit to G x = orbit to G y) (x \in orbit to G y).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), Bool.reflect (@eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@orbit aT (@gval aT D) rT to (@gval aT G) y)) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) y)))) *)
move=> sGD; apply: (iffP idP) => [yGx|<-]; last exact: orbit_refl.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@orbit aT (@gval aT D) rT to (@gval aT G) y) *)
by apply/setP=> z; apply/idP/idP=> /orbit_in_trans-> //; rewrite orbit_in_sym.
Qed.
Lemma orbit_in_transl G x y z :
G \subset D -> y \in orbit to G x ->
(y \in orbit to G z) = (x \in orbit to G z).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))))), @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) z)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) z)))) *)
by move=> sGD Gxy; rewrite !(orbit_in_sym sGD _ z) (orbit_in_eqP y x sGD Gxy).
Qed.
Lemma orbit_act_in x a G :
G \subset D -> a \in G -> orbit to G (to x a) = orbit to G x.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))), @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) (@act aT (@gval aT D) (Finite.sort rT) to x a)) (@orbit aT (@gval aT D) rT to (@gval aT G) x) *)
by move=> sGD /mem_orbit/orbit_in_eqP->.
Qed.
Lemma orbit_actr_in x a G y :
G \subset D -> a \in G -> (to y a \in orbit to G x) = (y \in orbit to G x).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))), @eq bool (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) *)
by move=> sGD /mem_orbit/orbit_in_transl->.
Qed.
Lemma orbit_inv_in A x y :
A \subset D -> (y \in orbit to A^-1 x) = (x \in orbit to A y).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@invg (group_set_of_baseGroupType (FinGroup.base aT)) A) x)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to A y)))) *)
move/subsetP=> sAD; apply/imsetP/imsetP=> [] [a Aa ->].
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@invg (group_set_of_baseGroupType (FinGroup.base aT)) A))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to y a) x)) *)
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) x (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x a) x0)) *)
by exists a^-1; rewrite -?mem_invg ?actKin // -groupV sAD -?mem_invg.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@invg (group_set_of_baseGroupType (FinGroup.base aT)) A))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to y a) x)) *)
by exists a^-1; rewrite ?memV_invg ?actKin // sAD.
Qed.
Lemma orbit_lcoset_in A a x :
A \subset D -> a \in D ->
orbit to (a *: A) x = orbit to A (to x a).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a) A) x) (@orbit aT (@gval aT D) rT to A (@act aT (@gval aT D) (Finite.sort rT) to x a)) *)
move/subsetP=> sAD Da; apply/setP=> y; apply/imsetP/imsetP=> [] [b Ab ->{y}].
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a) A))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x a) b) (@act aT (@gval aT D) (Finite.sort rT) to x x0)) *)
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x b) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x a) x0)) *)
by exists (a^-1 * b); rewrite -?actMin ?mulKVg // ?sAD -?mem_lcoset.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a) A))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x a) b) (@act aT (@gval aT D) (Finite.sort rT) to x x0)) *)
by exists (a * b); rewrite ?mem_mulg ?set11 ?actMin // sAD.
Qed.
Lemma orbit_rcoset_in A a x y :
A \subset D -> a \in D ->
(to y a \in orbit to (A :* a) x) = (y \in orbit to A x).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq bool (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) A (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) x)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to A x)))) *)
move=> sAD Da; rewrite -orbit_inv_in ?mul_subG ?sub1set // invMg.
(* Goal: @eq bool (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@invg (group_set_of_baseGroupType (FinGroup.base aT)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) (@invg (group_set_of_baseGroupType (FinGroup.base aT)) A)) (@act aT (@gval aT D) (Finite.sort rT) to y a))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to A x)))) *)
by rewrite invg_set1 orbit_lcoset_in ?inv_subG ?groupV ?actKin ?orbit_inv_in.
Qed.
Lemma orbit_conjsg_in A a x y :
A \subset D -> a \in D ->
(to y a \in orbit to (A :^ a) (to x a)) = (y \in orbit to A x).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq bool (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@conjugate aT A a) (@act aT (@gval aT D) (Finite.sort rT) to x a))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to A x)))) *)
move=> sAD Da; rewrite conjsgE.
(* Goal: @eq bool (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@set1 (FinGroup.finType (FinGroup.base aT)) (@invg (FinGroup.base aT) a)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) A (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))) (@act aT (@gval aT D) (Finite.sort rT) to x a))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to A x)))) *)
by rewrite orbit_lcoset_in ?groupV ?mul_subG ?sub1set ?actKin ?orbit_rcoset_in.
Qed.
Lemma orbit1P G x : reflect (orbit to G x = [set x]) (x \in 'Fix_to(G)).
Proof.
(* Goal: Bool.reflect (@eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@set1 rT x)) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@gval aT G))))) *)
apply: (iffP afixP) => [xfix | xfix a Ga].
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) x *)
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@set1 rT x) *)
apply/eqP; rewrite eq_sym eqEsubset sub1set -{1}[x]act1 mem_imset //=.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) x *)
(* Goal: is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT x)))) *)
by apply/subsetP=> y; case/imsetP=> a Ga ->; rewrite inE xfix.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) x *)
by apply/set1P; rewrite -xfix mem_imset.
Qed.
Lemma card_orbit1 G x : #|orbit to G x| = 1%N -> orbit to G x = [set x].
Proof.
(* Goal: forall _ : @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (S O), @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@set1 rT x) *)
move=> orb1; apply/eqP; rewrite eq_sym eqEcard {}orb1 cards1.
(* Goal: is_true (andb (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (leq (S O) (S O))) *)
by rewrite sub1set orbit_refl.
Qed.
Lemma orbit_partition G S :
[acts G, on S | to] -> partition (orbit to G @: S) S.
Definition orbit_transversal A S := transversal (orbit to A @: S) S.
Lemma orbit_transversalP G S (P := orbit to G @: S)
(X := orbit_transversal G S) :
[acts G, on S | to] ->
[/\ is_transversal X P S, X \subset S,
{in X &, forall x y, (y \in orbit to G x) = (x == y)}
& forall x, x \in S -> exists2 a, a \in G & to x a \in X].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))), and4 (is_true (@is_transversal rT X P S)) (is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (fun x y : Finite.sort rT => @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)) (inPhantom (forall x y : Finite.sort rT, @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)))) (forall (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X))))) *)
move/orbit_partition; rewrite -/P => partP.
(* Goal: and4 (is_true (@is_transversal rT X P S)) (is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (fun x y : Finite.sort rT => @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)) (inPhantom (forall x y : Finite.sort rT, @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)))) (forall (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X))))) *)
have [/eqP defS tiP _] := and3P partP.
(* Goal: and4 (is_true (@is_transversal rT X P S)) (is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (fun x y : Finite.sort rT => @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)) (inPhantom (forall x y : Finite.sort rT, @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)))) (forall (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X))))) *)
have trXP: is_transversal X P S := transversalP partP.
(* Goal: and4 (is_true (@is_transversal rT X P S)) (is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (fun x y : Finite.sort rT => @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)) (inPhantom (forall x y : Finite.sort rT, @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)))) (forall (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X))))) *)
have sXS: X \subset S := transversal_sub trXP.
(* Goal: and4 (is_true (@is_transversal rT X P S)) (is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)) (fun x y : Finite.sort rT => @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)) (inPhantom (forall x y : Finite.sort rT, @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y)))) (forall (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X))))) *)
split=> // [x y Xx Xy /= | x Sx].
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))) *)
(* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y) *)
have Sx := subsetP sXS x Xx.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))) *)
(* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@eq_op (Finite.eqType rT) x y) *)
rewrite -(inj_in_eq (pblock_inj trXP)) // eq_pblock ?defS //.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))) *)
(* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@pblock rT P x)))) *)
by rewrite (def_pblock tiP (mem_imset _ Sx)) ?orbit_refl.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))) *)
have /imsetP[y Xy defxG]: orbit to G x \in pblock P @: X.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))) *)
(* Goal: is_true (@in_mem (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@mem (Finite.sort (set_of_finType rT)) (predPredType (Finite.sort (set_of_finType rT))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@pblock rT P) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))))) *)
by rewrite (pblock_transversal trXP) ?mem_imset.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT X)))) *)
suffices /orbitP[a Ga def_y]: y \in orbit to G x by exists a; rewrite ?def_y.
(* Goal: is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) *)
by rewrite defxG mem_pblock defS (subsetP sXS).
Qed.
Lemma group_set_astab S : group_set 'C(S | to).
Proof.
(* Goal: is_true (@group_set aT (@astab aT (@gval aT D) rT S to)) *)
apply/group_setP; split=> [|a b cSa cSb].
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base aT)) (@mulg (FinGroup.base aT) a b) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT S to)))) *)
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base aT)) (oneg (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT S to)))) *)
by rewrite !inE group1; apply/subsetP=> x _; rewrite inE act1.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base aT)) (@mulg (FinGroup.base aT) a b) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT S to)))) *)
rewrite !inE groupM ?(@astab_dom _ _ _ to S) //; apply/subsetP=> x Sx.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b)) x))))) *)
by rewrite inE actMin ?(@astab_dom _ _ _ to S) ?(astab_act _ Sx).
Qed.
Canonical astab_group S := group (group_set_astab S).
Lemma afix_gen_in A : A \subset D -> 'Fix_to(<<A>>) = 'Fix_to(A).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT D) rT to (@generated aT A)) (@afix aT (@gval aT D) rT to A) *)
move=> sAD; apply/eqP; rewrite eqEsubset afixS ?sub_gen //=.
(* Goal: is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to A))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@generated aT A))))) *)
by rewrite -astabCin gen_subG ?astabCin.
Qed.
Lemma afix_cycle_in a : a \in D -> 'Fix_to(<[a]>) = 'Fix_to[a].
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT D) rT to (@cycle aT a)) (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) *)
by move=> Da; rewrite afix_gen_in ?sub1set.
Qed.
Lemma afixYin A B :
A \subset D -> B \subset D -> 'Fix_to(A <*> B) = 'Fix_to(A) :&: 'Fix_to(B).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT D) rT to (@joing aT A B)) (@setI rT (@afix aT (@gval aT D) rT to A) (@afix aT (@gval aT D) rT to B)) *)
by move=> sAD sBD; rewrite afix_gen_in ?afixU // subUset sAD.
Qed.
Lemma afixMin G H :
G \subset D -> H \subset D -> 'Fix_to(G * H) = 'Fix_to(G) :&: 'Fix_to(H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT D) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@gval aT G) (@gval aT H))) (@setI rT (@afix aT (@gval aT D) rT to (@gval aT G)) (@afix aT (@gval aT D) rT to (@gval aT H))) *)
by move=> sGD sHD; rewrite -afix_gen_in ?mul_subG // genM_join afixYin.
Qed.
Lemma sub_astab1_in A x :
A \subset D -> (A \subset 'C[x | to]) = (x \in 'Fix_to(A)).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@set1 rT x) to)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to A)))) *)
by move=> sAD; rewrite astabCin ?sub1set.
Qed.
Lemma group_set_astabs S : group_set 'N(S | to).
Proof.
(* Goal: is_true (@group_set aT (@astabs aT (@gval aT D) rT S to)) *)
apply/group_setP; split=> [|a b cSa cSb].
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base aT)) (@mulg (FinGroup.base aT) a b) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))) *)
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base aT)) (oneg (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))) *)
by rewrite !inE group1; apply/subsetP=> x Sx; rewrite inE act1.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base aT)) (@mulg (FinGroup.base aT) a b) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))) *)
rewrite !inE groupM ?(@astabs_dom _ _ _ to S) //; apply/subsetP=> x Sx.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) *)
by rewrite inE actMin ?(@astabs_dom _ _ _ to S) ?astabs_act.
Qed.
Canonical astabs_group S := group (group_set_astabs S).
Lemma astab_norm S : 'N(S | to) \subset 'N('C(S | to)).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT (@astab aT (@gval aT D) rT S to))))) *)
apply/subsetP=> a nSa; rewrite inE sub_conjg; apply/subsetP=> b cSb.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT)) (@conjugate aT (@astab aT (@gval aT D) rT S to) (@invg (FinGroup.base aT) a))))) *)
have [Da Db] := (astabs_dom nSa, astab_dom cSb).
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT)) (@conjugate aT (@astab aT (@gval aT D) rT S to) (@invg (FinGroup.base aT) a))))) *)
rewrite mem_conjgV !inE groupJ //; apply/subsetP=> x Sx.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@conjg aT b a)) x))))) *)
rewrite inE !actMin ?groupM ?groupV //.
(* Goal: is_true (@eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x (@invg (FinGroup.base aT) a)) b) a) x) *)
by rewrite (astab_act cSb) ?actKVin ?astabs_act ?groupV.
Qed.
Lemma astab_normal S : 'C(S | to) <| 'N(S | to).
Proof.
(* Goal: is_true (@normal aT (@astab aT (@gval aT D) rT S to) (@astabs aT (@gval aT D) rT S to)) *)
by rewrite /normal astab_sub astab_norm.
Qed.
Lemma acts_sub_orbit G S x :
[acts G, on S | to] -> (orbit to G x \subset S) = (x \in S).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))), @eq bool (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
move/acts_act=> GactS.
(* Goal: @eq bool (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
apply/subsetP/idP=> [| Sx y]; first by apply; apply: orbit_refl.
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))), is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by case/orbitP=> a Ga <-{y}; rewrite GactS.
Qed.
Lemma acts_orbit G x : G \subset D -> [acts G, on orbit to G x | to].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT (@orbit aT (@gval aT D) rT to (@gval aT G) x) to)))) *)
move/subsetP=> sGD; apply/subsetP=> a Ga; rewrite !inE sGD //.
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))))))) *)
apply/subsetP=> _ /imsetP[b Gb ->].
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x b) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))))))) *)
by rewrite inE -actMin ?sGD // mem_imset ?groupM.
Qed.
Lemma acts_subnorm_fix A : [acts 'N_D(A), on 'Fix_to(D :&: A) | to].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) A)) to)))) *)
apply/subsetP=> a nAa; have [Da _] := setIP nAa; rewrite !inE Da.
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) A)))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) A))))))))) *)
apply/subsetP=> x Cx; rewrite inE; apply/afixP=> b DAb.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x a) b) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
have [Db _]:= setIP DAb; rewrite -actMin // conjgCV actMin ?groupJ ?groupV //.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x (@conjg aT b (@invg (FinGroup.base aT) a))) a) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
by rewrite /= (afixP Cx) // memJ_norm // groupV (subsetP (normsGI _ _) _ nAa).
Qed.
Lemma atrans_orbit G x : [transitive G, on orbit to G x | to].
Proof.
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT G) (@orbit aT (@gval aT D) rT to (@gval aT G) x) to) *)
by apply: mem_imset; apply: orbit_refl.
Qed.
Section OrbitStabilizer.
Variables (G : {group aT}) (x : rT).
Hypothesis sGD : G \subset D.
Let ssGD := subsetP sGD.
Lemma amove_act a : a \in G -> amove to G x (to x a) = 'C_G[x | to] :* a.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@amove aT (@gval aT D) rT to (@gval aT G) x (@act aT (@gval aT D) (Finite.sort rT) to x a)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) *)
move=> Ga; apply/setP=> b; have Da := ssGD Ga.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@amove aT (@gval aT D) rT to (@gval aT G) x (@act aT (@gval aT D) (Finite.sort rT) to x a))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))))) *)
rewrite mem_rcoset !(inE, sub1set) !groupMr ?groupV //.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x b) (@act aT (@gval aT D) (Finite.sort rT) to x a))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))) (@eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) b (@invg (FinGroup.base aT) a))) x))) *)
by case Gb: (b \in G); rewrite //= actMin ?groupV ?ssGD ?(canF_eq (actKVin Da)).
Qed.
Lemma amove_orbit : amove to G x @: orbit to G x = rcosets 'C_G[x | to] G.
Proof.
(* Goal: @eq (@set_of (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))) (Phant (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))))) (@Imset.imset rT (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))) (@amove aT (@gval aT D) rT to (@gval aT G) x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@rcosets aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT G)) *)
apply/setP => Ha; apply/imsetP/rcosetsP=> [[y] | [a Ga ->]].
(* Goal: @ex2 (Finite.sort rT) (fun x0 : Finite.sort rT => is_true (@in_mem (Finite.sort rT) x0 (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))))) (fun x0 : Finite.sort rT => @eq (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) (@amove aT (@gval aT D) rT to (@gval aT G) x x0)) *)
(* Goal: forall (_ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))))) (_ : @eq (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) Ha (@amove aT (@gval aT D) rT to (@gval aT G) x y)), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) Ha (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) x0))) *)
by case/imsetP=> b Gb -> ->{Ha y}; exists b => //; rewrite amove_act.
(* Goal: @ex2 (Finite.sort rT) (fun x0 : Finite.sort rT => is_true (@in_mem (Finite.sort rT) x0 (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))))) (fun x0 : Finite.sort rT => @eq (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) (@amove aT (@gval aT D) rT to (@gval aT G) x x0)) *)
by rewrite -amove_act //; exists (to x a); first apply: mem_orbit.
Qed.
Lemma amoveK :
{in orbit to G x, cancel (amove to G x) (fun Ca => to x (repr Ca))}.
Proof.
(* Goal: @prop_in1 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))) (fun x0 : Equality.sort (Finite.eqType rT) => @eq (Equality.sort (Finite.eqType rT)) ((fun Ca : @set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) => @act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) Ca)) (@amove aT (@gval aT D) rT to (@gval aT G) x x0)) x0) (inPhantom (@cancel (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (Equality.sort (Finite.eqType rT)) (@amove aT (@gval aT D) rT to (@gval aT G) x) (fun Ca : @set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) => @act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) Ca)))) *)
move=> _ /orbitP[a Ga <-]; rewrite amove_act //= -[G :&: _]/(gval _).
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@gval aT (@setI_group aT G (astab_group (@set1 rT x)))) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
case: repr_rcosetP => b; rewrite !(inE, sub1set)=> /and3P[Gb _ xbx].
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) b a)) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
by rewrite actMin ?ssGD ?(eqP xbx).
Qed.
Lemma orbit_stabilizer :
orbit to G x = [set to x (repr Ca) | Ca in rcosets 'C_G[x | to] G].
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) (@Imset.imset (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))) rT (fun Ca : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))) => @act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) Ca)) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base aT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base aT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base aT))) (@rcosets aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT G))))) *)
rewrite -amove_orbit -imset_comp /=; apply/setP=> z.
(* Goal: @eq bool (@in_mem (Finite.sort rT) z (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@in_mem (Finite.sort rT) z (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset rT rT (@funcomp (Finite.sort rT) (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) tt (fun Ca : @set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT))) => @act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) Ca)) (@amove aT (@gval aT D) rT to (@gval aT G) x)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x))))))) *)
by apply/idP/imsetP=> [xGz | [y xGy ->]]; first exists z; rewrite /= ?amoveK.
Qed.
Lemma act_reprK :
{in rcosets 'C_G[x | to] G, cancel (to x \o repr) (amove to G x)}.
Proof.
(* Goal: @prop_in1 (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base aT)))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base aT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base aT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base aT))) (@rcosets aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT G)))) (fun x0 : @set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT))) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@amove aT (@gval aT D) rT to (@gval aT G) x (@funcomp (Finite.sort rT) (FinGroup.arg_sort (FinGroup.base aT)) (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) tt (@act aT (@gval aT D) (Finite.sort rT) to x) (@repr (FinGroup.base aT)) x0)) x0) (inPhantom (@cancel (Finite.sort rT) (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@funcomp (Finite.sort rT) (FinGroup.arg_sort (FinGroup.base aT)) (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) tt (@act aT (@gval aT D) (Finite.sort rT) to x) (@repr (FinGroup.base aT))) (@amove aT (@gval aT D) rT to (@gval aT G) x))) *)
move=> _ /rcosetsP[a Ga ->] /=; rewrite amove_act ?rcoset_repr //.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) (@repr (FinGroup.base aT) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
rewrite -[G :&: _]/(gval _); case: repr_rcosetP => b /setIP[Gb _].
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) (@mulg (FinGroup.base aT) b a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
exact: groupM.
Qed.
End OrbitStabilizer.
Lemma card_orbit_in G x : G \subset D -> #|orbit to G x| = #|G : 'C_G[x | to]|.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@indexg aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to))) *)
move=> sGD; rewrite orbit_stabilizer 1?card_in_imset //.
(* Goal: @prop_in2 (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base aT))) (@rcosets aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT G)))) (fun x1 x2 : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))) => forall _ : @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) x1)) (@act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) x2)), @eq (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) x1 x2) (inPhantom (@injective (Finite.sort rT) (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT)))) (fun Ca : Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base aT))) => @act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) Ca)))) *)
exact: can_in_inj (act_reprK _).
Qed.
Lemma card_orbit_in_stab G x :
G \subset D -> (#|orbit to G x| * #|'C_G[x | to]|)%N = #|G|.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq nat (muln (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
by move=> sGD; rewrite mulnC card_orbit_in ?Lagrange ?subsetIl.
Qed.
Lemma acts_sum_card_orbit G S :
[acts G, on S | to] -> \sum_(T in orbit to G @: S) #|T| = #|S|.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))), @eq nat (@BigOp.bigop nat (Finite.sort (set_of_finType rT)) O (index_enum (set_of_finType rT)) (fun T : Finite.sort (set_of_finType rT) => @BigBody nat (Finite.sort (set_of_finType rT)) T addn (@in_mem (Finite.sort (set_of_finType rT)) T (@mem (Finite.sort (set_of_finType rT)) (predPredType (Finite.sort (set_of_finType rT))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT T))))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by move/orbit_partition/card_partition.
Qed.
Lemma astab_setact_in S a : a \in D -> 'C(to^* S a | to) = 'C(S | to) :^ a.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) rT (@setact aT (@gval aT D) rT to S a) to) (@conjugate aT (@astab aT (@gval aT D) rT S to) a) *)
move=> Da; apply/setP=> b; rewrite mem_conjg !inE -mem_conjg conjGid //.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT (@gval aT D) rT to S a))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x b) x)))))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) b (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT)) (@gval aT D)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@conjg aT b (@invg (FinGroup.base aT) a))) x)))))) *)
apply: andb_id2l => Db; rewrite sub_imset_pre; apply: eq_subset_r => x.
(* Goal: @eq bool (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x b) x)))))))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@conjg aT b (@invg (FinGroup.base aT) a))) x))))) *)
by rewrite !inE !actMin ?groupM ?groupV // invgK (canF_eq (actKVin Da)).
Qed.
Lemma astab1_act_in x a : a \in D -> 'C[to x a | to] = 'C[x | to] :^ a.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) rT (@set1 rT (@act aT (@gval aT D) (Finite.sort rT) to x a)) to) (@conjugate aT (@astab aT (@gval aT D) rT (@set1 rT x) to) a) *)
by move=> Da; rewrite -astab_setact_in // /setact imset_set1.
Qed.
Theorem Frobenius_Cauchy G S : [acts G, on S | to] ->
\sum_(a in G) #|'Fix_(S | to)[a]| = (#|orbit to G @: S| * #|G|)%N.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))), @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))))))) (muln (@card (set_of_finType rT) (@mem (Finite.sort (set_of_finType rT)) (predPredType (Finite.sort (set_of_finType rT))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
move=> GactS; have sGD := acts_dom GactS.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))))))) (muln (@card (set_of_finType rT) (@mem (Finite.sort (set_of_finType rT)) (predPredType (Finite.sort (set_of_finType rT))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
transitivity (\sum_(a in G) \sum_(x in 'Fix_(S | to)[a]) 1%N).
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun x : Finite.sort rT => @BigBody nat (Finite.sort rT) x addn (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))))) (Datatypes.S O))))) (muln (@card (set_of_finType rT) (@mem (Finite.sort (set_of_finType rT)) (predPredType (Finite.sort (set_of_finType rT))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))))))) (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun x : Finite.sort rT => @BigBody nat (Finite.sort rT) x addn (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))))) (Datatypes.S O))))) *)
by apply: eq_bigr => a _; rewrite -sum1_card.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun x : Finite.sort rT => @BigBody nat (Finite.sort rT) x addn (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))))) (Datatypes.S O))))) (muln (@card (set_of_finType rT) (@mem (Finite.sort (set_of_finType rT)) (predPredType (Finite.sort (set_of_finType rT))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
rewrite (exchange_big_dep (mem S)) /= => [|a x _]; last by case/setIP.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun j : Finite.sort rT => @BigBody nat (Finite.sort rT) j addn (@in_mem (Finite.sort rT) j (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) j (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))))) (muln (@card (set_of_finType rT) (@mem (@set_of rT (Phant (Finite.sort rT))) (predPredType (@set_of rT (Phant (Finite.sort rT)))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
rewrite (set_partition_big _ (orbit_partition GactS)) -sum_nat_const /=.
(* Goal: @eq nat (@BigOp.bigop nat (@set_of rT (Phant (Finite.sort rT))) O (index_enum (set_of_finType rT)) (fun A : @set_of rT (Phant (Finite.sort rT)) => @BigBody nat (@set_of rT (Phant (Finite.sort rT))) A addn (@in_mem (@set_of rT (Phant (Finite.sort rT))) A (@mem (@set_of rT (Phant (Finite.sort rT))) (predPredType (@set_of rT (Phant (Finite.sort rT)))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun x : Finite.sort rT => @BigBody nat (Finite.sort rT) x addn (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT A))) (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))))))) (@BigOp.bigop nat (@set_of rT (Phant (Finite.sort rT))) O (index_enum (set_of_finType rT)) (fun i : @set_of rT (Phant (Finite.sort rT)) => @BigBody nat (@set_of rT (Phant (Finite.sort rT))) i addn (@in_mem (@set_of rT (Phant (Finite.sort rT))) i (@mem (@set_of rT (Phant (Finite.sort rT))) (predPredType (@set_of rT (Phant (Finite.sort rT)))) (@SetDef.pred_of_set (set_of_finType rT) (@Imset.imset rT (set_of_finType rT) (@orbit aT (@gval aT D) rT to (@gval aT G)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))))) *)
apply: eq_bigr => _ /imsetP[x Sx ->].
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun x0 : Finite.sort rT => @BigBody nat (Finite.sort rT) x0 addn (@in_mem (Finite.sort rT) x0 (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) x0 (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
rewrite -(card_orbit_in_stab x sGD) -sum_nat_const.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun x0 : Finite.sort rT => @BigBody nat (Finite.sort rT) x0 addn (@in_mem (Finite.sort rT) x0 (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) x0 (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))))) (@BigOp.bigop nat (Finite.sort rT) O (index_enum rT) (fun i : Finite.sort rT => @BigBody nat (Finite.sort rT) i addn (@in_mem (Finite.sort rT) i (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to))))))) *)
apply: eq_bigr => y; rewrite orbit_in_sym // => /imsetP[a Ga defx].
(* Goal: @eq nat (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to))))) *)
rewrite defx astab1_act_in ?(subsetP sGD) //.
(* Goal: @eq nat (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@conjugate aT (@astab aT (@gval aT D) rT (@set1 rT y) to) a))))) *)
rewrite -{2}(conjGid Ga) -conjIg cardJg -sum1_card setIA (setIidPl sGD).
(* Goal: @eq nat (@BigOp.bigop nat (FinGroup.arg_sort (FinGroup.base aT)) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : FinGroup.arg_sort (FinGroup.base aT) => @BigBody nat (FinGroup.arg_sort (FinGroup.base aT)) i addn (andb (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) i (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT S (@afix aT (@gval aT D) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) i))))))) (Datatypes.S O))) (@BigOp.bigop nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) O (index_enum (FinGroup.arg_finType (FinGroup.base aT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @BigBody nat (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) i addn (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@set1 rT y))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) x)))))))))) (Datatypes.S O))) *)
by apply: eq_bigl => b; rewrite !(sub1set, inE) -(acts_act GactS Ga) -defx Sx.
Qed.
Lemma atrans_dvd_index_in G S :
G \subset D -> [transitive G, on S | to] -> #|S| %| #|G : 'C_G(S | to)|.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@atrans aT (@gval aT D) rT (@gval aT G) S to)), is_true (dvdn (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@indexg aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) *)
move=> sGD /imsetP[x Sx {1}->]; rewrite card_orbit_in //.
(* Goal: is_true (dvdn (@indexg aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to))) (@indexg aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) *)
by rewrite indexgS // setIS // astabS // sub1set.
Qed.
Lemma atrans_dvd_in G S :
G \subset D -> [transitive G, on S | to] -> #|S| %| #|G|.
Lemma atransPin G S :
G \subset D -> [transitive G, on S | to] ->
forall x, x \in S -> orbit to G x = S.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@atrans aT (@gval aT D) rT (@gval aT G) S to)) (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@gval aT D) rT to (@gval aT G) x) S *)
by move=> sGD /imsetP[y _ ->] x; apply/orbit_in_eqP.
Qed.
Lemma atransP2in G S :
G \subset D -> [transitive G, on S | to] ->
{in S &, forall x y, exists2 a, a \in G & y = to x a}.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@atrans aT (@gval aT D) rT (@gval aT G) S to)), @prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (fun x y : Finite.sort rT => @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@gval aT D) (Finite.sort rT) to x a))) (inPhantom (forall x y : Finite.sort rT, @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@gval aT D) (Finite.sort rT) to x a)))) *)
by move=> sGD transG x y /(atransPin sGD transG) <- /imsetP.
Qed.
Lemma atrans_acts_in G S :
G \subset D -> [transitive G, on S | to] -> [acts G, on S | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@atrans aT (@gval aT D) rT (@gval aT G) S to)), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT S to)))) *)
move=> sGD transG; apply/subsetP=> a Ga; rewrite !inE (subsetP sGD) //.
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))) *)
by apply/subsetP=> x /(atransPin sGD transG) <-; rewrite inE mem_imset.
Qed.
Lemma subgroup_transitivePin G H S x :
x \in S -> H \subset G -> G \subset D -> [transitive G, on S | to] ->
reflect ('C_G[x | to] * H = G) [transitive H, on S | to].
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@atrans aT (@gval aT D) rT (@gval aT G) S to)), Bool.reflect (@eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base aT))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT H)) (@gval aT G)) (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
move=> Sx sHG sGD trG; have sHD := subset_trans sHG sGD.
(* Goal: Bool.reflect (@eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base aT))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT H)) (@gval aT G)) (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
apply: (iffP idP) => [trH | defG].
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
(* Goal: @eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base aT))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT (@set1 rT x) to)) (@gval aT H)) (@gval aT G) *)
rewrite group_modr //; apply/setIidPl/subsetP=> a Ga.
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@set1 rT x) to) (@gval aT H))))) *)
have Sxa: to x a \in S by rewrite (acts_act (atrans_acts_in sGD trG)).
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@set1 rT x) to) (@gval aT H))))) *)
have [b Hb xab]:= atransP2in sHD trH Sxa Sx.
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@set1 rT x) to) (@gval aT H))))) *)
have Da := subsetP sGD a Ga; have Db := subsetP sHD b Hb.
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@set1 rT x) to) (@gval aT H))))) *)
rewrite -(mulgK b a) mem_mulg ?groupV // !inE groupM //= sub1set inE.
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
(* Goal: is_true (@eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b)) x) *)
by rewrite actMin -?xab.
(* Goal: is_true (@atrans aT (@gval aT D) rT (@gval aT H) S to) *)
apply/imsetP; exists x => //; apply/setP=> y; rewrite -(atransPin sGD trG Sx).
(* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT G) x)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@gval aT D) rT to (@gval aT H) x)))) *)
apply/imsetP/imsetP=> [] [a]; last by exists a; first apply: (subsetP sHG).
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (_ : @eq (Finite.sort rT) y (@act aT (@gval aT D) (Finite.sort rT) to x a)), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@gval aT D) (Finite.sort rT) to x x0)) *)
rewrite -defG => /imset2P[c b /setIP[_ cxc] Hb ->] ->.
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) c b)) (@act aT (@gval aT D) (Finite.sort rT) to x x0)) *)
exists b; rewrite ?actMin ?(astab_dom cxc) ?(subsetP sHD) //.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@act aT (@gval aT D) (Finite.sort rT) to x c) b) (@act aT (@gval aT D) (Finite.sort rT) to x b) *)
by rewrite (astab_act cxc) ?inE.
Qed.
End PartialAction.
Arguments orbit_transversal {aT D%g rT} to%act A%g S%g.
Arguments orbit_in_eqP {aT D rT to G x y}.
Arguments orbit1P {aT D rT to G x}.
Arguments contra_orbit [aT D rT] to G [x y].
Notation "''C' ( S | to )" := (astab_group to S) : Group_scope.
Notation "''C_' A ( S | to )" := (setI_group A 'C(S | to)) : Group_scope.
Notation "''C_' ( A ) ( S | to )" := (setI_group A 'C(S | to))
(only parsing) : Group_scope.
Notation "''C' [ x | to ]" := (astab_group to [set x%g]) : Group_scope.
Notation "''C_' A [ x | to ]" := (setI_group A 'C[x | to]) : Group_scope.
Notation "''C_' ( A ) [ x | to ]" := (setI_group A 'C[x | to])
(only parsing) : Group_scope.
Notation "''N' ( S | to )" := (astabs_group to S) : Group_scope.
Notation "''N_' A ( S | to )" := (setI_group A 'N(S | to)) : Group_scope.
Section TotalActions.
Variable (aT : finGroupType) (rT : finType).
Variable to : {action aT &-> rT}.
Implicit Types (a b : aT) (x y z : rT) (A B : {set aT}) (G H : {group aT}).
Implicit Type S : {set rT}.
Lemma actM x a b : to x (a * b) = to (to x a) b.
Proof.
(* Goal: @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b)) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) b) *)
by rewrite actMin ?inE.
Qed.
Lemma actK : right_loop invg to.
Proof.
(* Goal: @right_loop (Finite.sort rT) (FinGroup.arg_sort (FinGroup.base aT)) (@invg (FinGroup.base aT)) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to) *)
by move=> a; apply: actKin; rewrite inE.
Qed.
Lemma actKV : rev_right_loop invg to.
Proof.
(* Goal: @rev_right_loop (Finite.sort rT) (FinGroup.arg_sort (FinGroup.base aT)) (@invg (FinGroup.base aT)) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to) *)
by move=> a; apply: actKVin; rewrite inE.
Qed.
Lemma actX x a n : to x (a ^+ n) = iter n (to^~ a) x.
Proof.
(* Goal: @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x (@expgn (FinGroup.base aT) a n)) (@iter (Finite.sort rT) n (fun x : Finite.sort rT => @act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) x) *)
by elim: n => [|n /= <-]; rewrite ?act1 // -actM expgSr.
Qed.
Lemma actCJ a b x : to (to x a) b = to (to x b) (a ^ b).
Proof.
(* Goal: @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) b) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b) (@conjg aT a b)) *)
by rewrite !actM actK.
Qed.
Lemma actCJV a b x : to (to x a) b = to (to x (b ^ a^-1)) a.
Proof.
(* Goal: @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) b) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x (@conjg aT b (@invg (FinGroup.base aT) a))) a) *)
by rewrite (actCJ _ a) conjgKV.
Qed.
Lemma orbit_sym G x y : (x \in orbit to G y) = (y \in orbit to G x).
Proof.
(* Goal: @eq bool (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) y)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))) *)
exact/orbit_in_sym/subsetT.
Qed.
Lemma orbit_trans G x y z :
x \in orbit to G y -> y \in orbit to G z -> x \in orbit to G z.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) y))))) (_ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) z))))), is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) z)))) *)
exact/orbit_in_trans/subsetT.
Qed.
Lemma orbit_eqP G x y :
reflect (orbit to G x = orbit to G y) (x \in orbit to G y).
Proof.
(* Goal: Bool.reflect (@eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) y)) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) y)))) *)
exact/orbit_in_eqP/subsetT.
Qed.
Lemma orbit_transl G x y z :
y \in orbit to G x -> (y \in orbit to G z) = (x \in orbit to G z).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))), @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) z)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) z)))) *)
exact/orbit_in_transl/subsetT.
Qed.
Lemma orbit_act G a x: a \in G -> orbit to G (to x a) = orbit to G x.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a)) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x) *)
exact/orbit_act_in/subsetT.
Qed.
Lemma orbit_actr G a x y :
a \in G -> (to y a \in orbit to G x) = (y \in orbit to G x).
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))), @eq bool (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))) *)
by move/mem_orbit/orbit_transl; apply.
Qed.
Lemma orbit_eq_mem G x y :
(orbit to G x == orbit to G y) = (x \in orbit to G y).
Proof.
(* Goal: @eq bool (@eq_op (set_of_eqType rT) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) y)) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) y)))) *)
exact: sameP eqP (orbit_eqP G x y).
Qed.
Lemma orbit_inv A x y : (y \in orbit to A^-1 x) = (x \in orbit to A y).
Proof.
(* Goal: @eq bool (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@invg (group_set_of_baseGroupType (FinGroup.base aT)) A) x)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A y)))) *)
by rewrite orbit_inv_in ?subsetT.
Qed.
Lemma orbit_lcoset A a x : orbit to (a *: A) x = orbit to A (to x a).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a) A) x) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a)) *)
by rewrite orbit_lcoset_in ?subsetT ?inE.
Qed.
Lemma orbit_rcoset A a x y :
(to y a \in orbit to (A :* a) x) = (y \in orbit to A x).
Proof.
(* Goal: @eq bool (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) A (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) x)))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A x)))) *)
by rewrite orbit_rcoset_in ?subsetT ?inE.
Qed.
Lemma orbit_conjsg A a x y :
(to y a \in orbit to (A :^ a) (to x a)) = (y \in orbit to A x).
Proof.
(* Goal: @eq bool (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to y a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@conjugate aT A a) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a))))) (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A x)))) *)
by rewrite orbit_conjsg_in ?subsetT ?inE.
Qed.
Lemma astabP S a : reflect (forall x, x \in S -> to x a = x) (a \in 'C(S | to)).
Proof.
(* Goal: Bool.reflect (forall (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) x) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
apply: (iffP idP) => [cSa x|cSa]; first exact: astab_act.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
by rewrite !inE; apply/subsetP=> x Sx; rewrite inE cSa.
Qed.
Lemma astab1P x a : reflect (to x a = x) (a \in 'C[x | to]).
Proof.
(* Goal: Bool.reflect (@eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) x) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT x) to)))) *)
by rewrite !inE sub1set inE; apply: eqP.
Qed.
Lemma sub_astab1 A x : (A \subset 'C[x | to]) = (x \in 'Fix_to(A)).
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT x) to)))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A)))) *)
by rewrite sub_astab1_in ?subsetT.
Qed.
Lemma astabC A S : (A \subset 'C(S | to)) = (S \subset 'Fix_to(A)).
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A)))) *)
by rewrite astabCin ?subsetT.
Qed.
Lemma afix_cycle a : 'Fix_to(<[a]>) = 'Fix_to[a].
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@cycle aT a)) (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) *)
by rewrite afix_cycle_in ?inE.
Qed.
Lemma afix_gen A : 'Fix_to(<<A>>) = 'Fix_to(A).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@generated aT A)) (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A) *)
by rewrite afix_gen_in ?subsetT.
Qed.
Lemma afixM G H : 'Fix_to(G * H) = 'Fix_to(G) :&: 'Fix_to(H).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@gval aT G) (@gval aT H))) (@setI rT (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G)) (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT H))) *)
by rewrite afixMin ?subsetT.
Qed.
Lemma astabsP S a :
reflect (forall x, (to x a \in S) = (x \in S)) (a \in 'N(S | to)).
Proof.
(* Goal: Bool.reflect (forall x : Finite.sort rT, @eq bool (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
apply: (iffP idP) => [nSa x|nSa]; first exact: astabs_act.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
by rewrite !inE; apply/subsetP=> x; rewrite inE nSa.
Qed.
Lemma card_orbit G x : #|orbit to G x| = #|G : 'C_G[x | to]|.
Proof.
(* Goal: @eq nat (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))) (@indexg aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT x) to))) *)
by rewrite card_orbit_in ?subsetT.
Qed.
Lemma dvdn_orbit G x : #|orbit to G x| %| #|G|.
Proof.
(* Goal: is_true (dvdn (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
by rewrite card_orbit dvdn_indexg.
Qed.
Lemma card_orbit_stab G x : (#|orbit to G x| * #|'C_G[x | to]|)%N = #|G|.
Proof.
(* Goal: @eq nat (muln (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x)))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT x) to)))))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
by rewrite mulnC card_orbit Lagrange ?subsetIl.
Qed.
Lemma actsP A S : reflect {acts A, on S | to} [acts A, on S | to].
Proof.
(* Goal: Bool.reflect (@acts_on aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT A S to) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
apply: (iffP idP) => [nSA x|nSA]; first exact: acts_act.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
by apply/subsetP=> a Aa; rewrite !inE; apply/subsetP=> x; rewrite inE nSA.
Qed.
Arguments actsP {A S}.
Lemma setact_orbit A x b : to^* (orbit to A x) b = orbit to (A :^ b) (to x b).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A x) b) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@conjugate aT A b) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b)) *)
apply/setP=> y; apply/idP/idP=> /imsetP[_ /imsetP[a Aa ->] ->{y}].
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b) (@conjg aT a b)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A x) b)))) *)
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) b) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@conjugate aT A b) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b))))) *)
by rewrite actCJ mem_orbit ?memJ_conjg.
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b) (@conjg aT a b)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to A x) b)))) *)
by rewrite -actCJ mem_setact ?mem_orbit.
Qed.
Lemma astab_setact S a : 'C(to^* S a | to) = 'C(S | to) :^ a.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to S a) to) (@conjugate aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to) a) *)
apply/setP=> b; rewrite mem_conjg.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to S a) to)))) (@in_mem (FinGroup.sort (FinGroup.base aT)) (@conjg aT b (@invg (FinGroup.base aT) a)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
apply/astabP/astabP=> stab x => [Sx|].
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to S a)))), @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b) x *)
(* Goal: @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x (@conjg aT b (@invg (FinGroup.base aT) a))) x *)
by rewrite conjgE invgK !actM stab ?actK //; apply/imsetP; exists x.
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setact aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to S a)))), @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x b) x *)
by case/imsetP=> y Sy ->{x}; rewrite -actM conjgCV actM stab.
Qed.
Lemma astab1_act x a : 'C[to x a | to] = 'C[x | to] :^ a.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a)) to) (@conjugate aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT x) to) a) *)
by rewrite -astab_setact /setact imset_set1.
Qed.
Lemma atransP G S : [transitive G, on S | to] ->
forall x, x \in S -> orbit to G x = S.
Proof.
(* Goal: forall (_ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to)) (x : Finite.sort rT) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @eq (@set_of rT (Phant (Finite.sort rT))) (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT G) x) S *)
by case/imsetP=> x _ -> y; apply/orbit_eqP.
Qed.
Lemma atransP2 G S : [transitive G, on S | to] ->
{in S &, forall x y, exists2 a, a \in G & y = to x a}.
Proof.
(* Goal: forall _ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to), @prop_in2 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (fun x y : Finite.sort rT => @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a))) (inPhantom (forall x y : Finite.sort rT, @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq (Finite.sort rT) y (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a)))) *)
by move=> GtrS x y /(atransP GtrS) <- /imsetP.
Qed.
Lemma atrans_acts G S : [transitive G, on S | to] -> [acts G, on S | to].
Proof.
(* Goal: forall _ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
move=> GtrS; apply/subsetP=> a Ga; rewrite !inE.
(* Goal: is_true (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))) *)
by apply/subsetP=> x /(atransP GtrS) <-; rewrite inE mem_imset.
Qed.
Lemma atrans_supgroup G H S :
G \subset H -> [transitive G, on S | to] ->
[transitive H, on S | to] = [acts H, on S | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))))) (_ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to)), @eq bool (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT H) S to) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
move=> sGH trG; apply/idP/idP=> [|actH]; first exact: atrans_acts.
(* Goal: is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT H) S to) *)
case/imsetP: trG => x Sx defS; apply/imsetP; exists x => //.
(* Goal: @eq (Finite.sort (set_of_finType rT)) S (@orbit aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to (@gval aT H) x) *)
by apply/eqP; rewrite eqEsubset acts_sub_orbit ?Sx // defS imsetS.
Qed.
Lemma atrans_acts_card G S :
[transitive G, on S | to] =
[acts G, on S | to] && (#|orbit to G @: S| == 1%N).
Lemma atrans_dvd G S : [transitive G, on S | to] -> #|S| %| #|G|.
Proof.
(* Goal: forall _ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to), is_true (dvdn (@card rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) *)
by case/imsetP=> x _ ->; apply: dvdn_orbit.
Qed.
Lemma acts_fix_norm A B : A \subset 'N(B) -> [acts A, on 'Fix_to(B) | to].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT B)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to B) to)))) *)
move=> nAB; have:= acts_subnorm_fix to B; rewrite !setTI.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT (@setT_group aT (Phant (FinGroup.arg_sort (FinGroup.base aT))))) rT (@afix aT (@gval aT (@setT_group aT (Phant (FinGroup.arg_sort (FinGroup.base aT))))) rT to B) to)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@afix aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT to B) to)))) *)
exact: subset_trans.
Qed.
Lemma faithfulP A S :
reflect (forall a, a \in A -> {in S, to^~ a =1 id} -> a = 1)
[faithful A, on S | to].
Proof.
(* Goal: Bool.reflect (forall (a : FinGroup.arg_sort (FinGroup.base aT)) (_ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)))) (_ : @prop_in1 (Finite.sort rT) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (fun x : Finite.sort rT => @eq (Finite.sort rT) ((fun x0 : Finite.sort rT => @act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x0 a) x) ((fun x0 : Finite.sort rT => x0) x)) (inPhantom (@eqfun (Finite.sort rT) (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to x a) (fun x : Finite.sort rT => x)))), @eq (FinGroup.arg_sort (FinGroup.base aT)) a (oneg (FinGroup.base aT))) (@faithful aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT A S to) *)
apply: (iffP subsetP) => [Cto1 a Aa Ca | Cto1 a].
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) A (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT)) (oneg (group_set_of_baseGroupType (FinGroup.base aT)))))) *)
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base aT)) a (oneg (FinGroup.base aT)) *)
by apply/set1P; rewrite Cto1 // inE Aa; apply/astabP.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) A (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT)) (oneg (group_set_of_baseGroupType (FinGroup.base aT)))))) *)
by case/setIP=> Aa /astabP Ca; apply/set1P; apply: Cto1.
Qed.
Lemma astab_trans_gcore G S u :
[transitive G, on S | to] -> u \in S -> 'C(S | to) = gcore 'C[u | to] G.
Proof.
(* Goal: forall (_ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to)) (_ : is_true (@in_mem (Finite.sort rT) u (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to) (@gcore aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT u) to) (@gval aT G)) *)
move=> transG Su; apply/eqP; rewrite eqEsubset.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gcore aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT u) to) (@gval aT G))))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gcore aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT u) to) (@gval aT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to))))) *)
rewrite gcore_max ?astabS ?sub1set //=; last first.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gcore aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT u) to) (@gval aT G)))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to))))) *)
exact: subset_trans (atrans_acts transG) (astab_norm _ _).
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gcore aT (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT u) to) (@gval aT G)))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT S to)))) *)
apply/subsetP=> x cSx; apply/astabP=> uy.
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) uy (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))), @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to uy x) uy *)
case/(atransP2 transG Su) => y Gy ->{uy}.
(* Goal: @eq (Finite.sort rT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to u y) x) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort rT) to u y) *)
by apply/astab1P; rewrite astab1_act (bigcapP cSx).
Qed.
Theorem subgroup_transitiveP G H S x :
x \in S -> H \subset G -> [transitive G, on S | to] ->
reflect ('C_G[x | to] * H = G) [transitive H, on S | to].
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))) (_ : is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT G) S to)), Bool.reflect (@eq (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base aT))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@set1 rT x) to)) (@gval aT H)) (@gval aT G)) (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) rT (@gval aT H) S to) *)
by move=> Sx sHG; apply: subgroup_transitivePin (subsetT G).
Qed.
Lemma trans_subnorm_fixP x G H S :
let C := 'C_G[x | to] in let T := 'Fix_(S | to)(H) in
[transitive G, on S | to] -> x \in S -> H \subset C ->
reflect ((H :^: G) ::&: C = H :^: C) [transitive 'N_G(H), on T | to].
End TotalActions.
Arguments astabP {aT rT to S a}.
Arguments orbit_eqP {aT rT to G x y}.
Arguments astab1P {aT rT to x a}.
Arguments astabsP {aT rT to S a}.
Arguments atransP {aT rT to G S}.
Arguments actsP {aT rT to A S}.
Arguments faithfulP {aT rT to A S}.
Section Restrict.
Variables (aT : finGroupType) (D : {set aT}) (rT : Type).
Variables (to : action D rT) (A : {set aT}).
Definition ract of A \subset D := act to.
Variable sAD : A \subset D.
Lemma ract_is_action : is_action A (ract sAD).
Proof.
(* Goal: @is_action aT A rT (ract sAD) *)
rewrite /ract; case: to => f [injf fM].
(* Goal: @is_action aT A rT (@act aT D rT (@Action aT D rT f (@conj (@left_injective rT (FinGroup.sort (FinGroup.base aT)) rT f) (forall x : rT, @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) (fun a b : FinGroup.arg_sort (FinGroup.base aT) => @eq rT (f x (@mulg (FinGroup.base aT) a b)) (f (f x a) b)) (inPhantom (@act_morph aT rT f x))) injf fM))) *)
by split=> // x; apply: (sub_in2 (subsetP sAD)).
Qed.
End Restrict.
Notation "to \ sAD" := (raction to sAD) (at level 50) : action_scope.
Section ActBy.
Variables (aT : finGroupType) (D : {set aT}) (rT : finType).
Definition actby_cond (A : {set aT}) R (to : action D rT) : Prop :=
[acts A, on R | to].
Definition actby A R to of actby_cond A R to :=
fun x a => if (x \in R) && (a \in A) then to x a else x.
Variables (A : {group aT}) (R : {set rT}) (to : action D rT).
Hypothesis nRA : actby_cond A R to.
Lemma actby_is_action : is_action A (actby nRA).
Proof.
(* Goal: @is_action aT (@gval aT A) (Finite.sort rT) (@actby (@gval aT A) R to nRA) *)
rewrite /actby; split=> [a x y | x a b Aa Ab /=]; last first.
(* Goal: forall _ : @eq (Finite.sort rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) (if andb (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to y a else y), @eq (Finite.sort rT) x y *)
(* Goal: @eq (Finite.sort rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) (@mulg (FinGroup.base aT) a b) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b) else x) (if andb (@in_mem (Finite.sort rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) b (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) b else if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) *)
rewrite Aa Ab groupM // !andbT actMin ?(subsetP (acts_dom nRA)) //.
(* Goal: forall _ : @eq (Finite.sort rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) (if andb (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to y a else y), @eq (Finite.sort rT) x y *)
(* Goal: @eq (Finite.sort rT) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to (@act aT D (Finite.sort rT) to x a) b else x) (if @in_mem (Finite.sort rT) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to x a else x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to x a else x) b else if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to x a else x) *)
by case Rx: (x \in R); rewrite ?(acts_act nRA) ?Rx.
(* Goal: forall _ : @eq (Finite.sort rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) (if andb (@in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to y a else y), @eq (Finite.sort rT) x y *)
case Aa: (a \in A); rewrite ?andbF ?andbT //.
(* Goal: forall _ : @eq (Finite.sort rT) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to x a else x) (if @in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)) then @act aT D (Finite.sort rT) to y a else y), @eq (Finite.sort rT) x y *)
case Rx: (x \in R); case Ry: (y \in R) => // eqxy; first exact: act_inj eqxy.
(* Goal: @eq (Finite.sort rT) x y *)
(* Goal: @eq (Finite.sort rT) x y *)
by rewrite -eqxy (acts_act nRA Aa) Rx in Ry.
(* Goal: @eq (Finite.sort rT) x y *)
by rewrite eqxy (acts_act nRA Aa) Ry in Rx.
Qed.
Canonical action_by := Action actby_is_action.
Local Notation "<[nRA]>" := action_by : action_scope.
Lemma actbyE x a : x \in R -> a \in A -> <[nRA]>%act x a = to x a.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A))))), @eq (Finite.sort rT) (@act aT (@gval aT A) (Finite.sort rT) action_by x a) (@act aT D (Finite.sort rT) to x a) *)
by rewrite /= /actby => -> ->.
Qed.
Lemma afix_actby B : 'Fix_<[nRA]>(B) = ~: R :|: 'Fix_to(A :&: B).
Proof.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@afix aT (@gval aT A) rT action_by B) (@setU rT (@setC rT R) (@afix aT D rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) B))) *)
apply/setP=> x; rewrite !inE /= /actby.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @eq_op (Finite.eqType rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) x))))) (orb (negb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R)))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) B))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x)))))) *)
case: (x \in R); last by apply/subsetP=> a _; rewrite !inE.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @eq_op (Finite.eqType rT) (if andb true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) x))))) (orb (negb true) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) B))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x)))))) *)
apply/subsetP/subsetP=> [cBx a | cABx a Ba]; rewrite !inE.
(* Goal: is_true (@eq_op (Finite.eqType rT) (if andb true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) x) *)
(* Goal: forall _ : is_true (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)))), is_true (@eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x) *)
by case/andP=> Aa /cBx; rewrite inE Aa.
(* Goal: is_true (@eq_op (Finite.eqType rT) (if andb true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) then @act aT D (Finite.sort rT) to x a else x) x) *)
by case: ifP => //= Aa; have:= cABx a; rewrite !inE Aa => ->.
Qed.
Lemma astab_actby S : 'C(S | <[nRA]>) = 'C_A(R :&: S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT A) rT S action_by) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) (@astab aT D rT (@setI rT R S) to)) *)
apply/setP=> a; rewrite setIA (setIidPl (acts_dom nRA)) !inE.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT A) (Finite.sort rT) action_by x a) x)))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT R S))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x)))))) *)
case Aa: (a \in A) => //=; apply/subsetP/subsetP=> cRSa x => [|Sx].
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@actby (@gval aT A) R to nRA x a) x))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT R S)))), is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
by case/setIP=> Rx /cRSa; rewrite !inE actbyE.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@actby (@gval aT A) R to nRA x a) x))))) *)
by have:= cRSa x; rewrite !inE /= /actby Aa Sx; case: (x \in R) => //; apply.
Qed.
Lemma astabs_actby S : 'N(S | <[nRA]>) = 'N_A(R :&: S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT A) rT S action_by) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) (@astabs aT D rT (@setI rT R S) to)) *)
apply/setP=> a; rewrite setIA (setIidPl (acts_dom nRA)) !inE.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT A) (Finite.sort rT) action_by x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT R S))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT R S)))))))) *)
case Aa: (a \in A) => //=; apply/subsetP/subsetP=> nRSa x => [|Sx].
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @actby (@gval aT A) R to nRA x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT R S)))), is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setI rT R S))))))) *)
by case/setIP=> Rx /nRSa; rewrite !inE actbyE ?(acts_act nRA) ?Rx.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @actby (@gval aT A) R to nRA x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) *)
have:= nRSa x; rewrite !inE /= /actby Aa Sx ?(acts_act nRA) //.
(* Goal: forall _ : forall _ : is_true (andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) true), is_true (andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) (@in_mem (Finite.sort rT) (@act aT D (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))), is_true (@in_mem (Finite.sort rT) (if andb (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT R))) true then @act aT D (Finite.sort rT) to x a else x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by case: (x \in R) => //; apply.
Qed.
Lemma acts_actby (B : {set aT}) S :
[acts B, on S | <[nRA]>] = (B \subset A) && [acts B, on R :&: S | to].
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT A) rT S action_by)))) (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A)))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT (@setI rT R S) to))))) *)
by rewrite astabs_actby subsetI.
Qed.
End ActBy.
Notation "<[ nRA ] >" := (action_by nRA) : action_scope.
Section SubAction.
Variables (aT : finGroupType) (D : {group aT}).
Variables (rT : finType) (sP : pred rT) (sT : subFinType sP) (to : action D rT).
Implicit Type A : {set aT}.
Implicit Type u : sT.
Implicit Type S : {set sT}.
Definition subact_dom := 'N([set x | sP x] | to).
Canonical subact_dom_group := [group of subact_dom].
Implicit Type Na : {a | a \in subact_dom}.
Lemma sub_act_proof u Na : sP (to (val u) (val Na)).
Proof.
(* Goal: is_true (sP (@act aT (@gval aT D) (Finite.sort rT) to (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) u) (@val (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) subact_dom))) x) (@sig_subType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) subact_dom)))) Na))) *)
by case: Na => a /= /(astabs_act (val u)); rewrite !inE valP.
Qed.
Definition subact u a :=
if insub a is Some Na then Sub _ (sub_act_proof u Na) else u.
Lemma val_subact u a :
val (subact u a) = if a \in subact_dom then to (val u) a else val u.
Proof.
(* Goal: @eq (choice.Choice.sort (Finite.choiceType rT)) (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) (subact u a)) (if @in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) subact_dom)) then @act aT (@gval aT D) (Finite.sort rT) to (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) u) a else @val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) u) *)
by rewrite /subact -if_neg; case: insubP => [Na|] -> //=; rewrite SubK => ->.
Qed.
Lemma subact_is_action : is_action subact_dom subact.
Canonical subaction := Action subact_is_action.
Lemma astab_subact S : 'C(S | subaction) = subact_dom :&: 'C(val @: S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT subact_dom (@subFinType_finType (Finite.choiceType rT) sP sT) S subaction) (@setI (FinGroup.arg_finType (FinGroup.base aT)) subact_dom (@astab aT (@gval aT D) rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) to)) *)
apply/setP=> a; rewrite inE in_setI; apply: andb_id2l => sDa.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @subset (@subFinType_finType (Finite.choiceType rT) sP sT) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) (@SetDef.finset (@subFinType_finType (Finite.choiceType rT) sP sT) (fun x : Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT) => @eq_op (Finite.eqType (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) x))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) to)))) *)
have [Da _] := setIP sDa; rewrite !inE Da.
(* Goal: @eq bool (@subset (@subFinType_finType (Finite.choiceType rT) sP sT) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) (@SetDef.finset (@subFinType_finType (Finite.choiceType rT) sP sT) (fun x : Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT) => @eq_op (Finite.eqType (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) x))))) (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) x)))))) *)
apply/subsetP/subsetP=> [cSa _ /imsetP[x Sx ->] | cSa x Sx]; rewrite !inE.
(* Goal: is_true (@eq_op (Finite.eqType (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) x) *)
(* Goal: is_true (@eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) x) a) (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) x)) *)
by have:= cSa x Sx; rewrite inE -val_eqE val_subact sDa.
(* Goal: is_true (@eq_op (Finite.eqType (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) x) *)
by have:= cSa _ (mem_imset val Sx); rewrite inE -val_eqE val_subact sDa.
Qed.
Lemma astabs_subact S : 'N(S | subaction) = subact_dom :&: 'N(val @: S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT subact_dom (@subFinType_finType (Finite.choiceType rT) sP sT) S subaction) (@setI (FinGroup.arg_finType (FinGroup.base aT)) subact_dom (@astabs aT (@gval aT D) rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) to)) *)
apply/setP=> a; rewrite inE in_setI; apply: andb_id2l => sDa.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @subset (@subFinType_finType (Finite.choiceType rT) sP sT) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) (@preimset (@subFinType_finType (Finite.choiceType rT) sP sT) (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (fun x : Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT) => @act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) to)))) *)
have [Da _] := setIP sDa; rewrite !inE Da.
(* Goal: @eq bool (@subset (@subFinType_finType (Finite.choiceType rT) sP sT) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) (@preimset (@subFinType_finType (Finite.choiceType rT) sP sT) (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (fun x : Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT) => @act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)))))) (andb true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)))))))))) *)
apply/subsetP/subsetP=> [nSa _ /imsetP[x Sx ->] | nSa x Sx]; rewrite !inE.
(* Goal: is_true (@in_mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) *)
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT) x) a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@Imset.imset (@subFinType_finType (Finite.choiceType rT) sP sT) rT (@val (choice.Choice.sort (Finite.choiceType rT)) sP (@subFin_sort (Finite.choiceType rT) sP sT)) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S)))))) *)
by have:= nSa x Sx; rewrite inE => /(mem_imset val); rewrite val_subact sDa.
(* Goal: is_true (@in_mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) *)
have:= nSa _ (mem_imset val Sx); rewrite inE => /imsetP[y Sy def_y].
(* Goal: is_true (@in_mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (@act aT subact_dom (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) subaction x a) (@mem (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT)) (predPredType (Finite.sort (@subFinType_finType (Finite.choiceType rT) sP sT))) (@SetDef.pred_of_set (@subFinType_finType (Finite.choiceType rT) sP sT) S))) *)
by rewrite ((_ a =P y) _) // -val_eqE val_subact sDa def_y.
Qed.
Lemma afix_subact A :
A \subset subact_dom -> 'Fix_subaction(A) = val @^-1: 'Fix_to(A).
End SubAction.
Notation "to ^?" := (subaction _ to)
(at level 2, format "to ^?") : action_scope.
Section QuotientAction.
Variables (aT : finGroupType) (D : {group aT}) (rT : finGroupType).
Variables (to : action D rT) (H : {group rT}).
Definition qact_dom := 'N(rcosets H 'N(H) | to^*).
Canonical qact_dom_group := [group of qact_dom].
Local Notation subdom := (subact_dom (coset_range H) to^*).
Fact qact_subdomE : subdom = qact_dom.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@subact_dom aT D (set_of_finType (FinGroup.finType (FinGroup.base rT))) (@pred_of_simpl (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@coset_range rT (@gval rT H))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) to)) qact_dom *)
by congr 'N(_|_); apply/setP=> Hx; rewrite !inE genGid.
Qed.
Lemma qact_proof : qact_dom \subset subdom.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) qact_dom)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@subact_dom aT D (set_of_finType (FinGroup.finType (FinGroup.base rT))) (@pred_of_simpl (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@coset_range rT (@gval rT H))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) to))))) *)
by rewrite qact_subdomE.
Qed.
Definition qact : coset_of H -> aT -> coset_of H := act (to^*^? \ qact_proof).
Canonical quotient_action := [action of qact].
Lemma acts_qact_dom : [acts qact_dom, on 'N(H) | to].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) qact_dom)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)) to)))) *)
apply/subsetP=> a nNa; rewrite !inE (astabs_dom nNa); apply/subsetP=> x Nx.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) to x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)))))))) *)
have: H :* x \in rcosets H 'N(H) by rewrite -rcosetE mem_imset.
(* Goal: forall _ : is_true (@in_mem (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base rT))) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base rT))) (@rcosets rT (@gval rT H) (@normaliser rT (@gval rT H)))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) to x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)))))))) *)
rewrite inE -(astabs_act _ nNa) => /rcosetsP[y Ny defHy].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) to x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H))))) *)
have: to x a \in H :* y by rewrite -defHy (mem_imset (to^~a)) ?rcoset_refl.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) to x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) y))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) to x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H))))) *)
by apply: subsetP; rewrite mul_subG ?sub1set ?normG.
Qed.
Lemma qactEcond x a :
x \in 'N(H) ->
quotient_action (coset H x) a
= coset H (if a \in qact_dom then to x a else x).
Lemma qactE x a :
x \in 'N(H) -> a \in qact_dom ->
quotient_action (coset H x) a = coset H (to x a).
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) qact_dom)))), @eq (@coset_of rT (@gval rT H)) (@act aT qact_dom (@coset_of rT (@gval rT H)) quotient_action (@coset rT (@gval rT H) x) a) (@coset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) to x a)) *)
by move=> Nx nNa; rewrite qactEcond ?nNa.
Qed.
Lemma acts_quotient (A : {set aT}) (B : {set rT}) :
A \subset 'N_qact_dom(B | to) -> [acts A, on B / H | quotient_action].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) qact_dom (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) B to))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT qact_dom (@coset_finType rT (@gval rT H)) (@quotient rT B (@gval rT H)) quotient_action)))) *)
move=> nBA; apply: subset_trans {A}nBA _; apply/subsetP=> a /setIP[dHa nBa].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT qact_dom (@coset_finType rT (@gval rT H)) (@quotient rT B (@gval rT H)) quotient_action)))) *)
rewrite inE dHa inE; apply/subsetP=> _ /morphimP[x nHx Bx ->].
(* Goal: is_true (@in_mem (Finite.sort (@coset_finType rT (@gval rT H))) (@mfun rT (@coset_groupType rT (@gval rT H)) (@normaliser rT (@gval rT H)) (@coset_morphism rT (@gval rT H)) x) (@mem (Finite.sort (@coset_finType rT (@gval rT H))) (predPredType (Finite.sort (@coset_finType rT (@gval rT H)))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT H)) (@preimset (@coset_finType rT (@gval rT H)) (Finite.sort (@coset_finType rT (@gval rT H))) (fun x : Finite.sort (@coset_finType rT (@gval rT H)) => @act aT qact_dom (Finite.sort (@coset_finType rT (@gval rT H))) quotient_action x a) (@mem (Finite.sort (@coset_finType rT (@gval rT H))) (predPredType (Finite.sort (@coset_finType rT (@gval rT H)))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT H)) (@quotient rT B (@gval rT H)))))))) *)
rewrite inE /= qactE //.
(* Goal: is_true (@in_mem (@coset_of rT (@gval rT H)) (@coset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) to x a)) (@mem (@coset_of rT (@gval rT H)) (predPredType (@coset_of rT (@gval rT H))) (@SetDef.pred_of_set (@coset_finType rT (@gval rT H)) (@quotient rT B (@gval rT H))))) *)
by rewrite mem_morphim ?(acts_act acts_qact_dom) ?(astabs_act _ nBa).
Qed.
Lemma astabs_quotient (G : {group rT}) :
H <| G -> 'N(G / H | quotient_action) = 'N_qact_dom(G | to).
Proof.
(* Goal: forall _ : is_true (@normal rT (@gval rT H) (@gval rT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT qact_dom (@coset_finType rT (@gval rT H)) (@quotient rT (@gval rT G) (@gval rT H)) quotient_action) (@setI (FinGroup.arg_finType (FinGroup.base aT)) qact_dom (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) to)) *)
move=> nsHG; have [_ nHG] := andP nsHG.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT qact_dom (@coset_finType rT (@gval rT H)) (@quotient rT (@gval rT G) (@gval rT H)) quotient_action) (@setI (FinGroup.arg_finType (FinGroup.base aT)) qact_dom (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) to)) *)
apply/eqP; rewrite eqEsubset acts_quotient // andbT.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT qact_dom (@coset_finType rT (@gval rT H)) (@quotient rT (@gval rT G) (@gval rT H)) quotient_action))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) qact_dom (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) to))))) *)
apply/subsetP=> a nGa; have dHa := astabs_dom nGa; have [Da _]:= setIdP dHa.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) qact_dom (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) to))))) *)
rewrite inE dHa 2!inE Da; apply/subsetP=> x Gx; have nHx := subsetP nHG x Gx.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) to x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G))))))) *)
rewrite -(quotientGK nsHG) 2!inE (acts_act acts_qact_dom) ?nHx //= inE.
(* Goal: is_true (@in_mem (@coset_of rT (@gval rT H)) (@coset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) to x a)) (@mem (@coset_of rT (@gval rT H)) (predPredType (@coset_of rT (@gval rT H))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient rT (@gval rT G) (@gval rT H))))) *)
by rewrite -qactE // (astabs_act _ nGa) mem_morphim.
Qed.
End QuotientAction.
Notation "to / H" := (quotient_action to H) : action_scope.
Section ModAction.
Variables (aT : finGroupType) (D : {group aT}) (rT : finType).
Variable to : action D rT.
Implicit Types (G : {group aT}) (S : {set rT}).
Section GenericMod.
Variable H : {group aT}.
Local Notation dom := 'N_D(H).
Local Notation range := 'Fix_to(D :&: H).
Let acts_dom : {acts dom, on range | to} := acts_act (acts_subnorm_fix to H).
Definition modact x (Ha : coset_of H) :=
if x \in range then to x (repr (D :&: Ha)) else x.
Lemma modactEcond x a :
a \in dom -> modact x (coset H a) = (if x \in range then to x a else x).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT (@gval aT H)))))), @eq (Finite.sort rT) (modact x (@coset aT (@gval aT H) a)) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to x a else x) *)
case/setIP=> Da Na; case: ifP => Cx; rewrite /modact Cx //.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@set_of_coset aT (@gval aT H) (@coset aT (@gval aT H) a))))) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
rewrite val_coset // -group_modr ?sub1set //.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@repr (FinGroup.base aT) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H)) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)))) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
case: (repr _) / (repr_rcosetP (D :&: H) a) => a' Ha'.
(* Goal: @eq (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) a' a)) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
by rewrite actMin ?(afixP Cx _ Ha') //; case/setIP: Ha'.
Qed.
Lemma modactE x a :
a \in D -> a \in 'N(H) -> x \in range -> modact x (coset H a) = to x a.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT (@gval aT H)))))) (_ : is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))))), @eq (Finite.sort rT) (modact x (@coset aT (@gval aT H) a)) (@act aT (@gval aT D) (Finite.sort rT) to x a) *)
by move=> Da Na Rx; rewrite modactEcond ?Rx // inE Da.
Qed.
Lemma modact_is_action : is_action (D / H) modact.
Proof.
(* Goal: @is_action (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (Finite.sort rT) modact *)
split=> [Ha x y | x Ha Hb]; last first.
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) Ha (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT D) (@gval aT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) Hb (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT D) (@gval aT H)))))), @eq (Finite.sort rT) (modact x (@mulg (FinGroup.base (@coset_groupType aT (@gval aT H))) Ha Hb)) (modact (modact x Ha) Hb) *)
case/morphimP=> a Na Da ->{Ha}; case/morphimP=> b Nb Db ->{Hb}.
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
(* Goal: @eq (Finite.sort rT) (modact x (@mulg (FinGroup.base (@coset_groupType aT (@gval aT H))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) b))) (modact (modact x (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) b)) *)
rewrite -morphM //= !modactEcond // ?groupM ?(introT setIP _) //.
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
(* Goal: @eq (Finite.sort rT) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to x (@mulg (FinGroup.base aT) a b) else x) (if @in_mem (Finite.sort rT) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to x a else x) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to x a else x) b else if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to x a else x) *)
by case: ifP => Cx; rewrite ?(acts_dom, Cx, actMin, introT setIP _).
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
case: (set_0Vmem (D :&: Ha)) => [Da0 | [a /setIP[Da NHa]]].
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
by rewrite /modact Da0 repr_set0 !act1 !if_same.
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
have Na := subsetP (coset_norm _) _ NHa.
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
have NDa: a \in 'N_D(H) by rewrite inE Da.
(* Goal: forall _ : @eq (Finite.sort rT) (modact x Ha) (modact y Ha), @eq (Finite.sort rT) x y *)
rewrite -(coset_mem NHa) !modactEcond //.
(* Goal: forall _ : @eq (Finite.sort rT) (if @in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to x a else x) (if @in_mem (Finite.sort rT) y (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort rT) to y a else y), @eq (Finite.sort rT) x y *)
do 2![case: ifP]=> Cy Cx // eqxy; first exact: act_inj eqxy.
(* Goal: @eq (Finite.sort rT) x y *)
(* Goal: @eq (Finite.sort rT) x y *)
by rewrite -eqxy acts_dom ?Cx in Cy.
(* Goal: @eq (Finite.sort rT) x y *)
by rewrite eqxy acts_dom ?Cy in Cx.
Qed.
Canonical mod_action := Action modact_is_action.
Section Stabilizers.
Variable S : {set rT}.
Hypothesis cSH : H \subset 'C(S | to).
Let fixSH : S \subset 'Fix_to(D :&: H).
Proof.
(* Goal: is_true (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@afix aT (@gval aT D) rT to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H)))))) *)
by rewrite -astabCin ?subsetIl // subIset ?cSH ?orbT.
Qed.
Lemma astabs_mod : 'N(S | mod_action) = 'N(S | to) / H.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))))) (@astabs (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action) (@quotient aT (@astabs aT (@gval aT D) rT S to) (@gval aT H)) *)
apply/setP=> Ha; apply/idP/morphimP=> [nSa | [a nHa nSa ->]].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astabs (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
(* Goal: @morphim_spec aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@astabs aT (@gval aT D) rT S to) Ha (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H))) *)
case/morphimP: (astabs_dom nSa) => a nHa Da defHa.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astabs (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
(* Goal: @morphim_spec aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@astabs aT (@gval aT D) rT S to) Ha (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H))) *)
exists a => //; rewrite !inE Da; apply/subsetP=> x Sx; rewrite !inE.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astabs (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
(* Goal: is_true (@in_mem (Finite.sort rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S))) *)
by have:= Sx; rewrite -(astabs_act x nSa) defHa /= modactE ?(subsetP fixSH).
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astabs (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
have Da := astabs_dom nSa; rewrite !inE mem_quotient //; apply/subsetP=> x Sx.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@preimset rT (Finite.sort rT) (fun x : Finite.sort rT => @act (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (Finite.sort rT) mod_action x (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT S)))))) *)
by rewrite !inE /= modactE ?(astabs_act x nSa) ?(subsetP fixSH).
Qed.
Lemma astab_mod : 'C(S | mod_action) = 'C(S | to) / H.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action) (@quotient aT (@astab aT (@gval aT D) rT S to) (@gval aT H)) *)
apply/setP=> Ha; apply/idP/morphimP=> [cSa | [a nHa cSa ->]].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
(* Goal: @morphim_spec aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@astab aT (@gval aT D) rT S to) Ha (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H))) *)
case/morphimP: (astab_dom cSa) => a nHa Da defHa.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
(* Goal: @morphim_spec aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@astab aT (@gval aT D) rT S to) Ha (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H))) *)
exists a => //; rewrite !inE Da; apply/subsetP=> x Sx; rewrite !inE.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
(* Goal: is_true (@eq_op (Finite.eqType rT) (@act aT (@gval aT D) (Finite.sort rT) to x a) x) *)
by rewrite -{2}[x](astab_act cSa) // defHa /= modactE ?(subsetP fixSH).
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT S mod_action)))) *)
have Da := astab_dom cSa; rewrite !inE mem_quotient //; apply/subsetP=> x Sx.
(* Goal: is_true (@in_mem (Finite.sort rT) x (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (Finite.sort rT) mod_action x (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) x))))) *)
by rewrite !inE /= modactE ?(astab_act cSa) ?(subsetP fixSH).
Qed.
End Stabilizers.
Lemma afix_mod G S :
H \subset 'C(S | to) -> G \subset 'N_D(H) ->
'Fix_(S | mod_action)(G / H) = 'Fix_(S | to)(G).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT S to))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT (@gval aT H))))))), @eq (@set_of rT (Phant (Finite.sort rT))) (@setI rT S (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT mod_action (@quotient aT (@gval aT G) (@gval aT H)))) (@setI rT S (@afix aT (@gval aT D) rT to (@gval aT G))) *)
move=> cSH /subsetIP[sGD nHG].
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@setI rT S (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT mod_action (@quotient aT (@gval aT G) (@gval aT H)))) (@setI rT S (@afix aT (@gval aT D) rT to (@gval aT G))) *)
apply/eqP; rewrite eqEsubset !subsetI !subsetIl /= -!astabCin ?quotientS //.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@setI rT S (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT mod_action (@quotient aT (@gval aT G) (@gval aT H)))) to)))) (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT G) (@gval aT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT (@setI rT S (@afix aT (@gval aT D) rT to (@gval aT G))) mod_action))))) *)
have cfixH F: H \subset 'C(S :&: F | to).
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@setI rT S (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT mod_action (@quotient aT (@gval aT G) (@gval aT H)))) to)))) (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT G) (@gval aT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT (@setI rT S (@afix aT (@gval aT D) rT to (@gval aT G))) mod_action))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@setI rT S F) to)))) *)
by rewrite (subset_trans cSH) // astabS ?subsetIl.
(* Goal: is_true (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@setI rT S (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT mod_action (@quotient aT (@gval aT G) (@gval aT H)))) to)))) (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT G) (@gval aT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@astab (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT (@setI rT S (@afix aT (@gval aT D) rT to (@gval aT G))) mod_action))))) *)
rewrite andbC astab_mod ?quotientS //=; last by rewrite astabCin ?subsetIr.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) rT (@setI rT S (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) rT mod_action (@quotient aT (@gval aT G) (@gval aT H)))) to)))) *)
by rewrite -(quotientSGK nHG) //= -astab_mod // astabCin ?quotientS ?subsetIr.
Qed.
End GenericMod.
Lemma modact_faithful G S :
[faithful G / 'C_G(S | to), on S | mod_action 'C_G(S | to)].
Proof.
(* Goal: is_true (@faithful (@coset_groupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to))) (@quotient aT (@gval aT D) (@gval aT (@setI_group aT G (@astab_group aT D rT to S)))) rT (@quotient aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to))) S (mod_action (@setI_group aT G (@astab_group aT D rT to S)))) *)
rewrite /faithful astab_mod ?subsetIr //=.
(* Goal: is_true (@subset (FinGroup.arg_finType (@coset_baseGroupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) (@mem (@coset_of aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to))) (predPredType (@coset_of aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) (@setI (FinGroup.arg_finType (@coset_baseGroupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) (@quotient aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to))) (@quotient aT (@astab aT (@gval aT D) rT S to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))))) (@mem (@coset_of aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to))) (predPredType (@coset_of aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))) (oneg (group_set_of_baseGroupType (@coset_baseGroupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) rT S to)))))))) *)
by rewrite -quotientIG ?subsetIr ?trivg_quotient.
Qed.
End ModAction.
Notation "to %% H" := (mod_action to H) : action_scope.
Section ActPerm.
Variables (aT : finGroupType) (D : {set aT}) (rT : finType).
Variable to : action D rT.
Definition actperm a := perm (act_inj to a).
Lemma actpermM : {in D &, {morph actperm : a b / a * b}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) (fun x y : FinGroup.arg_sort (FinGroup.base aT) => @eq (@perm_of rT (Phant (Finite.sort rT))) (actperm ((fun a b : FinGroup.arg_sort (FinGroup.base aT) => @mulg (FinGroup.base aT) a b) x y)) ((fun a b : @perm_of rT (Phant (Finite.sort rT)) => @mulg (perm_of_baseFinGroupType rT) a b) (actperm x) (actperm y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base aT)) (@perm_of rT (Phant (Finite.sort rT))) actperm (fun a b : FinGroup.arg_sort (FinGroup.base aT) => @mulg (FinGroup.base aT) a b) (fun a b : @perm_of rT (Phant (Finite.sort rT)) => @mulg (perm_of_baseFinGroupType rT) a b))) *)
by move=> a b Da Db; apply/permP=> x; rewrite permM !permE actMin.
Qed.
Canonical actperm_morphism := Morphism actpermM.
Lemma actpermE a x : actperm a x = to x a.
Proof.
(* Goal: @eq (Finite.sort rT) (@PermDef.fun_of_perm rT (actperm a) x) (@act aT D (Finite.sort rT) to x a) *)
by rewrite permE.
Qed.
Lemma actpermK x a : aperm x (actperm a) = to x a.
Proof.
(* Goal: @eq (Finite.sort rT) (@aperm rT x (actperm a)) (@act aT D (Finite.sort rT) to x a) *)
exact: actpermE.
Qed.
Lemma ker_actperm : 'ker actperm = 'C(setT | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@ker aT (perm_of_finGroupType rT) D actperm_morphism (@MorPhantom aT (perm_of_finGroupType rT) actperm)) (@astab aT D rT (@setTfor rT (Phant (Finite.sort rT))) to) *)
congr (_ :&: _); apply/setP=> a; rewrite !inE /=.
(* Goal: @eq bool (@eq_op (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType rT))) (actperm a) (oneg (perm_of_baseFinGroupType rT))) (@subset rT (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@setTfor rT (Phant (Finite.sort rT))))) (@mem (Finite.sort rT) (predPredType (Finite.sort rT)) (@SetDef.pred_of_set rT (@SetDef.finset rT (fun x : Finite.sort rT => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
apply/eqP/subsetP=> [a1 x _ | a1]; first by rewrite inE -actpermE a1 perm1.
(* Goal: @eq (Equality.sort (Finite.eqType (FinGroup.finType (perm_of_baseFinGroupType rT)))) (actperm a) (oneg (perm_of_baseFinGroupType rT)) *)
by apply/permP=> x; apply/eqP; have:= a1 x; rewrite !inE actpermE perm1 => ->.
Qed.
End ActPerm.
Section RestrictActionTheory.
Variables (aT : finGroupType) (D : {set aT}) (rT : finType).
Variables (to : action D rT).
Lemma faithful_isom (A : {group aT}) S (nSA : actby_cond A S to) :
[faithful A, on S | to] -> isom A (actperm <[nSA]> @* A) (actperm <[nSA]>).
Proof.
(* Goal: forall _ : is_true (@faithful aT D rT (@gval aT A) S to), is_true (@isom aT (perm_of_finGroupType rT) (@gval aT A) (@morphim aT (perm_of_finGroupType rT) (@gval aT A) (@actperm_morphism aT (@gval aT A) rT (@action_by aT D rT A S to nSA)) (@MorPhantom aT (perm_of_finGroupType rT) (@actperm aT (@gval aT A) rT (@action_by aT D rT A S to nSA))) (@gval aT A)) (@actperm aT (@gval aT A) rT (@action_by aT D rT A S to nSA))) *)
by move=> ffulAS; apply/isomP; rewrite ker_actperm astab_actby setIT.
Qed.
Variables (A : {set aT}) (sAD : A \subset D).
Lemma ractpermE : actperm (to \ sAD) =1 actperm to.
Proof.
(* Goal: @eqfun (@perm_of rT (Phant (Finite.sort rT))) (FinGroup.arg_sort (FinGroup.base aT)) (@actperm aT A rT (@raction aT D (Finite.sort rT) to A sAD)) (@actperm aT D rT to) *)
by move=> a; apply/permP=> x; rewrite !permE.
Qed.
Lemma astab_ract S : 'C(S | to \ sAD) = 'C_A(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT A rT S (@raction aT D (Finite.sort rT) to A sAD)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) A (@astab aT D rT S to)) *)
by rewrite setIA (setIidPl sAD).
Qed.
Lemma astabs_ract S : 'N(S | to \ sAD) = 'N_A(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT A rT S (@raction aT D (Finite.sort rT) to A sAD)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) A (@astabs aT D rT S to)) *)
by rewrite setIA (setIidPl sAD).
Qed.
Lemma acts_ract (B : {set aT}) S :
[acts B, on S | to \ sAD] = (B \subset A) && [acts B, on S | to].
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT A rT S (@raction aT D (Finite.sort rT) to A sAD))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT D rT S to))))) *)
by rewrite astabs_ract subsetI.
Qed.
End RestrictActionTheory.
Section MorphAct.
Variables (aT : finGroupType) (D : {group aT}) (rT : finType).
Variable phi : {morphism D >-> {perm rT}}.
Definition mact x a := phi a x.
Lemma mact_is_action : is_action D mact.
Proof.
(* Goal: @is_action aT (@gval aT D) (Finite.sort rT) mact *)
split=> [a x y | x a b Da Db]; first exact: perm_inj.
(* Goal: @eq (Finite.sort rT) (mact x (@mulg (FinGroup.base aT) a b)) (mact (mact x a) b) *)
by rewrite /mact morphM //= permM.
Qed.
Lemma injm_faithful : 'injm phi -> [faithful D, on setT | morph_action].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@ker aT (perm_of_finGroupType rT) (@gval aT D) phi (@MorPhantom aT (perm_of_finGroupType rT) (@mfun aT (perm_of_finGroupType rT) (@gval aT D) phi))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (oneg (group_set_baseGroupType (FinGroup.base aT)))))), is_true (@faithful aT (@gval aT D) rT (@gval aT D) (@setTfor rT (Phant (Finite.sort rT))) morph_action) *)
move/injmP=> phi_inj; apply/subsetP=> a /setIP[Da /astab_act a1].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT)) (oneg (group_set_of_baseGroupType (FinGroup.base aT)))))) *)
apply/set1P/phi_inj => //; apply/permP=> x.
(* Goal: @eq (Finite.sort rT) (@PermDef.fun_of_perm rT (@mfun aT (perm_of_finGroupType rT) (@gval aT D) phi a) x) (@PermDef.fun_of_perm rT (@mfun aT (perm_of_finGroupType rT) (@gval aT D) phi (oneg (FinGroup.base aT))) x) *)
by rewrite morph1 perm1 -mactE a1 ?inE.
Qed.
Lemma perm_mact a : actperm morph_action a = phi a.
Proof.
(* Goal: @eq (@perm_of rT (Phant (Finite.sort rT))) (@actperm aT (@gval aT D) rT morph_action a) (@mfun aT (perm_of_finGroupType rT) (@gval aT D) phi a) *)
by apply/permP=> x; rewrite permE.
Qed.
End MorphAct.
Notation "<< phi >>" := (morph_action phi) : action_scope.
Section CompAct.
Variables (gT aT : finGroupType) (rT : finType).
Variables (D : {set aT}) (to : action D rT).
Variables (B : {set gT}) (f : {morphism B >-> aT}).
Definition comp_act x e := to x (f e).
Lemma comp_is_action : is_action (f @*^-1 D) comp_act.
Proof.
(* Goal: @is_action gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) (Finite.sort rT) comp_act *)
split=> [e | x e1 e2]; first exact: act_inj.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) e1 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) e2 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D))))), @eq (Finite.sort rT) (comp_act x (@mulg (FinGroup.base gT) e1 e2)) (comp_act (comp_act x e1) e2) *)
case/morphpreP=> Be1 Dfe1; case/morphpreP=> Be2 Dfe2.
(* Goal: @eq (Finite.sort rT) (comp_act x (@mulg (FinGroup.base gT) e1 e2)) (comp_act (comp_act x e1) e2) *)
by rewrite /comp_act morphM ?actMin.
Qed.
Lemma afix_comp (A : {set gT}) :
A \subset B -> 'Fix_comp_action(A) = 'Fix_to(f @* A).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B))), @eq (@set_of rT (Phant (Finite.sort rT))) (@afix gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) rT comp_action A) (@afix aT D rT to (@morphim gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) A)) *)
move=> sAB; apply/setP=> x; rewrite !inE /morphim (setIidPr sAB).
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (Finite.eqType rT) (@act gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) (Finite.sort rT) comp_action x a) x))))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.finType (FinGroup.base aT)) (@mfun gT aT B f) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
apply/subsetP/subsetP=> [cAx _ /imsetP[a Aa ->] | cfAx a Aa].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (Finite.eqType rT) (@act gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) (Finite.sort rT) comp_action x a) x))))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mfun gT aT B f a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base aT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => @eq_op (Finite.eqType rT) (@act aT D (Finite.sort rT) to x a) x))))) *)
by move/cAx: Aa; rewrite !inE.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op (Finite.eqType rT) (@act gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) (Finite.sort rT) comp_action x a) x))))) *)
by rewrite inE; move/(_ (f a)): cfAx; rewrite inE mem_imset // => ->.
Qed.
Lemma astab_comp S : 'C(S | comp_action) = f @*^-1 'C(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) rT S comp_action) (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) (@astab aT D rT S to)) *)
by apply/setP=> x; rewrite !inE -andbA.
Qed.
Lemma astabs_comp S : 'N(S | comp_action) = f @*^-1 'N(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astabs gT (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) D) rT S comp_action) (@morphpre gT aT B f (@MorPhantom gT aT (@mfun gT aT B f)) (@astabs aT D rT S to)) *)
by apply/setP=> x; rewrite !inE -andbA.
Qed.
End CompAct.
Notation "to \o f" := (comp_action to f) : action_scope.
Section PermAction.
Variable rT : finType.
Local Notation gT := {perm rT}.
Implicit Types a b c : gT.
Lemma aperm_is_action : is_action setT (@aperm rT).
Proof.
(* Goal: @is_action (perm_of_finGroupType rT) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))))) (Finite.sort rT) (@aperm rT) *)
by apply: is_total_action => [x|x a b]; rewrite apermE (perm1, permM).
Qed.
Canonical perm_action := Action aperm_is_action.
Lemma pcycleE a : pcycle a = orbit perm_action <[a]>%g.
Proof.
(* Goal: @eq (forall _ : Finite.sort rT, @set_of rT (Phant (Finite.sort rT))) (@pcycle rT a) (@orbit (perm_of_finGroupType rT) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))))) rT perm_action (@cycle (perm_of_finGroupType rT) a)) *)
by [].
Qed.
Lemma perm_act1P a : reflect (forall x, aperm x a = x) (a == 1).
Proof.
(* Goal: Bool.reflect (forall x : Finite.sort rT, @eq (Finite.sort rT) (@aperm rT x a) x) (@eq_op (perm_for_eqType rT) a (oneg (perm_of_baseFinGroupType rT))) *)
apply: (iffP eqP) => [-> x | a1]; first exact: act1.
(* Goal: @eq (Equality.sort (perm_for_eqType rT)) a (oneg (perm_of_baseFinGroupType rT)) *)
by apply/permP=> x; rewrite -apermE a1 perm1.
Qed.
Lemma perm_faithful A : [faithful A, on setT | perm_action].
Proof.
(* Goal: is_true (@faithful (perm_of_finGroupType rT) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))))) rT A (@setTfor rT (Phant (Finite.sort rT))) perm_action) *)
apply/subsetP=> a /setIP[Da crTa].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (perm_of_finGroupType rT))) (oneg (group_set_of_baseGroupType (FinGroup.base (perm_of_finGroupType rT))))))) *)
by apply/set1P; apply/permP=> x; rewrite -apermE perm1 (astabP crTa) ?inE.
Qed.
Lemma actperm_id p : actperm perm_action p = p.
Proof.
(* Goal: @eq (@perm_of rT (Phant (Finite.sort rT))) (@actperm (perm_of_finGroupType rT) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))))) rT perm_action p) p *)
by apply/permP=> x; rewrite permE.
Qed.
End PermAction.
Arguments perm_act1P {rT a}.
Notation "'P" := (perm_action _) (at level 8) : action_scope.
Section ActpermOrbits.
Variables (aT : finGroupType) (D : {group aT}) (rT : finType).
Variable to : action D rT.
Lemma orbit_morphim_actperm (A : {set aT}) :
A \subset D -> orbit 'P (actperm to @* A) =1 orbit to A.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eqfun (@set_of rT (Phant (Finite.sort rT))) (Finite.sort rT) (@orbit (perm_of_finGroupType rT) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))))) rT (perm_action rT) (@morphim aT (perm_of_finGroupType rT) (@gval aT D) (@actperm_morphism aT (@gval aT D) rT to) (@MorPhantom aT (perm_of_finGroupType rT) (@actperm aT (@gval aT D) rT to)) A)) (@orbit aT (@gval aT D) rT to A) *)
move=> sAD x; rewrite morphimEsub // /orbit -imset_comp.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base aT)) rT (@funcomp (Finite.sort rT) (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) tt (@act (perm_of_finGroupType rT) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType rT)))))) (Finite.sort rT) (perm_action rT) x) (@mfun aT (perm_of_finGroupType rT) (@gval aT D) (@actperm_morphism aT (@gval aT D) rT to))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base aT)) rT (@act aT (@gval aT D) (Finite.sort rT) to x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A))) *)
by apply: eq_imset => a //=; rewrite actpermK.
Qed.
Lemma pcycle_actperm (a : aT) :
a \in D -> pcycle (actperm to a) =1 orbit to <[a]>.
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base aT)) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eqfun (@set_of rT (Phant (Finite.sort rT))) (Finite.sort rT) (@pcycle rT (@actperm aT (@gval aT D) rT to a)) (@orbit aT (@gval aT D) rT to (@cycle aT a)) *)
move=> Da x.
(* Goal: @eq (@set_of rT (Phant (Finite.sort rT))) (@pcycle rT (@actperm aT (@gval aT D) rT to a) x) (@orbit aT (@gval aT D) rT to (@cycle aT a) x) *)
by rewrite pcycleE -orbit_morphim_actperm ?cycle_subG ?morphim_cycle.
Qed.
End ActpermOrbits.
Section RestrictPerm.
Variables (T : finType) (S : {set T}).
Definition restr_perm := actperm (<[subxx 'N(S | 'P)]>).
Canonical restr_perm_morphism := [morphism of restr_perm].
Lemma restr_perm_on p : perm_on S (restr_perm p).
Proof.
(* Goal: is_true (@perm_on T S (restr_perm p)) *)
apply/subsetP=> x; apply: contraR => notSx.
(* Goal: is_true (@eq_op (Finite.eqType T) (@PermDef.fun_of_perm T (restr_perm p) x) x) *)
by rewrite permE /= /actby (negPf notSx).
Qed.
Lemma triv_restr_perm p : p \notin 'N(S | 'P) -> restr_perm p = 1.
Proof.
(* Goal: forall _ : is_true (negb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))) p (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))) (@astabs (perm_of_finGroupType T) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))))) T S (perm_action T)))))), @eq (@perm_of T (Phant (Finite.sort T))) (restr_perm p) (oneg (perm_of_baseFinGroupType T)) *)
move=> not_nSp; apply/permP=> x.
(* Goal: @eq (Finite.sort T) (@PermDef.fun_of_perm T (restr_perm p) x) (@PermDef.fun_of_perm T (oneg (perm_of_baseFinGroupType T)) x) *)
by rewrite !permE /= /actby (negPf not_nSp) andbF.
Qed.
Lemma restr_permE : {in 'N(S | 'P) & S, forall p, restr_perm p =1 p}.
Proof.
(* Goal: @prop_in11 (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))) (Finite.sort T) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))) (@astabs (perm_of_finGroupType T) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))))) T S (perm_action T)))) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T S)) (fun (p : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType T))) (x : Finite.sort T) => @eq (Finite.sort T) (@PermDef.fun_of_perm T (restr_perm p) x) (@PermDef.fun_of_perm T p x)) (inPhantom (forall p : FinGroup.arg_sort (FinGroup.base (perm_of_finGroupType T)), @eqfun (Finite.sort T) (Finite.sort T) (@PermDef.fun_of_perm T (restr_perm p)) (@PermDef.fun_of_perm T p))) *)
by move=> y x nSp Sx; rewrite /= actpermE actbyE.
Qed.
Lemma ker_restr_perm : 'ker restr_perm = 'C(S | 'P).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))))) (@ker (perm_of_finGroupType T) (perm_of_finGroupType T) (@gval (perm_of_finGroupType T) (@astabs_group (perm_of_finGroupType T) (@setT_group (perm_of_finGroupType T) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))))) T (perm_action T) S)) restr_perm_morphism (@MorPhantom (perm_of_finGroupType T) (perm_of_finGroupType T) restr_perm)) (@astab (perm_of_finGroupType T) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType T)))))) T S (perm_action T)) *)
by rewrite ker_actperm astab_actby setIT (setIidPr (astab_sub _ _)).
Qed.
Lemma im_restr_perm p : restr_perm p @: S = S.
Proof.
(* Goal: @eq (@set_of T (Phant (Finite.sort T))) (@Imset.imset T T (@PermDef.fun_of_perm T (restr_perm p)) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T S))) S *)
exact: im_perm_on (restr_perm_on p).
Qed.
End RestrictPerm.
Section AutIn.
Variable gT : finGroupType.
Definition Aut_in A (B : {set gT}) := 'N_A(B | 'P) / 'C_A(B | 'P).
Variables G H : {group gT}.
Hypothesis sHG: H \subset G.
Lemma Aut_restr_perm a : a \in Aut G -> restr_perm H a \in Aut H.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) a (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT G))))), is_true (@in_mem (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) a) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT H))))) *)
move=> AutGa.
(* Goal: is_true (@in_mem (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) a) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT H))))) *)
case nHa: (a \in 'N(H | 'P)); last by rewrite triv_restr_perm ?nHa ?group1.
(* Goal: is_true (@in_mem (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) a) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT H))))) *)
rewrite inE restr_perm_on; apply/morphicP=> x y Hx Hy /=.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) a) (@mulg (FinGroup.base gT) x y)) (@mulg (FinGroup.base gT) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) a) x) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) a) y)) *)
by rewrite !restr_permE ?groupM // -(autmE AutGa) morphM ?(subsetP sHG).
Qed.
Lemma restr_perm_Aut : restr_perm H @* Aut G \subset Aut H.
Proof.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@morphim (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@astabs_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setT_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (perm_action (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H))) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@Aut gT (@gval gT G))))) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT H))))) *)
by apply/subsetP=> a'; case/morphimP=> a _ AutGa ->{a'}; apply: Aut_restr_perm.
Qed.
Lemma Aut_in_isog : Aut_in (Aut G) H \isog restr_perm H @* Aut G.
Proof.
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (Aut_in (@Aut gT (@gval gT G)) (@gval gT H)) (@morphim (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@astabs_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setT_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (perm_action (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H))) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@Aut gT (@gval gT G)))) *)
rewrite /Aut_in -ker_restr_perm kerE -morphpreIdom -morphimIdom -kerE /=.
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (@Aut gT (@gval gT G)) (@setI (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))) (@ker (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@quotient (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (@Aut gT (@gval gT G)) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT))))) (@setI (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (@Aut gT (@gval gT G)) (@setI (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))) (@ker (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))))) (@morphim (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@setI (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (perm_of_baseFinGroupType (FinGroup.arg_finType (FinGroup.base gT)))) (Phant (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))) (@Aut gT (@gval gT G))))) *)
by rewrite setIA (setIC _ (Aut G)) first_isog_loc ?subsetIr.
Qed.
Lemma Aut_sub_fullP :
reflect (forall h : {morphism H >-> gT}, 'injm h -> h @* H = H ->
exists g : {morphism G >-> gT},
[/\ 'injm g, g @* G = G & {in H, g =1 h}])
(Aut_in (Aut G) H \isog Aut H).
End AutIn.
Arguments Aut_in {gT} A%g B%g.
Section InjmAutIn.
Variables (gT rT : finGroupType) (D G H : {group gT}) (f : {morphism D >-> rT}).
Hypotheses (injf : 'injm f) (sGD : G \subset D) (sHG : H \subset G).
Let sHD := subset_trans sHG sGD.
Local Notation fGisom := (Aut_isom injf sGD).
Local Notation fHisom := (Aut_isom injf sHD).
Local Notation inH := (restr_perm H).
Local Notation infH := (restr_perm (f @* H)).
Lemma astabs_Aut_isom a :
a \in Aut G -> (fGisom a \in 'N(f @* H | 'P)) = (a \in 'N(H | 'P)).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) a (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT (@gval gT G))))), @eq bool (@in_mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT)))) (@Aut_isom gT rT G D f injf sGD a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.finType (FinGroup.base rT)))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.finType (FinGroup.base rT))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.finType (FinGroup.base rT))))) (@astabs (perm_of_finGroupType (FinGroup.finType (FinGroup.base rT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.finType (FinGroup.base rT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.finType (FinGroup.base rT)))))))) (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (perm_action (FinGroup.finType (FinGroup.base rT))))))) (@in_mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base gT)))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@astabs (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT))))))) *)
move=> AutGa; rewrite !inE sub_morphim_pre // subsetI sHD /= /aperm.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT D) f) (@mem (FinGroup.arg_sort (FinGroup.base rT)) (predPredType (FinGroup.arg_sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.finType (FinGroup.base rT)) (FinGroup.sort (FinGroup.base rT)) (fun x : FinGroup.sort (FinGroup.base rT) => @PermDef.fun_of_perm (FinGroup.finType (FinGroup.base rT)) (@Aut_isom gT rT G D f injf sGD a) x) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))))))))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) a x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))))) *)
rewrite !(sameP setIidPl eqP) !eqEsubset !subsetIl; apply: eq_subset_r => x.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.sort (FinGroup.base rT)) (@mfun gT rT (@gval gT D) f) (@mem (FinGroup.arg_sort (FinGroup.base rT)) (predPredType (FinGroup.arg_sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.finType (FinGroup.base rT)) (FinGroup.sort (FinGroup.base rT)) (fun x : FinGroup.sort (FinGroup.base rT) => @PermDef.fun_of_perm (FinGroup.finType (FinGroup.base rT)) (@Aut_isom gT rT G D f injf sGD a) x) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)))))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.arg_sort (FinGroup.base gT)) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) a x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))))) *)
rewrite !inE; apply: andb_id2l => Hx; have Gx: x \in G := subsetP sHG x Hx.
(* Goal: @eq bool (@in_mem (FinGroup.sort (FinGroup.base rT)) (@PermDef.fun_of_perm (FinGroup.finType (FinGroup.base rT)) (@Aut_isom gT rT G D f injf sGD a) (@mfun gT rT (@gval gT D) f x)) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) a x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
have Dax: a x \in D by rewrite (subsetP sGD) // Aut_closed.
(* Goal: @eq bool (@in_mem (FinGroup.sort (FinGroup.base rT)) (@PermDef.fun_of_perm (FinGroup.finType (FinGroup.base rT)) (@Aut_isom gT rT G D f injf sGD a) (@mfun gT rT (@gval gT D) f x)) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) a x) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
by rewrite Aut_isomE // -!sub1set -morphim_set1 // injmSK ?sub1set.
Qed.
Lemma isom_restr_perm a : a \in Aut G -> fHisom (inH a) = infH (fGisom a).
Lemma restr_perm_isom : isom (inH @* Aut G) (infH @* Aut (f @* G)) fHisom.
Lemma injm_Aut_sub : Aut_in (Aut (f @* G)) (f @* H) \isog Aut_in (Aut G) H.
Proof.
(* Goal: is_true (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))) (@Aut rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT)))))))) (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base rT)))))) (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (@Aut_in rT (@Aut rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) (@Aut_in gT (@Aut gT (@gval gT G)) (@gval gT H))) *)
do 2!rewrite isog_sym (isog_transl _ (Aut_in_isog _ _)).
(* Goal: is_true (@isog (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@morphim_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@astabs_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@setT_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT)))))))) (FinGroup.arg_finType (FinGroup.base rT)) (perm_action (FinGroup.arg_finType (FinGroup.base rT))) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) H))) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) H))) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) H)))) (@Aut_group rT (@morphim_group gT rT D f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) G)))) (@gval (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@morphim_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@astabs_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setT_group (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (perm_action (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT H)) (@restr_perm_morphism (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)) (@MorPhantom (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@restr_perm (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@Aut_group gT G)))) *)
by rewrite isog_sym (isom_isog _ _ restr_perm_isom) // restr_perm_Aut.
Qed.
Lemma injm_Aut_full :
(Aut_in (Aut (f @* G)) (f @* H) \isog Aut (f @* H))
= (Aut_in (Aut G) H \isog Aut H).
Proof.
(* Goal: @eq bool (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))) (@Aut rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT)))))))) (FinGroup.arg_finType (FinGroup.base rT)) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)) (perm_action (FinGroup.arg_finType (FinGroup.base rT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@Aut_in rT (@Aut rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT G))) (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H))) (@Aut rT (@morphim gT rT (@gval gT D) f (@MorPhantom gT rT (@mfun gT rT (@gval gT D) f)) (@gval gT H)))) (@isog (@coset_groupType (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setI (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (@Aut gT (@gval gT G)) (@astab (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@setTfor (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT)))))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (perm_action (FinGroup.arg_finType (FinGroup.base gT)))))) (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut_in gT (@Aut gT (@gval gT G)) (@gval gT H)) (@Aut gT (@gval gT H))) *)
by rewrite (isog_transl _ injm_Aut_sub) (isog_transr _ (injm_Aut injf sHD)).
Qed.
End InjmAutIn.
Section GroupAction.
Variables (aT rT : finGroupType) (D : {set aT}) (R : {set rT}).
Local Notation actT := (action D rT).
Definition is_groupAction (to : actT) :=
{in D, forall a, actperm to a \in Aut R}.
Structure groupAction := GroupAction {gact :> actT; _ : is_groupAction gact}.
Definition clone_groupAction to :=
let: GroupAction _ toA := to return {type of GroupAction for to} -> _ in
fun k => k toA : groupAction.
End GroupAction.
Delimit Scope groupAction_scope with gact.
Bind Scope groupAction_scope with groupAction.
Arguments is_groupAction {aT rT D%g} R%g to%act.
Arguments groupAction {aT rT} D%g R%g.
Arguments gact {aT rT D%g R%g} to%gact : rename.
Notation "[ 'groupAction' 'of' to ]" :=
(clone_groupAction (@GroupAction _ _ _ _ to))
(at level 0, format "[ 'groupAction' 'of' to ]") : form_scope.
Section GroupActionDefs.
Variables (aT rT : finGroupType) (D : {set aT}) (R : {set rT}).
Implicit Type A : {set aT}.
Implicit Type S : {set rT}.
Implicit Type to : groupAction D R.
Definition gact_range of groupAction D R := R.
Definition gacent to A := 'Fix_(R | to)(D :&: A).
Definition acts_on_group A S to := [acts A, on S | to] /\ S \subset R.
Coercion actby_cond_group A S to : acts_on_group A S to -> actby_cond A S to :=
@proj1 _ _.
Definition acts_irreducibly A S to :=
[min S of G | G :!=: 1 & [acts A, on G | to]].
Lemma im_actperm_Aut : actperm to @* D \subset Aut R.
Proof.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT)))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))))) (@morphim aT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) D (@actperm_morphism aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to)) (@MorPhantom aT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base rT))) (@actperm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to))) D))) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT))) (@Aut rT R)))) *)
by apply/subsetP=> _ /morphimP[a _ Da ->]; apply: actperm_Aut.
Qed.
Lemma gact_out x a : a \in D -> x \notin R -> to x a = x.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)))) (_ : is_true (negb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) R))))), @eq (FinGroup.arg_sort (FinGroup.base rT)) (@act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x a) x *)
by move=> Da Rx; rewrite -actpermE (out_Aut _ Rx) ?actperm_Aut.
Qed.
Lemma gactM : {in D, forall a, {in R &, {morph to^~ a : x y / x * y}}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) R)) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x0 a) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x0 y0) x y)) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x0 y0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x0 a) x) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x0 a) y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x a) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x y) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x y)))) (inPhantom (forall a : FinGroup.arg_sort (FinGroup.base aT), @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) R)) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x0 a) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x0 y0) x y)) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x0 y0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x0 a) x) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x0 a) y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT D (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT D R to) x a) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x y) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @mulg (FinGroup.base rT) x y))))) *)
move=> a Da /= x y; rewrite -!(actpermE to); apply: morphicP x y.
(* Goal: is_true (@morphic rT rT R (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a))) *)
by rewrite Aut_morphic ?actperm_Aut.
Qed.
Lemma actmM a : {in R &, {morph actm to a : x y / x * y}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) R)) (fun x y : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @eq (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@actm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a ((fun x0 y0 : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @mulg (FinGroup.base rT) x0 y0) x y)) ((fun x0 y0 : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @mulg (FinGroup.base rT) x0 y0) (@actm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a x) (@actm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a y))) (inPhantom (@morphism_2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@actm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a) (fun x y : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @mulg (FinGroup.base rT) x y) (fun x y : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @mulg (FinGroup.base rT) x y))) *)
by rewrite /actm; case: ifP => //; apply: gactM.
Qed.
Canonical act_morphism a := Morphism (actmM a).
Lemma morphim_actm :
{in D, forall a (S : {set rT}), S \subset R -> actm to a @* S = to^* S a}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) D)) (fun a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT)) => forall (S : @set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) R)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim rT rT R (act_morphism a) (@MorPhantom rT rT (@actm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a)) S) (@setact aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) S a)) (inPhantom (forall (a : Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (S : @set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) R)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim rT rT R (act_morphism a) (@MorPhantom rT rT (@actm aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) a)) S) (@setact aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) S a))) *)
by move=> a Da /= S sSR; rewrite /morphim /= actmEfun ?(setIidPr _).
Qed.
Variables (a : aT) (A B : {set aT}) (S : {set rT}).
Lemma gacentIdom : 'C_(|to)(D :&: A) = 'C_(|to)(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT D R to (@setI (FinGroup.arg_finType (FinGroup.base aT)) D A)) (@gacent aT rT D R to A) *)
by rewrite /gacent setIA setIid.
Qed.
Lemma gacentIim : 'C_(R | to)(A) = 'C_(|to)(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) R (@gacent aT rT D R to A)) (@gacent aT rT D R to A) *)
by rewrite setIA setIid.
Qed.
Lemma gacentS : A \subset B -> 'C_(|to)(B) \subset 'C_(|to)(A).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B))), is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT D R to B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT D R to A)))) *)
by move=> sAB; rewrite !(setIS, afixS).
Qed.
Lemma gacentU : 'C_(|to)(A :|: B) = 'C_(|to)(A) :&: 'C_(|to)(B).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT D R to (@setU (FinGroup.arg_finType (FinGroup.base aT)) A B)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT D R to A) (@gacent aT rT D R to B)) *)
by rewrite -setIIr -afixU -setIUr.
Qed.
Hypotheses (Da : a \in D) (sAD : A \subset D) (sSR : S \subset R).
Lemma gacentE : 'C_(|to)(A) = 'Fix_(R | to)(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT D R to A) (@setI (FinGroup.arg_finType (FinGroup.base rT)) R (@afix aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) A)) *)
by rewrite -{2}(setIidPr sAD).
Qed.
Lemma gacent1E : 'C_(|to)[a] = 'Fix_(R | to)[a].
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT D R to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) R (@afix aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))) *)
by rewrite /gacent [D :&: _](setIidPr _) ?sub1set.
Qed.
Lemma subgacentE : 'C_(S | to)(A) = 'Fix_(S | to)(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) S (@gacent aT rT D R to A)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) S (@afix aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) A)) *)
by rewrite gacentE setIA (setIidPl sSR).
Qed.
Lemma subgacent1E : 'C_(S | to)[a] = 'Fix_(S | to)[a].
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) S (@gacent aT rT D R to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) S (@afix aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT D R to) (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a))) *)
by rewrite gacent1E setIA (setIidPl sSR).
Qed.
End RawGroupAction.
Section GroupActionTheory.
Variables aT rT : finGroupType.
Variables (D : {group aT}) (R : {group rT}) (to : groupAction D R).
Implicit Type A B : {set aT}.
Implicit Types G H : {group aT}.
Implicit Type S : {set rT}.
Implicit Types M N : {group rT}.
Lemma gact1 : {in D, forall a, to 1 a = 1}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (oneg (FinGroup.base rT)) a) (oneg (FinGroup.base rT))) (inPhantom (forall a : FinGroup.arg_sort (FinGroup.base aT), @eq (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (oneg (FinGroup.base rT)) a) (oneg (FinGroup.base rT)))) *)
by move=> a Da; rewrite /= -actmE ?morph1.
Qed.
Lemma gactV : {in D, forall a, {in R, {morph to^~ a : x / x^-1}}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x0) x)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x)))) (inPhantom (forall a : FinGroup.arg_sort (FinGroup.base aT), @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x0) x)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @invg (FinGroup.base rT) x))))) *)
by move=> a Da /= x Rx; move; rewrite -!actmE ?morphV.
Qed.
Lemma gactX : {in D, forall a n, {in R, {morph to^~ a : x / x ^+ n}}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun a : FinGroup.arg_sort (FinGroup.base aT) => forall n : nat, @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x0 n) x)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x0 n) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x n) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x n)))) (inPhantom (forall (a : FinGroup.arg_sort (FinGroup.base aT)) (n : nat), @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x0 n) x)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x0 n) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x))) (inPhantom (@morphism_1 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x n) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @expgn (FinGroup.base rT) x n))))) *)
by move=> a Da /= n x Rx; rewrite -!actmE // morphX.
Qed.
Lemma gactJ : {in D, forall a, {in R &, {morph to^~ a : x y / x ^ y}}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x0 y0) x y)) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x0 y0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x y) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x y)))) (inPhantom (forall a : FinGroup.arg_sort (FinGroup.base aT), @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x0 y0) x y)) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x0 y0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x y) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @conjg rT x y))))) *)
by move=> a Da /= x Rx y Ry; rewrite -!actmE // morphJ.
Qed.
Lemma gactR : {in D, forall a, {in R &, {morph to^~ a : x y / [~ x, y]}}}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))) (fun a : FinGroup.arg_sort (FinGroup.base aT) => @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x0 y0) x y)) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x0 y0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x y) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x y)))) (inPhantom (forall a : FinGroup.arg_sort (FinGroup.base aT), @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @eq (FinGroup.arg_sort (FinGroup.base rT)) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x0 y0) x y)) ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x0 y0) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) x) ((fun x0 : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x0 a) y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : FinGroup.arg_sort (FinGroup.base rT) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x y) (fun x y : FinGroup.arg_sort (FinGroup.base rT) => @commg rT x y))))) *)
by move=> a Da /= x Rx y Ry; rewrite -!actmE // morphR.
Qed.
Lemma gact_stable : {acts D, on R | to}.
Proof.
(* Goal: @acts_on aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval aT D) (@gval rT R) (@gact aT rT (@gval aT D) (@gval rT R) to) *)
apply: acts_act; apply/subsetP=> a Da; rewrite !inE Da.
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))))))) *)
apply/subsetP=> x; rewrite inE; apply: contraLR => R'xa.
(* Goal: is_true (negb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) *)
by rewrite -(actKin to Da x) gact_out ?groupV.
Qed.
Lemma group_set_gacent A : group_set 'C_(|to)(A).
Proof.
(* Goal: is_true (@group_set rT (@gacent aT rT (@gval aT D) (@gval rT R) to A)) *)
apply/group_setP; split=> [|x y].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A))))), is_true (@in_mem (FinGroup.sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A)))) *)
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base rT)) (oneg (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A)))) *)
by rewrite !inE group1; apply/subsetP=> a /setIP[Da _]; rewrite inE gact1.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A))))), is_true (@in_mem (FinGroup.sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A)))) *)
case/setIP=> Rx /afixP cAx /setIP[Ry /afixP cAy].
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A)))) *)
rewrite inE groupM //; apply/afixP=> a Aa.
(* Goal: @eq (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) (@mulg (FinGroup.base rT) x y) a) (@mulg (FinGroup.base rT) x y) *)
by rewrite gactM ?cAx ?cAy //; case/setIP: Aa.
Qed.
Canonical gacent_group A := Group (group_set_gacent A).
Lemma gacent1 : 'C_(|to)(1) = R.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (oneg (group_set_of_baseGroupType (FinGroup.base aT)))) (@gval rT R) *)
by rewrite /gacent (setIidPr (sub1G _)) afix1 setIT.
Qed.
Lemma gacent_gen A : A \subset D -> 'C_(|to)(<<A>>) = 'C_(|to)(A).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@generated aT A)) (@gacent aT rT (@gval aT D) (@gval rT R) to A) *)
by move=> sAD; rewrite /gacent  ?gen_subG ?afix_gen_in.
Qed.
Lemma gacentD1 A : 'C_(|to)(A^#) = 'C_(|to)(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@setD (FinGroup.arg_finType (FinGroup.base aT)) A (@set1 (FinGroup.finType (FinGroup.base aT)) (oneg (FinGroup.base aT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to A) *)
rewrite -gacentIdom -gacent_gen ?subsetIl // setIDA genD1 ?group1 //.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@generated aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) A))) (@gacent aT rT (@gval aT D) (@gval rT R) to A) *)
by rewrite gacent_gen ?subsetIl // gacentIdom.
Qed.
Lemma gacent_cycle a : a \in D -> 'C_(|to)(<[a]>) = 'C_(|to)[a].
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@cycle aT a)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@set1 (FinGroup.arg_finType (FinGroup.base aT)) a)) *)
by move=> Da; rewrite gacent_gen ?sub1set.
Qed.
Lemma gacentY A B :
A \subset D -> B \subset D -> 'C_(|to)(A <*> B) = 'C_(|to)(A) :&: 'C_(|to)(B).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@joing aT A B)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A) (@gacent aT rT (@gval aT D) (@gval rT R) to B)) *)
by move=> sAD sBD; rewrite gacent_gen ?gacentU // subUset sAD.
Qed.
Lemma gacentM G H :
G \subset D -> H \subset D -> 'C_(|to)(G * H) = 'C_(|to)(G) :&: 'C_(|to)(H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@gval aT G) (@gval aT H))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H))) *)
by move=> sGD sHB; rewrite -gacent_gen ?mul_subG // genM_join gacentY.
Qed.
Lemma astab1 : 'C(1 | to) = D.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (oneg (group_set_of_baseGroupType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@gval aT D) *)
by apply/setP=> x; rewrite ?(inE, sub1set) andb_idr //; move/gact1=> ->.
Qed.
Lemma astab_range : 'C(R | to) = 'C(setT | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setTfor (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
apply/eqP; rewrite eqEsubset andbC astabS ?subsetT //=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@gact aT rT (@gval aT D) (@gval rT R) to)))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setTfor (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
apply/subsetP=> a cRa; have Da := astab_dom cRa; rewrite !inE Da.
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@setTfor (FinGroup.arg_finType (FinGroup.base rT)) (Phant (FinGroup.arg_sort (FinGroup.base rT)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base rT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) x)))))) *)
apply/subsetP=> x; rewrite -(setUCr R) !inE.
(* Goal: forall _ : is_true (orb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))) (negb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))))), is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) x) *)
by case/orP=> ?; [rewrite (astab_act cRa) | rewrite gact_out].
Qed.
Lemma gacentC A S :
A \subset D -> S \subset R ->
(S \subset 'C_(|to)(A)) = (A \subset 'C(S | to)).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A)))) (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by move=> sAD sSR; rewrite subsetI sSR astabCin // (setIidPr sAD).
Qed.
Lemma astab_gen S : S \subset R -> 'C(<<S>> | to) = 'C(S | to).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@generated rT S) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
move=> sSR; apply/setP=> a; case Da: (a \in D); last by rewrite !inE Da.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@generated rT S) (@gact aT rT (@gval aT D) (@gval rT R) to))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by rewrite -!sub1set -!gacentC ?sub1set ?gen_subG.
Qed.
Lemma astabM M N :
M \subset R -> N \subset R -> 'C(M * N | to) = 'C(M | to) :&: 'C(N | to).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT M) (@gval rT N)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT N) (@gact aT rT (@gval aT D) (@gval rT R) to))) *)
move=> sMR sNR; rewrite -astabU -astab_gen ?mul_subG // genM_join.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@joing rT (@gval rT M) (@gval rT N)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setU (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gval rT N)) (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
by rewrite astab_gen // subUset sMR.
Qed.
Lemma astabs1 : 'N(1 | to) = D.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (oneg (group_set_of_baseGroupType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@gval aT D) *)
by rewrite astabs_set1 astab1.
Qed.
Lemma astabs_range : 'N(R | to) = D.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@gval aT D) *)
apply/setIidPl; apply/subsetP=> a Da; rewrite inE.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))))) *)
by apply/subsetP=> x Rx; rewrite inE gact_stable.
Qed.
Lemma astabsD1 S : 'N(S^# | to) = 'N(S | to).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setD (FinGroup.arg_finType (FinGroup.base rT)) S (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT)))) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
case S1: (1 \in S); last first.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setD (FinGroup.arg_finType (FinGroup.base rT)) S (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT)))) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setD (FinGroup.arg_finType (FinGroup.base rT)) S (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT)))) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
by rewrite (setDidPl _) // disjoint_sym disjoints_subset sub1set inE S1.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setD (FinGroup.arg_finType (FinGroup.base rT)) S (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT)))) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
apply/eqP; rewrite eqEsubset andbC -{1}astabsIdom -{1}astabs1 setIC astabsD /=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setD (FinGroup.arg_finType (FinGroup.base rT)) S (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT)))) (@gact aT rT (@gval aT D) (@gval rT R) to)))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by rewrite -{2}(setD1K S1) -astabsIdom -{1}astabs1 astabsU.
Qed.
Lemma gacts_range A : A \subset D -> {acts A, on group R | to}.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @acts_on_group aT rT (@gval aT D) (@gval rT R) A (@gval rT R) to *)
by move=> sAD; split; rewrite ?astabs_range.
Qed.
Lemma acts_subnorm_gacent A : A \subset D ->
[acts 'N_D(A), on 'C_(| to)(A) | to].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
move=> sAD; rewrite gacentE // actsI ?astabs_range ?subsetIl //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) A) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by rewrite -{2}(setIidPr sAD) acts_subnorm_fix.
Qed.
Lemma acts_subnorm_subgacent A B S :
A \subset D -> [acts B, on S | to] -> [acts 'N_B(A), on 'C_(S | to)(A) | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) S (@gact aT rT (@gval aT D) (@gval rT R) to)))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) B (@normaliser aT A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) S (@gacent aT rT (@gval aT D) (@gval rT R) to A)) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
move=> sAD actsB; rewrite actsI //; first by rewrite subIset ?actsB.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) B (@normaliser aT A)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to A) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by rewrite (subset_trans _ (acts_subnorm_gacent sAD)) ?setSI ?(acts_dom actsB).
Qed.
Lemma acts_gen A S :
S \subset R -> [acts A, on S | to] -> [acts A, on <<S>> | to].
Lemma acts_joing A M N :
M \subset R -> N \subset R -> [acts A, on M | to] -> [acts A, on N | to] ->
[acts A, on M <*> N | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT N))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT N) (@gact aT rT (@gval aT D) (@gval rT R) to)))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@joing rT (@gval rT M) (@gval rT N)) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
by move=> sMR sNR nMA nNA; rewrite acts_gen ?actsU // subUset sMR.
Qed.
Lemma injm_actm a : 'injm (actm to a).
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@ker rT rT (@gval rT R) (@act_morphism aT rT (@gval aT D) (@gval rT R) to a) (@MorPhantom rT rT (@actm aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) a))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (oneg (group_set_baseGroupType (FinGroup.base rT)))))) *)
apply/injmP=> x y Rx Ry; rewrite /= /actm; case: ifP => Da //.
(* Goal: forall _ : @eq (FinGroup.sort (FinGroup.base rT)) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) y a), @eq (FinGroup.arg_sort (FinGroup.base rT)) x y *)
exact: act_inj.
Qed.
Lemma im_actm a : actm to a @* R = R.
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT))))) (@morphim rT rT (@gval rT R) (@act_morphism aT rT (@gval aT D) (@gval rT R) to a) (@MorPhantom rT rT (@actm aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) a)) (@gval rT R)) (@gval rT R) *)
apply/eqP; rewrite eqEcard (card_injm (injm_actm a)) // leqnn andbT.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@morphim rT rT (@gval rT R) (@act_morphism aT rT (@gval aT D) (@gval rT R) to a) (@MorPhantom rT rT (@actm aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) a)) (@gval rT R)))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@gval rT R)))) *)
apply/subsetP=> _ /morphimP[x Rx _ ->] /=.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base rT)) (@actm aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) a x) (@mem (FinGroup.sort (FinGroup.base rT)) (predPredType (FinGroup.sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@gval rT R)))) *)
by rewrite /actm; case: ifP => // Da; rewrite gact_stable.
Qed.
Lemma acts_char G M : G \subset D -> M \char R -> [acts G, on M | to].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@characteristic rT (@gval rT M) (@gval rT R))), is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
move=> sGD /charP[sMR charM].
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
apply/subsetP=> a Ga; have Da := subsetP sGD a Ga; rewrite !inE Da.
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M)))))))) *)
apply/subsetP=> x Mx; have Rx := subsetP sMR x Mx.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M))))))) *)
by rewrite inE -(charM _ (injm_actm a) (im_actm a)) -actmE // mem_morphim.
Qed.
Lemma gacts_char G M :
G \subset D -> M \char R -> {acts G, on group M | to}.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D))))) (_ : is_true (@characteristic rT (@gval rT M) (@gval rT R))), @acts_on_group aT rT (@gval aT D) (@gval rT R) (@gval aT G) (@gval rT M) to *)
by move=> sGD charM; split; rewrite (acts_char, char_sub).
Qed.
Section Restrict.
Variables (A : {group aT}) (sAD : A \subset D).
Lemma ract_is_groupAction : is_groupAction R (to \ sAD).
Proof.
(* Goal: @is_groupAction aT rT (@gval aT A) (@gval rT R) (@raction aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval aT A) sAD) *)
by move=> a Aa /=; rewrite ractpermE actperm_Aut ?(subsetP sAD).
Qed.
Canonical ract_groupAction := GroupAction ract_is_groupAction.
Lemma gacent_ract B : 'C_(|ract_groupAction)(B) = 'C_(|to)(A :&: B).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT A) (@gval rT R) ract_groupAction B) (@gacent aT rT (@gval aT D) (@gval rT R) to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) B)) *)
by rewrite /gacent afix_ract setIA (setIidPr sAD).
Qed.
End Restrict.
Section ActBy.
Variables (A : {group aT}) (G : {group rT}) (nGAg : {acts A, on group G | to}).
Lemma actby_is_groupAction : is_groupAction G <[nGAg]>.
Proof.
(* Goal: @is_groupAction aT rT (@gval aT A) (@gval rT G) (@action_by aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) A (@gval rT G) (@gact aT rT (@gval aT D) (@gval rT R) to) (@actby_cond_group aT rT (@gval aT D) (@gval rT R) (@gval aT A) (@gval rT G) to nGAg)) *)
move=> a Aa; rewrite /= inE; apply/andP; split.
(* Goal: is_true (@morphic rT rT (@gval rT G) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base rT)) (@action_by aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) A (@gval rT G) (@gact aT rT (@gval aT D) (@gval rT R) to) (@actby_cond_group aT rT (@gval aT D) (@gval rT R) (@gval aT A) (@gval rT G) to nGAg)) a))) *)
(* Goal: is_true (@perm_on (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) (@actperm aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base rT)) (@action_by aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) A (@gval rT G) (@gact aT rT (@gval aT D) (@gval rT R) to) (@actby_cond_group aT rT (@gval aT D) (@gval rT R) (@gval aT A) (@gval rT G) to nGAg)) a)) *)
apply/subsetP=> x; apply: contraR => Gx.
(* Goal: is_true (@morphic rT rT (@gval rT G) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base rT)) (@action_by aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) A (@gval rT G) (@gact aT rT (@gval aT D) (@gval rT R) to) (@actby_cond_group aT rT (@gval aT D) (@gval rT R) (@gval aT A) (@gval rT G) to nGAg)) a))) *)
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base rT))) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base rT)) (@action_by aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) A (@gval rT G) (@gact aT rT (@gval aT D) (@gval rT R) to) (@actby_cond_group aT rT (@gval aT D) (@gval rT R) (@gval aT A) (@gval rT G) to nGAg)) a) x) x) *)
by rewrite actpermE /= /actby (negbTE Gx).
(* Goal: is_true (@morphic rT rT (@gval rT G) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm aT (@gval aT A) (FinGroup.arg_finType (FinGroup.base rT)) (@action_by aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) A (@gval rT G) (@gact aT rT (@gval aT D) (@gval rT R) to) (@actby_cond_group aT rT (@gval aT D) (@gval rT R) (@gval aT A) (@gval rT G) to nGAg)) a))) *)
apply/morphicP=> x y Gx Gy; rewrite !actpermE /= /actby Aa groupM ?Gx ?Gy //=.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@mulg (FinGroup.base rT) x y) a) (@mulg (FinGroup.base rT) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) y a)) *)
by case nGAg; move/acts_dom; do 2!move/subsetP=> ?; rewrite gactM; auto.
Qed.
Canonical actby_groupAction := GroupAction actby_is_groupAction.
Lemma gacent_actby B :
'C_(|actby_groupAction)(B) = 'C_(G | to)(A :&: B).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent aT rT (@gval aT A) (@gval rT G) actby_groupAction B) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) (@gacent aT rT (@gval aT D) (@gval rT R) to (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) B))) *)
rewrite /gacent afix_actby !setIA setIid setIUr setICr set0U.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT A) B))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT G) (@gval rT R)) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT A)) B))) *)
by have [nAG sGR] := nGAg; rewrite (setIidPr (acts_dom nAG)) (setIidPl sGR).
Qed.
End ActBy.
Section Quotient.
Variable H : {group rT}.
Lemma acts_qact_dom_norm : {acts qact_dom to H, on 'N(H) | to}.
Proof.
(* Goal: @acts_on aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@normaliser rT (@gval rT H)) (@gact aT rT (@gval aT D) (@gval rT R) to) *)
move=> a HDa /= x; rewrite {2}(('N(H) =P to^~ a @^-1: 'N(H)) _) ?inE {x}//.
(* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT))) (@normaliser rT (@gval rT H)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)))))) *)
rewrite eqEcard (card_preimset _ (act_inj _ _)) leqnn andbT.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@preimset (FinGroup.arg_finType (FinGroup.base rT)) (FinGroup.arg_sort (FinGroup.base rT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H)))))))) *)
apply/subsetP=> x Nx; rewrite inE; move/(astabs_act (H :* x)): HDa.
(* Goal: forall _ : @eq bool (@in_mem (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@mem (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT)))) (predPredType (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT))))) (@SetDef.pred_of_set (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT))) (@rcosets rT (@gval rT H) (@normaliser rT (@gval rT H)))))) (@in_mem (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) (@mem (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT)))) (predPredType (Finite.sort (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT))))) (@SetDef.pred_of_set (FinGroup.finType (group_set_of_baseGroupType (FinGroup.base rT))) (@rcosets rT (@gval rT H) (@normaliser rT (@gval rT H)))))), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H))))) *)
rewrite mem_rcosets mulSGid ?normG // Nx => /rcosetsP[y Ny defHy].
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H))))) *)
suffices: to x a \in H :* y by apply: subsetP; rewrite mul_subG ?sub1set ?normG.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) y))))) *)
by rewrite -defHy; apply: mem_imset; apply: rcoset_refl.
Qed.
Lemma qact_is_groupAction : is_groupAction (R / H) (to / H).
Proof.
(* Goal: @is_groupAction aT (@coset_groupType rT (@gval rT H)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@quotient rT (@gval rT R) (@gval rT H)) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) *)
move=> a HDa /=; have Da := astabs_dom HDa.
(* Goal: is_true (@in_mem (@perm_of (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (Phant (@coset_of rT (@gval rT H)))) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a) (@mem (@perm_of (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (Phant (@coset_of rT (@gval rT H)))) (predPredType (@perm_of (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (Phant (@coset_of rT (@gval rT H))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H)))) (@Aut (@coset_groupType rT (@gval rT H)) (@quotient rT (@gval rT R) (@gval rT H)))))) *)
rewrite inE; apply/andP; split.
(* Goal: is_true (@morphic (@coset_groupType rT (@gval rT H)) (@coset_groupType rT (@gval rT H)) (@quotient rT (@gval rT R) (@gval rT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a))) *)
(* Goal: is_true (@perm_on (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@quotient rT (@gval rT R) (@gval rT H)) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a)) *)
apply/subsetP=> Hx /=; case: (cosetP Hx) => x Nx ->{Hx}.
(* Goal: is_true (@morphic (@coset_groupType rT (@gval rT H)) (@coset_groupType rT (@gval rT H)) (@quotient rT (@gval rT R) (@gval rT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a))) *)
(* Goal: forall _ : is_true (@in_mem (@coset_of rT (@gval rT H)) (@coset rT (@gval rT H) x) (@mem (@coset_of rT (@gval rT H)) (predPredType (@coset_of rT (@gval rT H))) (@pred_of_simpl (@coset_of rT (@gval rT H)) (@SimplPred (@coset_of rT (@gval rT H)) (fun x : @coset_of rT (@gval rT H) => negb (@eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H)))) (@PermDef.fun_of_perm (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a) x) x)))))), is_true (@in_mem (@coset_of rT (@gval rT H)) (@coset rT (@gval rT H) x) (@mem (@coset_of rT (@gval rT H)) (predPredType (@coset_of rT (@gval rT H))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient rT (@gval rT R) (@gval rT H))))) *)
apply: contraR => R'Hx; rewrite actpermE qactE // gact_out //.
(* Goal: is_true (@morphic (@coset_groupType rT (@gval rT H)) (@coset_groupType rT (@gval rT H)) (@quotient rT (@gval rT R) (@gval rT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a))) *)
(* Goal: is_true (negb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) *)
by apply: contra R'Hx; apply: mem_morphim.
(* Goal: is_true (@morphic (@coset_groupType rT (@gval rT H)) (@coset_groupType rT (@gval rT H)) (@quotient rT (@gval rT R) (@gval rT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@actperm aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (FinGroup.arg_finType (@coset_baseGroupType rT (@gval rT H))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) a))) *)
apply/morphicP=> Hx Hy; rewrite !actpermE.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) Hx (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@quotient rT (@gval rT R) (@gval rT H)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) Hy (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@quotient rT (@gval rT R) (@gval rT H)))))), @eq (FinGroup.arg_sort (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@act aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mulg (FinGroup.base (@coset_groupType rT (@gval rT H))) Hx Hy) a) (@mulg (FinGroup.base (@coset_groupType rT (@gval rT H))) (@act aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) Hx a) (@act aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) Hy a)) *)
case/morphimP=> x Nx Gx ->{Hx}; case/morphimP=> y Ny Gy ->{Hy}.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base (@coset_groupType rT (@gval rT H)))) (@act aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mulg (FinGroup.base (@coset_groupType rT (@gval rT H))) (@mfun rT (@coset_groupType rT (@gval rT H)) (@normaliser rT (@gval rT H)) (@coset_morphism rT (@gval rT H)) x) (@mfun rT (@coset_groupType rT (@gval rT H)) (@normaliser rT (@gval rT H)) (@coset_morphism rT (@gval rT H)) y)) a) (@mulg (FinGroup.base (@coset_groupType rT (@gval rT H))) (@act aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun rT (@coset_groupType rT (@gval rT H)) (@normaliser rT (@gval rT H)) (@coset_morphism rT (@gval rT H)) x) a) (@act aT (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType rT (@gval rT H))))) (@quotient_action aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun rT (@coset_groupType rT (@gval rT H)) (@normaliser rT (@gval rT H)) (@coset_morphism rT (@gval rT H)) y) a)) *)
by rewrite -morphM ?qactE ?groupM ?gactM // morphM ?acts_qact_dom_norm.
Qed.
Canonical quotient_groupAction := GroupAction qact_is_groupAction.
Lemma qact_domE : H \subset R -> qact_dom to H = 'N(H | to).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H) (@gact aT rT (@gval aT D) (@gval rT R) to)) *)
move=> sHR; apply/setP=> a; apply/idP/idP=> nHa; have Da := astabs_dom nHa.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astabs aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H) (@gact aT rT (@gval aT D) (@gval rT R) to))))) *)
rewrite !inE Da; apply/subsetP=> x Hx; rewrite inE -(rcoset1 H).
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT))))))) *)
have /rcosetsP[y Ny defHy]: to^~ a @: H \in rcosets H 'N(H).
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT))))))) *)
(* Goal: is_true (@in_mem (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base rT)) (FinGroup.arg_finType (FinGroup.base rT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H)))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base rT))) (@rcosets rT (@gval rT H) (@normaliser rT (@gval rT H)))))) *)
by rewrite (astabs_act _ nHa); apply/rcosetsP; exists 1; rewrite ?mulg1.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H)))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.finType (FinGroup.base rT)) (oneg (FinGroup.base rT))))))) *)
by rewrite (rcoset_eqP (_ : 1 \in H :* y)) -defHy -1?(gact1 Da) mem_setact.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@qact_dom aT D rT (@gact aT rT (@gval aT D) (@gval rT R) to) H)))) *)
rewrite !inE Da; apply/subsetP=> Hx; rewrite inE => /rcosetsP[x Nx ->{Hx}].
(* Goal: is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base rT))) (@rcosets rT (@gval rT H) (@normaliser rT (@gval rT H)))))) *)
apply/imsetP; exists (to x a).
(* Goal: @eq (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@rcoset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H))))) *)
case Rx: (x \in R); last by rewrite gact_out ?Rx.
(* Goal: @eq (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@rcoset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@normaliser rT (@gval rT H))))) *)
rewrite inE; apply/subsetP=> _ /imsetP[y Hy ->].
(* Goal: @eq (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@rcoset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (@conjg rT y (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT H)))) *)
rewrite -(actKVin to Da y) -gactJ // ?(subsetP sHR, astabs_act, groupV) //.
(* Goal: @eq (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@rcoset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (@conjg rT (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) y (@invg (FinGroup.base aT) a)) x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@gval rT H)))) *)
by rewrite memJ_norm // astabs_act ?groupV.
(* Goal: @eq (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a) (@rcoset rT (@gval rT H) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)) *)
apply/eqP; rewrite rcosetE eqEcard.
(* Goal: is_true (andb (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)))))) (leq (@card (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)))))) (@card (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a)))))) *)
rewrite (card_imset _ (act_inj _ _)) !card_rcoset leqnn andbT.
(* Goal: is_true (@subset (FinGroup.finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@act aT (@gval aT D) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base rT)))) (@set_action aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) x)) a))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base rT)) (@mulg (group_set_of_baseGroupType (FinGroup.base rT)) (@gval rT H) (@set1 (FinGroup.arg_finType (FinGroup.base rT)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a)))))) *)
apply/subsetP=> _ /imsetP[y Hxy ->]; rewrite !mem_rcoset in Hxy *.
have Rxy := subsetP sHR _ Hxy; rewrite -(mulgKV x y).
case Rx: (x \in R); last by rewrite !gact_out ?mulgK // 1?groupMl ?Rx.
by rewrite -gactV // -gactM 1?groupMr ?groupV // mulgK astabs_act.
Qed.
Qed.
End Quotient.
Section Mod.
Variable H : {group aT}.
Lemma modact_is_groupAction : is_groupAction 'C_(|to)(H) (to %% H).
Proof.
(* Goal: @is_groupAction (@coset_groupType aT (@gval aT H)) rT (@quotient aT (@gval aT D) (@gval aT H)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) *)
move=> Ha /morphimP[a Na Da ->]; have NDa: a \in 'N_D(H) by apply/setIP.
(* Goal: is_true (@in_mem (@perm_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) (@mem (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT)))) (predPredType (Finite.sort (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT))))) (@SetDef.pred_of_set (perm_for_finType (FinGroup.arg_finType (FinGroup.base rT))) (@Aut rT (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)))))) *)
rewrite inE; apply/andP; split.
(* Goal: is_true (@morphic rT rT (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)))) *)
(* Goal: is_true (@perm_on (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a))) *)
apply/subsetP=> x; rewrite 2!inE andbC actpermE /= modactEcond //.
(* Goal: is_true (@morphic rT rT (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)))) *)
(* Goal: forall _ : is_true (negb (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base rT))) (if @in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H))))) then @act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x a else x) x)), is_true (andb (@in_mem (FinGroup.arg_sort (FinGroup.base rT)) x (@mem (FinGroup.arg_sort (FinGroup.base rT)) (predPredType (FinGroup.arg_sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H)))))) (@in_mem (FinGroup.arg_sort (FinGroup.base rT)) x (@mem (FinGroup.arg_sort (FinGroup.base rT)) (predPredType (FinGroup.arg_sort (FinGroup.base rT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))))) *)
by apply: contraR; case: ifP => // E Rx; rewrite gact_out.
(* Goal: is_true (@morphic rT rT (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)))) *)
apply/morphicP=> x y /setIP[Rx cHx] /setIP[Ry cHy].
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base rT)) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) (@mulg (FinGroup.base rT) x y)) (@mulg (FinGroup.base rT) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) x) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base rT)) (@actperm (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) (@mfun aT (@coset_groupType aT (@gval aT H)) (@normaliser aT (@gval aT H)) (@coset_morphism aT (@gval aT H)) a)) y)) *)
rewrite /= !actpermE /= !modactE ?gactM //.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mulg (FinGroup.base rT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@gval aT H)))))) *)
suffices: x * y \in 'C_(|to)(H) by case/setIP.
(* Goal: is_true (@in_mem (FinGroup.sort (FinGroup.base rT)) (@mulg (FinGroup.base rT) x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H))))) *)
by rewrite groupM //; apply/setIP.
Qed.
Canonical mod_groupAction := GroupAction modact_is_groupAction.
Lemma modgactE x a :
H \subset 'C(R | to) -> a \in 'N_D(H) -> (to %% H)%act x (coset H a) = to x a.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT (@gval aT H))))))), @eq (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H) x (@coset aT (@gval aT H) a)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) *)
move=> cRH NDa /=; have [Da Na] := setIP NDa.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base rT)) (@modact aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H x (@coset aT (@gval aT H) a)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) *)
have [Rx | notRx] := boolP (x \in R).
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base rT)) (@modact aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H x (@coset aT (@gval aT H) a)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) *)
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base rT)) (@modact aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H x (@coset aT (@gval aT H) a)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) *)
by rewrite modactE //; apply/afixP=> b /setIP[_ /(subsetP cRH)/astab_act->].
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base rT)) (@modact aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) H x (@coset aT (@gval aT H) a)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) *)
rewrite gact_out //= /modact; case: ifP => // _; rewrite gact_out //.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@repr (FinGroup.base aT) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@set_of_coset aT (@gval aT H) (@coset aT (@gval aT H) a)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))) *)
suffices: a \in D :&: coset H a by case/mem_repr/setIP.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@set_of_coset aT (@gval aT H) (@coset aT (@gval aT H) a)))))) *)
by rewrite inE Da val_coset // rcoset_refl.
Qed.
Lemma gacent_mod G M :
H \subset 'C(M | to) -> G \subset 'N(H) ->
'C_(M | mod_groupAction)(G / H) = 'C_(M | to)(G).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT (@gval aT H)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent (@coset_groupType aT (@gval aT H)) rT (@quotient aT (@gval aT D) (@gval aT H)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) mod_groupAction (@quotient aT (@gval aT G) (@gval aT H)))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G))) *)
move=> cMH nHG; rewrite -gacentIdom gacentE ?subsetIl // setICA.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@gact (@coset_groupType aT (@gval aT H)) rT (@quotient aT (@gval aT D) (@gval aT H)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) mod_groupAction) (@setI (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT D) (@gval aT H)) (@quotient aT (@gval aT G) (@gval aT H)))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G))) *)
have sHD: H \subset D by rewrite (subset_trans cMH) ?subsetIl.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@afix (@coset_groupType aT (@gval aT H)) (@quotient aT (@gval aT D) (@gval aT H)) (FinGroup.arg_finType (FinGroup.base rT)) (@gact (@coset_groupType aT (@gval aT H)) rT (@quotient aT (@gval aT D) (@gval aT H)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) mod_groupAction) (@setI (FinGroup.arg_finType (FinGroup.base (@coset_groupType aT (@gval aT H)))) (@quotient aT (@gval aT D) (@gval aT H)) (@quotient aT (@gval aT G) (@gval aT H)))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G))) *)
rewrite -quotientGI // afix_mod ?setIS // setICA -gacentIim (setIC R) -setIA.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval aT (@setI_group aT D G)))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G))) *)
rewrite -gacentE ?subsetIl // gacentIdom setICA (setIidPr _) //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H))))) *)
by rewrite gacentC // ?(subset_trans cMH) ?astabS ?subsetIl // setICA subsetIl.
Qed.
Lemma acts_irr_mod G M :
H \subset 'C(M | to) -> G \subset 'N(H) -> acts_irreducibly G M to ->
acts_irreducibly (G / H) M mod_groupAction.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT (@gval aT H)))))) (_ : is_true (@acts_irreducibly aT rT (@gval aT D) (@gval rT R) (@gval aT G) (@gval rT M) to)), is_true (@acts_irreducibly (@coset_groupType aT (@gval aT H)) rT (@quotient aT (@gval aT D) (@gval aT H)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@quotient aT (@gval aT G) (@gval aT H)) (@gval rT M) mod_groupAction) *)
move=> cMH nHG /mingroupP[/andP[ntM nMG] minM].
(* Goal: is_true (@acts_irreducibly (@coset_groupType aT (@gval aT H)) rT (@quotient aT (@gval aT D) (@gval aT H)) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT H)) (@quotient aT (@gval aT G) (@gval aT H)) (@gval rT M) mod_groupAction) *)
apply/mingroupP; rewrite ntM astabs_mod ?quotientS //; split=> // L modL ntL.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gval rT L) (@gval rT M) *)
have cLH: H \subset 'C(L | to) by rewrite (subset_trans cMH) ?astabS //.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gval rT L) (@gval rT M) *)
apply: minM => //; case/andP: modL => ->; rewrite astabs_mod ?quotientSGK //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@astabs_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT L)))))) *)
by rewrite (subset_trans cLH) ?astab_sub.
Qed.
End Mod.
Lemma modact_coset_astab x a :
a \in D -> (to %% 'C(R | to))%act x (coset _ a) = to x a.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@act (@coset_groupType aT (@gval aT (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT R)))) (@quotient aT (@gval aT D) (@gval aT (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT R)))) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mod_action aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT R))) x (@coset aT (@gval aT (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT R))) a)) (@act aT (@gval aT D) (FinGroup.arg_sort (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) x a) *)
move=> Da; apply: modgactE => {x}//.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@normaliser aT (@gval aT (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT R)))))))) *)
rewrite !inE Da; apply/subsetP=> _ /imsetP[c Cc ->].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base aT))) (@conjg aT c a) (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT R)))))) *)
have Dc := astab_dom Cc; rewrite !inE groupJ //.
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base rT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base rT)) => @eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x (@conjg aT c a)) x)))))) *)
apply/subsetP=> x Rx; rewrite inE conjgE !actMin ?groupM ?groupV //.
(* Goal: is_true (@eq_op (Finite.eqType (FinGroup.arg_finType (FinGroup.base rT))) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) (@act aT (@gval aT D) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@gact aT rT (@gval aT D) (@gval rT R) to) x (@invg (FinGroup.base aT) a)) c) a) x) *)
by rewrite (astab_act Cc) ?actKVin // gact_stable ?groupV.
Qed.
Lemma acts_irr_mod_astab G M :
acts_irreducibly G M to ->
acts_irreducibly (G / 'C_G(M | to)) M (mod_groupAction _).
Proof.
(* Goal: forall _ : is_true (@acts_irreducibly aT rT (@gval aT D) (@gval rT R) (@gval aT G) (@gval rT M) to), is_true (@acts_irreducibly (@coset_groupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))) rT (@quotient aT (@gval aT D) (@gval aT (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M))))) (@quotient aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))) (@gval rT M) (mod_groupAction (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M))))) *)
move=> irrG; have /andP[_ nMG] := mingroupp irrG.
(* Goal: is_true (@acts_irreducibly (@coset_groupType aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))) rT (@quotient aT (@gval aT D) (@gval aT (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M))))) (@gacent aT rT (@gval aT D) (@gval rT R) to (@gval aT (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M))))) (@quotient aT (@gval aT G) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT M) (@gact aT rT (@gval aT D) (@gval rT R) to)))) (@gval rT M) (mod_groupAction (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M))))) *)
apply: acts_irr_mod irrG; first exact: subsetIr.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@normaliser aT (@gval aT (@setI_group aT G (@astab_group aT D (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@gval rT M)))))))) *)
by rewrite normsI ?normG // (subset_trans nMG) // astab_norm.
Qed.
Section CompAct.
Variables (gT : finGroupType) (G : {group gT}) (f : {morphism G >-> aT}).
Lemma comp_is_groupAction : is_groupAction R (comp_action to f).
Canonical comp_groupAction := GroupAction comp_is_groupAction.
Lemma gacent_comp U : 'C_(|comp_groupAction)(U) = 'C_(|to)(f @* U).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@gacent gT rT (@morphpre gT aT (@gval gT G) f (@MorPhantom gT aT (@mfun gT aT (@gval gT G) f)) (@gval aT D)) (@gval rT R) comp_groupAction U) (@gacent aT rT (@gval aT D) (@gval rT R) to (@morphim gT aT (@gval gT G) f (@MorPhantom gT aT (@mfun gT aT (@gval gT G) f)) U)) *)
rewrite /gacent afix_comp ?subIset ?subxx //.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@morphim gT aT (@gval gT G) f (@MorPhantom gT aT (@mfun gT aT (@gval gT G) f)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT aT (@gval gT G) f (@MorPhantom gT aT (@mfun gT aT (@gval gT G) f)) (@gval aT D)) U)))) (@setI (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R) (@afix aT (@gval aT D) (FinGroup.arg_finType (FinGroup.base rT)) (@gact aT rT (@gval aT D) (@gval rT R) to) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D) (@morphim gT aT (@gval gT G) f (@MorPhantom gT aT (@mfun gT aT (@gval gT G) f)) U)))) *)
by rewrite -(setIC U) (setIC D) morphim_setIpre.
Qed.
End CompAct.
End GroupActionTheory.
Notation "''C_' ( | to ) ( A )" := (gacent_group to A) : Group_scope.
Notation "''C_' ( G | to ) ( A )" :=
(setI_group G 'C_(|to)(A)) : Group_scope.
Notation "''C_' ( | to ) [ a ]" := (gacent_group to [set a%g]) : Group_scope.
Notation "''C_' ( G | to ) [ a ]" :=
(setI_group G 'C_(|to)[a]) : Group_scope.
Notation "to \ sAD" := (ract_groupAction to sAD) : groupAction_scope.
Notation "<[ nGA ] >" := (actby_groupAction nGA) : groupAction_scope.
Notation "to / H" := (quotient_groupAction to H) : groupAction_scope.
Notation "to %% H" := (mod_groupAction to H) : groupAction_scope.
Notation "to \o f" := (comp_groupAction to f) : groupAction_scope.
Section MorphAction.
Variables (aT1 aT2 : finGroupType) (rT1 rT2 : finType).
Variables (D1 : {group aT1}) (D2 : {group aT2}).
Variables (to1 : action D1 rT1) (to2 : action D2 rT2).
Variables (A : {set aT1}) (R S : {set rT1}).
Variables (h : rT1 -> rT2) (f : {morphism D1 >-> aT2}).
Hypotheses (actsDR : {acts D1, on R | to1}) (injh : {in R &, injective h}).
Hypothesis defD2 : f @* D1 = D2.
Hypotheses (sSR : S \subset R) (sAD1 : A \subset D1).
Hypothesis hfJ : {in S & D1, morph_act to1 to2 h f}.
Lemma morph_astabs : f @* 'N(S | to1) = 'N(h @: S | to2).
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astabs aT1 (@gval aT1 D1) rT1 S to1)) (@astabs aT2 (@gval aT2 D2) rT2 (@Imset.imset rT1 rT2 h (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S))) to2) *)
apply/setP=> fx; apply/morphimP/idP=> [[x D1x nSx ->] | nSx].
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astabs aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (@mfun aT1 aT2 (@gval aT1 D1) f x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) rT2 (@Imset.imset rT1 rT2 h (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S))) to2)))) *)
rewrite 2!inE -{1}defD2 mem_morphim //=; apply/subsetP=> _ /imsetP[u Su ->].
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astabs aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
(* Goal: is_true (@in_mem (Finite.sort rT2) (h u) (@mem (Finite.sort rT2) (predPredType (Finite.sort rT2)) (@SetDef.pred_of_set rT2 (@preimset rT2 (Finite.sort rT2) (fun x0 : Finite.sort rT2 => @act aT2 (@gval aT2 D2) (Finite.sort rT2) to2 x0 (@mfun aT1 aT2 (@gval aT1 D1) f x)) (@mem (Finite.sort rT2) (predPredType (Finite.sort rT2)) (@SetDef.pred_of_set rT2 (@Imset.imset rT1 rT2 h (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S))))))))) *)
by rewrite inE -hfJ ?mem_imset // (astabs_act _ nSx).
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astabs aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
have [|x D1x _ def_fx] := morphimP (_ : fx \in f @* D1).
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astabs aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) fx (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@gval aT1 D1))))) *)
by rewrite defD2 (astabs_dom nSx).
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astabs aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
exists x => //; rewrite !inE D1x; apply/subsetP=> u Su.
(* Goal: is_true (@in_mem (Finite.sort rT1) u (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 (@preimset rT1 (Finite.sort rT1) (fun x0 : Finite.sort rT1 => @act aT1 (@gval aT1 D1) (Finite.sort rT1) to1 x0 x) (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S)))))) *)
have /imsetP[u' Su' /injh def_u']: h (to1 u x) \in h @: S.
(* Goal: is_true (@in_mem (Finite.sort rT1) u (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 (@preimset rT1 (Finite.sort rT1) (fun x0 : Finite.sort rT1 => @act aT1 (@gval aT1 D1) (Finite.sort rT1) to1 x0 x) (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S)))))) *)
(* Goal: is_true (@in_mem (Finite.sort rT2) (h (@act aT1 (@gval aT1 D1) (Finite.sort rT1) to1 u x)) (@mem (Finite.sort rT2) (predPredType (Finite.sort rT2)) (@SetDef.pred_of_set rT2 (@Imset.imset rT1 rT2 h (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S)))))) *)
by rewrite hfJ // -def_fx (astabs_act _ nSx) mem_imset.
(* Goal: is_true (@in_mem (Finite.sort rT1) u (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 (@preimset rT1 (Finite.sort rT1) (fun x0 : Finite.sort rT1 => @act aT1 (@gval aT1 D1) (Finite.sort rT1) to1 x0 x) (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S)))))) *)
by rewrite inE def_u' ?actsDR ?(subsetP sSR).
Qed.
Lemma morph_astab : f @* 'C(S | to1) = 'C(h @: S | to2).
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astab aT1 (@gval aT1 D1) rT1 S to1)) (@astab aT2 (@gval aT2 D2) rT2 (@Imset.imset rT1 rT2 h (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S))) to2) *)
apply/setP=> fx; apply/morphimP/idP=> [[x D1x cSx ->] | cSx].
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astab aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (@mfun aT1 aT2 (@gval aT1 D1) f x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT2)) (@astab aT2 (@gval aT2 D2) rT2 (@Imset.imset rT1 rT2 h (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 S))) to2)))) *)
rewrite 2!inE -{1}defD2 mem_morphim //=; apply/subsetP=> _ /imsetP[u Su ->].
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astab aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
(* Goal: is_true (@in_mem (Finite.sort rT2) (h u) (@mem (Finite.sort rT2) (predPredType (Finite.sort rT2)) (@SetDef.pred_of_set rT2 (@SetDef.finset rT2 (fun x0 : Finite.sort rT2 => @eq_op (Finite.eqType rT2) (@act aT2 (@gval aT2 D2) (Finite.sort rT2) to2 x0 (@mfun aT1 aT2 (@gval aT1 D1) f x)) x0))))) *)
by rewrite inE -hfJ // (astab_act cSx).
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astab aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
have [|x D1x _ def_fx] := morphimP (_ : fx \in f @* D1).
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astab aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) fx (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@gval aT1 D1))))) *)
by rewrite defD2 (astab_dom cSx).
(* Goal: @morphim_spec aT1 aT2 (@gval aT1 D1) (@astab aT1 (@gval aT1 D1) rT1 S to1) fx (@mfun aT1 aT2 (@gval aT1 D1) f) *)
exists x => //; rewrite !inE D1x; apply/subsetP=> u Su.
(* Goal: is_true (@in_mem (Finite.sort rT1) u (@mem (Finite.sort rT1) (predPredType (Finite.sort rT1)) (@SetDef.pred_of_set rT1 (@SetDef.finset rT1 (fun x0 : Finite.sort rT1 => @eq_op (Finite.eqType rT1) (@act aT1 (@gval aT1 D1) (Finite.sort rT1) to1 x0 x) x0))))) *)
rewrite inE -(inj_in_eq injh) ?actsDR ?(subsetP sSR) ?hfJ //.
(* Goal: is_true (@eq_op (Finite.eqType rT2) (@act aT2 (@gval aT2 D2) (Finite.sort rT2) to2 (h u) (@mfun aT1 aT2 (@gval aT1 D1) f x)) (h u)) *)
by rewrite -def_fx (astab_act cSx) ?mem_imset.
Qed.
Lemma morph_afix : h @: 'Fix_(S | to1)(A) = 'Fix_(h @: S | to2)(f @* A).
End MorphAction.
Section MorphGroupAction.
Variables (aT1 aT2 rT1 rT2 : finGroupType).
Variables (D1 : {group aT1}) (D2 : {group aT2}).
Variables (R1 : {group rT1}) (R2 : {group rT2}).
Variables (to1 : groupAction D1 R1) (to2 : groupAction D2 R2).
Variables (h : {morphism R1 >-> rT2}) (f : {morphism D1 >-> aT2}).
Hypotheses (iso_h : isom R1 R2 h) (iso_f : isom D1 D2 f).
Hypothesis hfJ : {in R1 & D1, morph_act to1 to2 h f}.
Implicit Types (A : {set aT1}) (S : {set rT1}) (M : {group rT1}).
Lemma morph_gastabs S : S \subset R1 -> f @* 'N(S | to1) = 'N(h @* S | to2).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1)))), @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) S (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))) (@astabs aT2 (@gval aT2 D2) (FinGroup.finType (FinGroup.base rT2)) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) S) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)) *)
have [[_ defD2] [injh _]] := (isomP iso_f, isomP iso_h).
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1)))), @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) S (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))) (@astabs aT2 (@gval aT2 D2) (FinGroup.finType (FinGroup.base rT2)) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) S) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)) *)
move=> sSR1; rewrite (morphimEsub _ sSR1).
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) S (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))) (@astabs aT2 (@gval aT2 D2) (FinGroup.finType (FinGroup.base rT2)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base rT1)) (FinGroup.finType (FinGroup.base rT2)) (@mfun rT1 rT2 (@gval rT1 R1) h) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S))) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)) *)
apply: (morph_astabs (gact_stable to1) (injmP injh)) => // u x.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) u (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S)))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@gval aT1 D1))))), @eq (Finite.sort (FinGroup.finType (FinGroup.base rT2))) (@mfun rT1 rT2 (@gval rT1 R1) h (@act aT1 (@gval aT1 D1) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1) u x)) (@act aT2 (@gval aT2 D2) (Finite.sort (FinGroup.finType (FinGroup.base rT2))) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2) (@mfun rT1 rT2 (@gval rT1 R1) h u) (@mfun aT1 aT2 (@gval aT1 D1) f x)) *)
by move/(subsetP sSR1); apply: hfJ.
Qed.
Lemma morph_gastab S : S \subset R1 -> f @* 'C(S | to1) = 'C(h @* S | to2).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1)))), @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astab aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) S (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))) (@astab aT2 (@gval aT2 D2) (FinGroup.finType (FinGroup.base rT2)) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) S) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)) *)
have [[_ defD2] [injh _]] := (isomP iso_f, isomP iso_h).
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1)))), @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astab aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) S (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))) (@astab aT2 (@gval aT2 D2) (FinGroup.finType (FinGroup.base rT2)) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) S) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)) *)
move=> sSR1; rewrite (morphimEsub _ sSR1).
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base aT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base aT2))))) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astab aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) S (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))) (@astab aT2 (@gval aT2 D2) (FinGroup.finType (FinGroup.base rT2)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base rT1)) (FinGroup.finType (FinGroup.base rT2)) (@mfun rT1 rT2 (@gval rT1 R1) h) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S))) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)) *)
apply: (morph_astab (gact_stable to1) (injmP injh)) => // u x.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) u (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) S)))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@gval aT1 D1))))), @eq (Finite.sort (FinGroup.finType (FinGroup.base rT2))) (@mfun rT1 rT2 (@gval rT1 R1) h (@act aT1 (@gval aT1 D1) (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1) u x)) (@act aT2 (@gval aT2 D2) (Finite.sort (FinGroup.finType (FinGroup.base rT2))) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2) (@mfun rT1 rT2 (@gval rT1 R1) h u) (@mfun aT1 aT2 (@gval aT1 D1) f x)) *)
by move/(subsetP sSR1); apply: hfJ.
Qed.
Lemma morph_gacent A : A \subset D1 -> h @* 'C_(|to1)(A) = 'C_(|to2)(f @* A).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@gval aT1 D1)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT2))))) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gacent aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1 A)) (@gacent aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2 (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A)) *)
have [[_ defD2] [injh defR2]] := (isomP iso_f, isomP iso_h).
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@gval aT1 D1)))), @eq (@set_of (FinGroup.finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT2))))) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gacent aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1 A)) (@gacent aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2 (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A)) *)
move=> sAD1; rewrite !gacentE //; last by rewrite -defD2 morphimS.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT2))))) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@setI (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1) (@afix aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1) A))) (@setI (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 R2) (@afix aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) *)
rewrite morphimEsub ?subsetIl // -{1}defR2 morphimEdom.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base rT2))))) (@Imset.imset (FinGroup.arg_finType (FinGroup.base rT1)) (FinGroup.finType (FinGroup.base rT2)) (@mfun rT1 rT2 (@gval rT1 R1) h) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@setI (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1) (@afix aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1) A))))) (@setI (FinGroup.arg_finType (FinGroup.base rT2)) (@Imset.imset (FinGroup.arg_finType (FinGroup.base rT1)) (FinGroup.finType (FinGroup.base rT2)) (@mfun rT1 rT2 (@gval rT1 R1) h) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1)))) (@afix aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) *)
exact: (morph_afix (gact_stable to1) (injmP injh)).
Qed.
Lemma morph_gact_irr A M :
A \subset D1 -> M \subset R1 ->
acts_irreducibly (f @* A) (h @* M) to2 = acts_irreducibly A M to1.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@gval aT1 D1))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 M))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 R1))))), @eq bool (@acts_irreducibly aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gval rT1 M)) to2) (@acts_irreducibly aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) A (@gval rT1 M) to1) *)
move=> sAD1 sMR1.
(* Goal: @eq bool (@acts_irreducibly aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gval rT1 M)) to2) (@acts_irreducibly aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) A (@gval rT1 M) to1) *)
have [[injf defD2] [injh defR2]] := (isomP iso_f, isomP iso_h).
(* Goal: @eq bool (@acts_irreducibly aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gval rT1 M)) to2) (@acts_irreducibly aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) A (@gval rT1 M) to1) *)
have h_eq1 := morphim_injm_eq1 injh.
(* Goal: @eq bool (@acts_irreducibly aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gval rT1 M)) to2) (@acts_irreducibly aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) A (@gval rT1 M) to1) *)
apply/mingroupP/mingroupP=> [] [/andP[ntM actAM] minM].
(* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (forall (H : @group_of rT2 (Phant (FinGroup.arg_sort (FinGroup.base rT2)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 H) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 H) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M))) *)
(* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT1))) (@gval rT1 M) (oneg (group_set_of_baseGroupType (FinGroup.base rT1))))) (@subset (FinGroup.arg_finType (FinGroup.base aT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 M) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))))))) (forall (H : @group_of rT1 (Phant (FinGroup.arg_sort (FinGroup.base rT1)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT1))) (@gval rT1 H) (oneg (group_set_of_baseGroupType (FinGroup.base rT1))))) (@subset (FinGroup.arg_finType (FinGroup.base aT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 H) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 M))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT1)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))))) (@gval rT1 H) (@gval rT1 M)) *)
split=> [|U]; first by rewrite -h_eq1 // ntM -(injmSK injf) ?morph_gastabs.
(* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (forall (H : @group_of rT2 (Phant (FinGroup.arg_sort (FinGroup.base rT2)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 H) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 H) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M))) *)
(* Goal: forall (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT1))) (@gval rT1 U) (oneg (group_set_of_baseGroupType (FinGroup.base rT1))))) (@subset (FinGroup.arg_finType (FinGroup.base aT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT1)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 U) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT1)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 U))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 M))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT1)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))))) (@gval rT1 U) (@gval rT1 M) *)
case/andP=> ntU acts_fAU sUM; have sUR1 := subset_trans sUM sMR1.
(* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (forall (H : @group_of rT2 (Phant (FinGroup.arg_sort (FinGroup.base rT2)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 H) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 H) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M))) *)
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT1)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT1))))) (@gval rT1 U) (@gval rT1 M) *)
apply: (injm_morphim_inj injh) => //; apply: minM; last exact: morphimS.
(* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (forall (H : @group_of rT2 (Phant (FinGroup.arg_sort (FinGroup.base rT2)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 H) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 H) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M))) *)
(* Goal: is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) U)) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) U)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2)))))) *)
by rewrite h_eq1 // ntU -morph_gastabs ?morphimS.
(* Goal: and (is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (forall (H : @group_of rT2 (Phant (FinGroup.arg_sort (FinGroup.base rT2)))) (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 H) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 H) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M))) *)
split=> [|U]; first by rewrite h_eq1 // ntM -morph_gastabs ?morphimS.
(* Goal: forall (_ : is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base rT2))) (@gval rT2 U) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.arg_finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT2)) (@astabs aT2 (@gval aT2 D2) (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 U) (@gact aT2 rT2 (@gval aT2 D2) (@gval rT2 R2) to2))))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base rT2)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 U))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT2)) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 U) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) *)
case/andP=> ntU acts_fAU sUhM.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 U) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) *)
have sUhR1 := subset_trans sUhM (morphimS h sMR1).
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 U) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) *)
have sU'M: h @*^-1 U \subset M by rewrite sub_morphpre_injm.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base rT2)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base rT2))))) (@gval rT2 U) (@gval rT2 (@morphim_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) M)) *)
rewrite /= -(minM _ _ sU'M) ?morphpreK // -h_eq1 ?subsetIl // -(injmSK injf) //.
(* Goal: is_true (andb (negb (@eq_op (set_of_eqType (FinGroup.finType (FinGroup.base rT2))) (@morphim rT1 rT2 (@gval rT1 R1) h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) (@gval rT1 (@morphpre_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) U))) (oneg (group_set_of_baseGroupType (FinGroup.base rT2))))) (@subset (FinGroup.finType (FinGroup.base aT2)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) A))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base aT2))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base aT2)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base aT2)) (@morphim aT1 aT2 (@gval aT1 D1) f (@MorPhantom aT1 aT2 (@mfun aT1 aT2 (@gval aT1 D1) f)) (@astabs aT1 (@gval aT1 D1) (FinGroup.arg_finType (FinGroup.base rT1)) (@gval rT1 (@morphpre_group rT1 rT2 R1 h (@MorPhantom rT1 rT2 (@mfun rT1 rT2 (@gval rT1 R1) h)) U)) (@gact aT1 rT1 (@gval aT1 D1) (@gval rT1 R1) to1))))))) *)
by rewrite morph_gastabs ?(subset_trans sU'M) // morphpreK ?ntU.
Qed.
End MorphGroupAction.
Section InternalActionDefs.
Variable gT : finGroupType.
Implicit Type A : {set gT}.
Implicit Type G : {group gT}.
Definition mulgr_action := TotalAction (@mulg1 gT) (@mulgA gT).
Canonical conjg_action := TotalAction (@conjg1 gT) (@conjgM gT).
Lemma conjg_is_groupAction : is_groupAction setT conjg_action.
Proof.
(* Goal: @is_groupAction gT gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) conjg_action *)
move=> a _; rewrite /= inE; apply/andP; split.
(* Goal: is_true (@morphic gT gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (@actperm gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) conjg_action a))) *)
(* Goal: is_true (@perm_on (FinGroup.arg_finType (FinGroup.base gT)) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@actperm gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) conjg_action a)) *)
by apply/subsetP=> x _; rewrite inE.
(* Goal: is_true (@morphic gT gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@PermDef.fun_of_perm (FinGroup.arg_finType (FinGroup.base gT)) (@actperm gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) conjg_action a))) *)
by apply/morphicP=> x y _ _; rewrite !actpermE /= conjMg.
Qed.
Canonical conjg_groupAction := GroupAction conjg_is_groupAction.
Lemma rcoset_is_action : is_action setT (@rcoset gT).
Proof.
(* Goal: @is_action gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@rcoset gT) *)
by apply: is_total_action => [A|A x y]; rewrite !rcosetE (mulg1, rcosetM).
Qed.
Canonical rcoset_action := Action rcoset_is_action.
Canonical conjsg_action := TotalAction (@conjsg1 gT) (@conjsgM gT).
Lemma conjG_is_action : is_action setT (@conjG_group gT).
Proof.
(* Goal: @is_action gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@conjG_group gT) *)
apply: is_total_action => [G | G x y]; apply: val_inj; rewrite /= ?act1 //.
(* Goal: @eq (GroupSet.sort (FinGroup.base gT)) (@conjugate gT (@gval gT G) (@mulg (FinGroup.base gT) x y)) (@conjugate gT (@conjugate gT (@gval gT G) x) y) *)
exact: actM.
Qed.
Definition conjG_action := Action conjG_is_action.
End InternalActionDefs.
Notation "'R" := (@mulgr_action _) (at level 8) : action_scope.
Notation "'Rs" := (@rcoset_action _) (at level 8) : action_scope.
Notation "'J" := (@conjg_action _) (at level 8) : action_scope.
Notation "'J" := (@conjg_groupAction _) (at level 8) : groupAction_scope.
Notation "'Js" := (@conjsg_action _) (at level 8) : action_scope.
Notation "'JG" := (@conjG_action _) (at level 8) : action_scope.
Notation "'Q" := ('J / _)%act (at level 8) : action_scope.
Notation "'Q" := ('J / _)%gact (at level 8) : groupAction_scope.
Section InternalGroupAction.
Variable gT : finGroupType.
Implicit Types A B : {set gT}.
Implicit Types G H : {group gT}.
Implicit Type x : gT.
Lemma orbitR G x : orbit 'R G x = x *: G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (mulgr_action gT) (@gval gT G) x) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (@gval gT G)) *)
by rewrite -lcosetE.
Qed.
Lemma astab1R x : 'C[x | 'R] = 1.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (mulgr_action gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
apply/trivgP/subsetP=> y cxy.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) *)
by rewrite -(mulKg x y) [x * y](astab1P cxy) mulVg set11.
Qed.
Lemma astabR G : 'C(G | 'R) = 1.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (mulgr_action gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT))) *)
apply/trivgP/subsetP=> x cGx.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) *)
by rewrite -(mul1g x) [1 * x](astabP cGx) group1.
Qed.
Lemma astabsR G : 'N(G | 'R) = G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astabs gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (mulgr_action gT)) (@gval gT G) *)
apply/setP=> x; rewrite !inE -setactVin ?inE //=.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setact gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) (mulgr_action gT) (@gval gT G) (@invg (FinGroup.base gT) x))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite -groupV -{1 3}(mulg1 G) rcoset_sym -sub1set -mulGS -!rcosetE.
Qed.
Lemma atransR G : [transitive G, on G | 'R].
Proof.
(* Goal: is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT G) (mulgr_action gT)) *)
by rewrite /atrans -{1}(mul1g G) -orbitR mem_imset.
Qed.
Lemma faithfulR G : [faithful G, on G | 'R].
Proof.
(* Goal: is_true (@faithful gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT G) (mulgr_action gT)) *)
by rewrite /faithful astabR subsetIr.
Qed.
Definition Cayley_repr G := actperm <[atrans_acts (atransR G)]>.
Theorem Cayley_isom G : isom G (Cayley_repr G @* G) (Cayley_repr G).
Proof.
(* Goal: is_true (@isom gT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (@morphim gT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (@actperm_morphism gT (@gval gT G) (FinGroup.arg_finType (FinGroup.base gT)) (@action_by gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) G (@gval gT G) (mulgr_action gT) (@atrans_acts gT (FinGroup.arg_finType (FinGroup.base gT)) (mulgr_action gT) G (@gval gT G) (atransR G)))) (@MorPhantom gT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (Cayley_repr G)) (@gval gT G)) (Cayley_repr G)) *)
exact: faithful_isom (faithfulR G).
Qed.
Theorem Cayley_isog G : G \isog Cayley_repr G @* G.
Proof.
(* Goal: is_true (@isog gT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (@morphim gT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G) (@actperm_morphism gT (@gval gT G) (FinGroup.arg_finType (FinGroup.base gT)) (@action_by gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) G (@gval gT G) (mulgr_action gT) (@atrans_acts gT (FinGroup.arg_finType (FinGroup.base gT)) (mulgr_action gT) G (@gval gT G) (atransR G)))) (@MorPhantom gT (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (Cayley_repr G)) (@gval gT G))) *)
exact: isom_isog (Cayley_isom G).
Qed.
Lemma afixJ A : 'Fix_('J)(A) = 'C(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) A) (@centraliser gT A) *)
apply/setP=> x; apply/afixP/centP=> cAx y Ay /=.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT x y) x *)
(* Goal: @commute (FinGroup.base gT) x y *)
by rewrite /commute conjgC cAx.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT x y) x *)
by rewrite conjgE cAx ?mulKg.
Qed.
Lemma astabJ A : 'C(A |'J) = 'C(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) A (conjg_action gT)) (@centraliser gT A) *)
apply/setP=> x; apply/astabP/centP=> cAx y Ay /=.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT y x) y *)
(* Goal: @commute (FinGroup.base gT) x y *)
by apply: esym; rewrite conjgC cAx.
(* Goal: @eq (FinGroup.arg_sort (FinGroup.base gT)) (@conjg gT y x) y *)
by rewrite conjgE -cAx ?mulKg.
Qed.
Lemma astab1J x : 'C[x |'J] = 'C[x].
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) (conjg_action gT)) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) *)
by rewrite astabJ cent_set1.
Qed.
Lemma astabsJ A : 'N(A | 'J) = 'N(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astabs gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (FinGroup.arg_finType (FinGroup.base gT)) A (conjg_action gT)) (@normaliser gT A) *)
by apply/setP=> x; rewrite -2!groupV !inE -conjg_preim -sub_conjg.
Qed.
Lemma gacentJ A : 'C_(|'J)(A) = 'C(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@gacent gT gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (conjg_groupAction gT) A) (@centraliser gT A) *)
by rewrite gacentE ?setTI ?subsetT ?afixJ.
Qed.
Lemma sub_afixRs_norms G x A : (G :* x \in 'Fix_('Rs)(A)) = (A \subset G :^ x).
Proof.
(* Goal: @eq bool (@in_mem (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (rcoset_action gT) A)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT G) x)))) *)
rewrite inE /=; apply: eq_subset_r => a.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : FinGroup.arg_sort (FinGroup.base gT) => @eq_op (Finite.eqType (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (@rcoset gT (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) a) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT G) x)))) *)
rewrite inE rcosetE -(can2_eq (rcosetKV x) (rcosetK x)) -!rcosetM.
(* Goal: @eq bool (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.finType (FinGroup.base gT)) (@mulg (FinGroup.base gT) x (@mulg (FinGroup.base gT) a (@invg (FinGroup.base gT) x))))) (@gval gT G)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT G) x)))) *)
rewrite eqEcard card_rcoset leqnn andbT mulgA (conjgCV x) mulgK.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.finType (FinGroup.base gT)) (@conjg gT a (@invg (FinGroup.base gT) x)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@gval gT G) x)))) *)
by rewrite -{2 3}(mulGid G) mulGS sub1set -mem_conjg.
Qed.
Lemma sub_afixRs_norm G x : (G :* x \in 'Fix_('Rs)(G)) = (x \in 'N(G)).
Proof.
(* Goal: @eq bool (@in_mem (FinGroup.sort (group_set_of_baseGroupType (FinGroup.base gT))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) (@mem (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (rcoset_action gT) (@gval gT G))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT G))))) *)
by rewrite sub_afixRs_norms -groupV inE sub_conjgV.
Qed.
Lemma afixRs_rcosets A G : 'Fix_(rcosets G A | 'Rs)(G) = rcosets G 'N_A(G).
Proof.
(* Goal: @eq (@set_of (set_of_finType (FinGroup.finType (FinGroup.base gT))) (Phant (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))))) (@setI (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@rcosets gT (@gval gT G) A) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (rcoset_action gT) (@gval gT G))) (@rcosets gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT G)))) *)
apply/setP=> Gx; apply/setIP/rcosetsP=> [[/rcosetsP[x Ax ->]]|[x]].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT G))))))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) Gx (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))), and (is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) Gx (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@rcosets gT (@gval gT G) A))))) (is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) Gx (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (rcoset_action gT) (@gval gT G)))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (rcoset_action gT) (@gval gT G))))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT G))))))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x0))) *)
by rewrite sub_afixRs_norm => Nx; exists x; rewrite // inE Ax.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT G))))))) (_ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) Gx (@mulg (group_set_of_baseGroupType (FinGroup.base gT)) (@gval gT G) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))), and (is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) Gx (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@rcosets gT (@gval gT G) A))))) (is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) Gx (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (rcoset_action gT) (@gval gT G)))))) *)
by case/setIP=> Ax Nx ->; rewrite -{1}rcosetE mem_imset // sub_afixRs_norm.
Qed.
Lemma astab1Rs G : 'C[G : {set gT} | 'Rs] = G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@set1 (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT))))) (rcoset_action gT)) (@gval gT G) *)
apply/setP=> x.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@set1 (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G)) (rcoset_action gT))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by apply/astab1P/idP=> /= [<- | Gx]; rewrite rcosetE ?rcoset_refl ?rcoset_id.
Qed.
Lemma actsRs_rcosets H G : [acts G, on rcosets H G | 'Rs].
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astabs gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@rcosets gT (@gval gT H) (@gval gT G)) (rcoset_action gT))))) *)
by rewrite -orbitRs acts_orbit ?subsetT.
Qed.
Lemma transRs_rcosets H G : [transitive G, on rcosets H G | 'Rs].
Proof.
(* Goal: is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@gval gT G) (@rcosets gT (@gval gT H) (@gval gT G)) (rcoset_action gT)) *)
by rewrite -orbitRs atrans_orbit.
Qed.
Lemma astabRs_rcosets H G : 'C(rcosets H G | 'Rs) = gcore H G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@rcosets gT (@gval gT H) (@gval gT G)) (rcoset_action gT)) (@gcore gT (@gval gT H) (@gval gT G)) *)
have transGH := transRs_rcosets H G.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@rcosets gT (@gval gT H) (@gval gT G)) (rcoset_action gT)) (@gcore gT (@gval gT H) (@gval gT G)) *)
by rewrite (astab_trans_gcore transGH (orbit_refl _ G _)) astab1Rs.
Qed.
Lemma astab1Js A : 'C[A | 'Js] = 'N(A).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) (@set1 (set_of_finType (FinGroup.arg_finType (FinGroup.base gT))) A) (conjsg_action gT)) (@normaliser gT A) *)
by apply/setP=> x; apply/astab1P/normP.
Qed.
Lemma card_conjugates A G : #|A :^: G| = #|G : 'N_G(A)|.
Proof.
(* Goal: @eq nat (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@conjugates gT A (@gval gT G))))) (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT A))) *)
by rewrite card_orbit astab1Js.
Qed.
Lemma afixJG G A : (G \in 'Fix_('JG)(A)) = (A \subset 'N(G)).
Proof.
(* Goal: @eq bool (@in_mem (@group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) G (@mem (Finite.sort (group_of_finType gT)) (predPredType (Finite.sort (group_of_finType gT))) (@SetDef.pred_of_set (group_of_finType gT) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (group_of_finType gT) (conjG_action gT) A)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT G))))) *)
by apply/afixP/normsP=> nG x Ax; apply/eqP; move/eqP: (nG x Ax).
Qed.
Lemma astab1JG G : 'C[G | 'JG] = 'N(G).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (group_of_finType gT) (@set1 (group_of_finType gT) G) (conjG_action gT)) (@normaliser gT (@gval gT G)) *)
by apply/setP=> x; apply/astab1P/normP=> [/congr_group | /group_inj].
Qed.
Lemma dom_qactJ H : qact_dom 'J H = 'N(H).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@normaliser gT (@gval gT H)) *)
by rewrite qact_domE ?subsetT ?astabsJ.
Qed.
Lemma qactJ H (Hy : coset_of H) x :
'Q%act Hy x = if x \in 'N(H) then Hy ^ coset H x else Hy.
Proof.
(* Goal: @eq (@coset_of gT (@gval gT H)) (@act gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_of gT (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) Hy x) (if @in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))) then @conjg (@coset_groupType gT (@gval gT H)) Hy (@coset gT (@gval gT H) x) else Hy) *)
case: (cosetP Hy) => y Ny ->{Hy}.
(* Goal: @eq (@coset_of gT (@gval gT H)) (@act gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_of gT (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset gT (@gval gT H) y) x) (if @in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))) then @conjg (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H) y) (@coset gT (@gval gT H) x) else @coset gT (@gval gT H) y) *)
by rewrite qactEcond // dom_qactJ; case Nx: (x \in 'N(H)); rewrite ?morphJ.
Qed.
Lemma actsQ A B H :
A \subset 'N(H) -> A \subset 'N(B) -> [acts A, on B / H | 'Q].
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT B))))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astabs gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT B (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H))))) *)
by move=> nHA nBA; rewrite acts_quotient // subsetI dom_qactJ nHA astabsJ.
Qed.
Lemma astabsQ G H : H <| G -> 'N(G / H | 'Q) = 'N(H) :&: 'N(G).
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astabs gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)) (@normaliser gT (@gval gT G))) *)
by move=> nsHG; rewrite astabs_quotient // dom_qactJ astabsJ.
Qed.
Lemma astabQ H Abar : 'C(Abar |'Q) = coset H @*^-1 'C(Abar).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) Abar (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)) (@morphpre gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) (@MorPhantom gT (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H))) (@centraliser (@coset_groupType gT (@gval gT H)) Abar)) *)
apply/setP=> x; rewrite inE /= dom_qactJ morphpreE in_setI /=.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : FinGroup.arg_sort (FinGroup.base gT) => @subset (@coset_finType gT (@gval gT H)) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) Abar)) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@SetDef.finset (@coset_finType gT (@gval gT H)) (fun x : @coset_of gT (@gval gT H) => @eq_op (Finite.eqType (@coset_finType gT (@gval gT H))) (@qact gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) gT (conjg_action gT) H x a) x)))))))))) (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (@coset_of gT (@gval gT H)) (@coset gT (@gval gT H)) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@centraliser (@coset_groupType gT (@gval gT H)) Abar)))))))) *)
apply: andb_id2l => Nx; rewrite !inE -sub1set centsC cent_set1.
(* Goal: @eq bool (@subset (@coset_finType gT (@gval gT H)) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) Abar)) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@SetDef.finset (@coset_finType gT (@gval gT H)) (fun x0 : @coset_of gT (@gval gT H) => @eq_op (Finite.eqType (@coset_finType gT (@gval gT H))) (@qact gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) gT (conjg_action gT) H x0 x) x0))))) (@subset (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) Abar)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@coset gT (@gval gT H) x)))))) *)
apply: eq_subset_r => {Abar} Hy; rewrite inE qactJ Nx (sameP eqP conjg_fixP).
(* Goal: @eq bool (@eq_op (FinGroup.arg_eqType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@commg (@coset_groupType gT (@gval gT H)) Hy (@coset gT (@gval gT H) x)) (oneg (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@in_mem (Finite.sort (@coset_finType gT (@gval gT H))) Hy (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@coset gT (@gval gT H) x)))))) *)
by rewrite (sameP cent1P eqP) (sameP commgP eqP).
Qed.
Lemma sub_astabQ A H Bbar :
(A \subset 'C(Bbar | 'Q)) = (A \subset 'N(H)) && (A / H \subset 'C(Bbar)).
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) Bbar (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H))))) (andb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) (@subset (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT A (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) Bbar))))) *)
rewrite astabQ -morphpreIdom subsetI; apply: andb_id2l => nHA.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT (@coset_groupType gT (@gval gT H)) (@gval gT (@normaliser_group gT (@gval gT H))) (@coset_morphism gT (@gval gT H)) (@MorPhantom gT (@coset_groupType gT (@gval gT H)) (@mfun gT (@coset_groupType gT (@gval gT H)) (@gval gT (@normaliser_group gT (@gval gT H))) (@coset_morphism gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) Bbar))))) (@subset (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT A (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) Bbar)))) *)
by rewrite -sub_quotient_pre.
Qed.
Lemma sub_astabQR A B H :
A \subset 'N(H) -> B \subset 'N(H) ->
(A \subset 'C(B / H | 'Q)) = ([~: A, B] \subset H).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) B)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H)))))), @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT B (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
move=> nHA nHB; rewrite sub_astabQ nHA /= (sameP commG1P eqP).
(* Goal: @eq bool (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@commutator (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H)) (@quotient gT B (@gval gT H))) (oneg (group_set_of_baseGroupType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT A B))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
by rewrite eqEsubset sub1G andbT -quotientR // quotient_sub1 // comm_subG.
Qed.
Lemma astabQR A H : A \subset 'N(H) ->
'C(A / H | 'Q) = [set x in 'N(H) | [~: [set x], A] \subset H].
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) A)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT A (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) *)
move=> nHA; apply/setP=> x; rewrite astabQ -morphpreIdom 2!inE -astabQ.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@normaliser_group gT (@gval gT H)))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT A (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) A))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) *)
by case nHx: (x \in _); rewrite //= -sub1set sub_astabQR ?sub1set.
Qed.
Lemma quotient_astabQ H Abar : 'C(Abar | 'Q) / H = 'C(Abar).
Proof.
(* Goal: @eq (@set_of (@coset_finType gT (@gval gT H)) (Phant (@coset_of gT (@gval gT H)))) (@quotient gT (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) Abar (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)) (@gval gT H)) (@centraliser (@coset_groupType gT (@gval gT H)) Abar) *)
by rewrite astabQ cosetpreK.
Qed.
Lemma conj_astabQ A H x :
x \in 'N(H) -> 'C(A / H | 'Q) :^ x = 'C(A :^ x / H | 'Q).
Proof.
(* Goal: forall _ : is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))), @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@conjugate gT (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT A (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)) x) (@astab gT (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H) (@coset_finType gT (@gval gT H)) (@quotient gT (@conjugate gT A x) (@gval gT H)) (@quotient_action gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (conjg_action gT) H)) *)
move=> nHx; apply/setP=> y; rewrite !astabQ mem_conjg !in_setI -mem_conjg.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@conjugate gT (@normaliser gT (@gval gT H)) x)))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (@conjg gT y (@invg (FinGroup.base gT) x)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.sort (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H)))))))))) (andb (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@normaliser gT (@gval gT H))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.sort (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT (@conjugate gT A x) (@gval gT H)))))))))) *)
rewrite -normJ (normP nHx) quotientJ //; apply/andb_id2l => nHy.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (@conjg gT y (@invg (FinGroup.base gT) x)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.sort (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H))))))))) (@in_mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@preimset (FinGroup.arg_finType (FinGroup.base gT)) (FinGroup.sort (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) (@conjugate (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H)) (@coset gT (@gval gT H) x))))))))) *)
by rewrite !inE centJ morphJ ?groupV ?morphV // -mem_conjg.
Qed.
Section CardClass.
Variable G : {group gT}.
Lemma index_cent1 x : #|G : 'C_G[x]| = #|x ^: G|.
Proof.
(* Goal: @eq nat (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))) *)
by rewrite -astab1J -card_orbit.
Qed.
Lemma classes_partition : partition (classes G) G.
Proof.
(* Goal: is_true (@partition (FinGroup.finType (FinGroup.base gT)) (@classes gT (@gval gT G)) (@gval gT G)) *)
by apply: orbit_partition; apply/actsP=> x Gx y; apply: groupJr.
Qed.
Lemma sum_card_class : \sum_(C in classes G) #|C| = #|G|.
Proof.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun C : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) C addn (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) C (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) C))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by apply: acts_sum_card_orbit; apply/actsP=> x Gx y; apply: groupJr.
Qed.
Lemma class_formula : \sum_(C in classes G) #|G : 'C_G[repr C]| = #|G|.
Proof.
(* Goal: @eq nat (@BigOp.bigop nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) O (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun C : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody nat (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) C addn (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) C (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) C))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
rewrite -sum_card_class; apply: eq_bigr => _ /imsetP[x Gx ->].
(* Goal: @eq nat (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT x (@gval gT G))))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))) *)
have: x \in x ^: G by rewrite -{1}(conjg1 x) mem_imset.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))), @eq nat (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT x (@gval gT G))))))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))) *)
by case/mem_repr/imsetP=> y Gy ->; rewrite index_cent1 classGidl.
Qed.
Lemma abelian_classP : reflect {in G, forall x, x ^: G = [set x]} (abelian G).
Proof.
(* Goal: Bool.reflect (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT x (@gval gT G)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT x (@gval gT G)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) (@abelian gT (@gval gT G)) *)
rewrite /abelian -astabJ astabC.
(* Goal: Bool.reflect (@prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT x (@gval gT G)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT x (@gval gT G)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@afix gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (FinGroup.arg_finType (FinGroup.base gT)) (conjg_action gT) (@gval gT G))))) *)
by apply: (iffP subsetP) => cGG x Gx; apply/orbit1P; apply: cGG.
Qed.
Lemma card_classes_abelian : abelian G = (#|classes G| == #|G|).
Proof.
(* Goal: @eq bool (@abelian gT (@gval gT G)) (@eq_op nat_eqType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
have cGgt0 C: C \in classes G -> 1 <= #|C| ?= iff (#|C| == 1)%N.
(* Goal: @eq bool (@abelian gT (@gval gT G)) (@eq_op nat_eqType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) C (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))), leqif (S O) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) C))) (@eq_op nat_eqType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) C))) (S O)) *)
by case/imsetP=> x _ ->; rewrite eq_sym -index_cent1.
(* Goal: @eq bool (@abelian gT (@gval gT G)) (@eq_op nat_eqType (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
rewrite -sum_card_class -sum1_card (leqif_sum cGgt0).
(* Goal: @eq bool (@abelian gT (@gval gT G)) (@FiniteQuant.quant0b (set_of_finType (FinGroup.finType (FinGroup.base gT))) (fun i : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @FiniteQuant.all_in (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) i (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (FiniteQuant.Quantified (@eq_op nat_eqType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) i))) (S O))) i)) *)
apply/abelian_classP/forall_inP=> [cGG _ /imsetP[x Gx ->]| cGG x Gx].
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT x (@gval gT G)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) *)
(* Goal: is_true (@eq_op nat_eqType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))) (S O)) *)
by rewrite cGG ?cards1.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT x (@gval gT G)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x) *)
apply/esym/eqP; rewrite eqEcard sub1set cards1 class_refl leq_eqVlt cGG //.
(* Goal: is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@class gT x (@gval gT G)) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) *)
exact: mem_imset.
Qed.
End CardClass.
End InternalGroupAction.
Lemma gacentQ (gT : finGroupType) (H : {group gT}) (A : {set gT}) :
'C_(|'Q)(A) = 'C(A / H).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))))) (@gacent gT (@coset_groupType gT (@gval gT H)) (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (@gact gT gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (conjg_groupAction gT)) H) (@quotient gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT H)) (@quotient_groupAction gT gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (conjg_groupAction gT) H) A) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H))) *)
apply/setP=> Hx; case: (cosetP Hx) => x Nx ->{Hx}.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gacent gT (@coset_groupType gT (@gval gT H)) (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (@gact gT gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (conjg_groupAction gT)) H) (@quotient gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT H)) (@quotient_groupAction gT gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (conjg_groupAction gT) H) A)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@centraliser (@coset_groupType gT (@gval gT H)) (@quotient gT A (@gval gT H)))))) *)
rewrite -sub_cent1 -astab1J astabC sub1set -(quotientInorm H A).
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gacent gT (@coset_groupType gT (@gval gT H)) (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (@gact gT gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (conjg_groupAction gT)) H) (@quotient gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT H)) (@quotient_groupAction gT gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (conjg_groupAction gT) H) A)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@afix (@coset_groupType gT (@gval gT H)) (@setTfor (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (FinGroup.arg_sort (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (conjg_action (@coset_groupType gT (@gval gT H))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT H))) (@gval gT H)))))) *)
have defD: qact_dom 'J H = 'N(H) by rewrite qact_domE ?subsetT ?astabsJ.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gacent gT (@coset_groupType gT (@gval gT H)) (@qact_dom gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) gT (@gact gT gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (conjg_groupAction gT)) H) (@quotient gT (@gval gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))) (@gval gT H)) (@quotient_groupAction gT gT (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@setT_group gT (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (conjg_groupAction gT) H) A)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@afix (@coset_groupType gT (@gval gT H)) (@setTfor (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (Phant (FinGroup.arg_sort (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (conjg_action (@coset_groupType gT (@gval gT H))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT H))) (@gval gT H)))))) *)
rewrite !(inE, mem_quotient) //= defD setIC.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT H))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : FinGroup.arg_sort (FinGroup.base gT) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@qact gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) gT (conjg_action gT) H (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x)))))) (@subset (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@quotient gT (@setI (FinGroup.arg_finType (FinGroup.base gT)) A (@normaliser gT (@gval gT H))) (@gval gT H)))) (@mem (@coset_of gT (@gval gT H)) (predPredType (@coset_of gT (@gval gT H))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@SetDef.finset (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (fun a : @coset_of gT (@gval gT H) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@conjg (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x)))))) *)
apply/subsetP/subsetP=> [cAx _ /morphimP[a Na Aa ->] | cAx a Aa].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : FinGroup.arg_sort (FinGroup.base gT) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@qact gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) gT (conjg_action gT) H (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x)))))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@mfun gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) a) (@mem (Finite.sort (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (predPredType (Finite.sort (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@SetDef.finset (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (fun a : @coset_of gT (@gval gT H) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@conjg (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x)))))) *)
by move/cAx: Aa; rewrite !inE qactE ?defD ?morphJ.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : FinGroup.arg_sort (FinGroup.base gT) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@qact gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) gT (conjg_action gT) H (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x)))))) *)
have [_ Na] := setIP Aa; move/implyP: (cAx (coset H a)); rewrite mem_morphim //.
(* Goal: forall _ : is_true (implb true (@in_mem (Finite.sort (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@coset gT (@gval gT H) a) (@mem (Finite.sort (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (predPredType (Finite.sort (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))))) (@SetDef.pred_of_set (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (@SetDef.finset (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H))) (fun a : @coset_of gT (@gval gT H) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@conjg (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x))))))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun a : FinGroup.arg_sort (FinGroup.base gT) => @eq_op (Finite.eqType (FinGroup.arg_finType (@coset_baseGroupType gT (@gval gT H)))) (@qact gT (@setT_group gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) gT (conjg_action gT) H (@coset gT (@gval gT H) x) a) (@coset gT (@gval gT H) x)))))) *)
by rewrite !inE qactE ?defD ?morphJ.
Qed.
Section AutAct.
Variable (gT : finGroupType) (G : {set gT}).
Definition autact := act ('P \ subsetT (Aut G)).
Canonical aut_action := [action of autact].
Lemma autactK a : actperm aut_action a = a.
Proof.
(* Goal: @eq (@perm_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@actperm (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) (@Aut gT G) (FinGroup.arg_finType (FinGroup.base gT)) aut_action a) a *)
by apply/permP=> x; rewrite permE.
Qed.
Lemma autact_is_groupAction : is_groupAction G aut_action.
Proof.
(* Goal: @is_groupAction (perm_of_finGroupType (FinGroup.arg_finType (FinGroup.base gT))) gT (@Aut gT G) G aut_action *)
by move=> a Aa /=; rewrite autactK.
Qed.
Canonical aut_groupAction := GroupAction autact_is_groupAction.
End AutAct.
Arguments autact {gT} G%g.
Arguments aut_action {gT} G%g.
Arguments aut_groupAction {gT} G%g.
Notation "[ 'Aut' G ]" := (aut_action G) : action_scope.
Notation "[ 'Aut' G ]" := (aut_groupAction G) : groupAction_scope.
|
Require Export GeoCoq.Elements.OriginalProofs.euclidean_tactics.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_equalitysymmetric :
forall A B,
eq B A ->
eq A B.
Proof.
(* Goal: forall (A B : @Point Ax) (_ : @eq Ax B A), @eq Ax A B *)
intros.
(* Goal: @eq Ax A B *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @eq Ax A B *)
assert (eq A B) by (conclude cn_equalitytransitive).
(* Goal: @eq Ax A B *)
close.
Qed.
End Euclid.
|
Require Import Arith.
Require Import Terms.
Require Import Reduction.
Require Import Redexes.
Require Import Test.
Require Import Substitution.
Require Import Residuals.
Inductive compat : redexes -> redexes -> redexes -> Prop :=
| Compat_Var : forall n : nat, compat (Var n) (Var n) (Var n)
| Compat_Fun :
forall U V W : redexes, compat U V W -> compat (Fun U) (Fun V) (Fun W)
| Compat_Ap1 :
forall U1 V1 W1 : redexes,
compat U1 V1 W1 ->
forall U2 V2 W2 : redexes,
compat U2 V2 W2 ->
forall b : bool, compat (Ap false U1 U2) (Ap false V1 V2) (Ap b W1 W2)
| Compat_Ap2 :
forall U1 V1 W1 : redexes,
compat U1 V1 W1 ->
forall U2 V2 W2 : redexes,
compat U2 V2 W2 ->
forall b b' : bool,
compat (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) (Ap b' (Fun W1) W2).
Lemma compat_intro :
forall U W WU : redexes,
residuals W U WU ->
forall (V WV : redexes) (R2 : residuals W V WV) (S : sub V U), compat U V W.
Proof.
(* Goal: forall (U W WU : redexes) (_ : residuals W U WU) (V WV : redexes) (_ : residuals W V WV) (_ : sub V U), compat U V W *)
simple induction 1; intros; generalize S; inversion_clear R2; intros; inversion_clear S.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *)
(* Goal: compat (Fun V) (Fun V1) (Fun U0) *)
(* Goal: compat (Var n) (Var n) (Var n) *)
apply Compat_Var.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *)
(* Goal: compat (Fun V) (Fun V1) (Fun U0) *)
apply Compat_Fun.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *)
(* Goal: compat V V1 U0 *)
inversion_clear S0; apply H1 with W1; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *)
inversion_clear S0; apply Compat_Ap1; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
(* Goal: compat V2 V3 U2 *)
(* Goal: compat V1 V0 U1 *)
apply H1 with W0; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
(* Goal: compat V2 V3 U2 *)
apply H3 with W3; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *)
inversion_clear S0.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
inversion_clear S0; generalize H4; inversion_clear H8.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: forall _ : residuals (Fun U1) (Fun U4) W0, compat (Ap true (Fun V1) V2) (Ap false (Fun U4) V3) (Ap b (Fun U1) U2) *)
intro H11; inversion_clear H11; apply Compat_Ap2; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat V2 V3 U2 *)
(* Goal: compat V1 U4 U1 *)
apply H1 with W4; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
(* Goal: compat V2 V3 U2 *)
apply H3 with W3; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
generalize H4; inversion_clear S0.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: forall _ : residuals (Fun U1) V0 W0, compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *)
inversion_clear H8.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: forall _ : residuals (Fun U1) (Fun U4) W0, compat (Ap true (Fun V1) V2) (Ap false (Fun U4) V3) (Ap b (Fun U1) U2) *)
intro H11; inversion_clear H11; apply Compat_Ap2; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat V2 V3 U2 *)
(* Goal: compat V1 U4 U1 *)
apply H1 with W4; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat V2 V3 U2 *)
apply H3 with W3; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
inversion_clear S0; apply Compat_Ap2; inversion_clear H8; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat V2 V3 U2 *)
(* Goal: compat V1 V0 U1 *)
apply H1 with W0; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
(* Goal: compat V2 V3 U2 *)
apply H3 with W3; auto.
(* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *)
inversion_clear S0; apply Compat_Ap2; inversion_clear H8; auto.
(* Goal: compat V2 V3 U2 *)
(* Goal: compat V1 V0 U1 *)
apply H1 with W0; auto.
(* Goal: compat V2 V3 U2 *)
apply H3 with W3; auto.
Qed.
Lemma prism0 :
forall U V W : redexes,
compat U V W ->
forall (UV : redexes) (R1 : residuals U V UV) (WU WV : redexes)
(R2 : residuals W U WU) (R3 : residuals W V WV),
residuals WV UV WU.
Proof.
(* Goal: forall (U V W : redexes) (_ : compat U V W) (UV : redexes) (_ : residuals U V UV) (WU WV : redexes) (_ : residuals W U WU) (_ : residuals W V WV), residuals WV UV WU *)
simple induction 1.
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *)
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b : bool) (UV : redexes) (_ : residuals (Ap false U1 U2) (Ap false V1 V2) UV) (WU WV : redexes) (_ : residuals (Ap b W1 W2) (Ap false U1 U2) WU) (_ : residuals (Ap b W1 W2) (Ap false V1 V2) WV), residuals WV UV WU *)
(* Goal: forall (U V W : redexes) (_ : compat U V W) (_ : forall (UV : redexes) (_ : residuals U V UV) (WU WV : redexes) (_ : residuals W U WU) (_ : residuals W V WV), residuals WV UV WU) (UV : redexes) (_ : residuals (Fun U) (Fun V) UV) (WU WV : redexes) (_ : residuals (Fun W) (Fun U) WU) (_ : residuals (Fun W) (Fun V) WV), residuals WV UV WU *)
(* Goal: forall (n : nat) (UV : redexes) (_ : residuals (Var n) (Var n) UV) (WU WV : redexes) (_ : residuals (Var n) (Var n) WU) (_ : residuals (Var n) (Var n) WV), residuals WV UV WU *)
intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto.
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *)
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b : bool) (UV : redexes) (_ : residuals (Ap false U1 U2) (Ap false V1 V2) UV) (WU WV : redexes) (_ : residuals (Ap b W1 W2) (Ap false U1 U2) WU) (_ : residuals (Ap b W1 W2) (Ap false V1 V2) WV), residuals WV UV WU *)
(* Goal: forall (U V W : redexes) (_ : compat U V W) (_ : forall (UV : redexes) (_ : residuals U V UV) (WU WV : redexes) (_ : residuals W U WU) (_ : residuals W V WV), residuals WV UV WU) (UV : redexes) (_ : residuals (Fun U) (Fun V) UV) (WU WV : redexes) (_ : residuals (Fun W) (Fun U) WU) (_ : residuals (Fun W) (Fun V) WV), residuals WV UV WU *)
intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto.
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *)
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b : bool) (UV : redexes) (_ : residuals (Ap false U1 U2) (Ap false V1 V2) UV) (WU WV : redexes) (_ : residuals (Ap b W1 W2) (Ap false U1 U2) WU) (_ : residuals (Ap b W1 W2) (Ap false V1 V2) WV), residuals WV UV WU *)
intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto.
(* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *)
simple induction b; intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto.
(* Goal: residuals (Ap b' W6 W7) (Ap true W0 W3) (subst_r W5 W4) *)
(* Goal: residuals (subst_r W7 W6) (subst_r W3 W0) (subst_r W5 W4) *)
apply commutation; auto.
(* Goal: residuals (Ap b' W6 W7) (Ap true W0 W3) (subst_r W5 W4) *)
inversion_clear H4; inversion_clear H8; auto.
Qed.
Lemma prism1 :
forall U V W : redexes,
sub V U ->
forall UV : redexes,
residuals U V UV ->
forall WV : redexes,
residuals W V WV ->
forall WU : redexes, residuals W U WU -> residuals WV UV WU.
Proof.
(* Goal: forall (U V W : redexes) (_ : sub V U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes) (_ : residuals W U WU), residuals WV UV WU *)
intros; apply prism0 with U V W; auto.
(* Goal: compat U V W *)
apply compat_intro with WU WV; trivial.
Qed.
Lemma prism2 :
forall U V W : redexes,
sub V U ->
regular U ->
forall UV : redexes,
residuals U V UV ->
forall WV : redexes,
residuals W V WV ->
forall WU : redexes, residuals WV UV WU -> residuals W U WU.
Proof.
(* Goal: forall (U V W : redexes) (_ : sub V U) (_ : regular U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes) (_ : residuals WV UV WU), residuals W U WU *)
intros.
(* Goal: residuals W U WU *)
elim (residuals_intro W U); trivial.
(* Goal: comp W U *)
(* Goal: forall (x : redexes) (_ : residuals W U x), residuals W U WU *)
intros WU' R; elim (residuals_function WV UV WU) with WU'; trivial.
(* Goal: comp W U *)
(* Goal: residuals WV UV WU' *)
apply prism1 with U V W; trivial.
(* Goal: comp W U *)
apply comp_trans with V.
(* Goal: comp V U *)
(* Goal: comp W V *)
apply residuals_comp with WV; trivial.
(* Goal: comp V U *)
apply comp_sym; apply residuals_comp with UV; trivial.
Qed.
Theorem prism :
forall U V W : redexes,
sub V U ->
forall UV : redexes,
residuals U V UV ->
forall WV : redexes,
residuals W V WV ->
forall WU : redexes, residuals W U WU <-> regular U /\ residuals WV UV WU.
Proof.
(* Goal: forall (U V W : redexes) (_ : sub V U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes), iff (residuals W U WU) (and (regular U) (residuals WV UV WU)) *)
intros; unfold iff in |- *; split.
(* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *)
(* Goal: forall _ : residuals W U WU, and (regular U) (residuals WV UV WU) *)
intro; split.
(* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *)
(* Goal: residuals WV UV WU *)
(* Goal: regular U *)
apply residuals_regular with W WU; trivial.
(* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *)
(* Goal: residuals WV UV WU *)
apply prism1 with U V W; trivial.
(* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *)
simple induction 1; intros; apply prism2 with V UV WV; trivial.
Qed.
Lemma cube :
forall U V UV VU : redexes,
residuals U V UV ->
residuals V U VU ->
forall W WU WV WUV : redexes,
residuals W U WU ->
residuals WU VU WUV -> residuals W V WV -> residuals WV UV WUV.
Lemma paving :
forall U V W WU WV : redexes,
residuals W U WU ->
residuals W V WV ->
exists UV : redexes,
(exists VU : redexes,
(exists WUV : redexes, residuals WU VU WUV /\ residuals WV UV WUV)).
Proof.
(* Goal: forall (U V W WU WV : redexes) (_ : residuals W U WU) (_ : residuals W V WV), @ex redexes (fun UV : redexes => @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)))) *)
intros; elim (residuals_intro U V).
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: forall (x : redexes) (_ : residuals U V x), @ex redexes (fun UV : redexes => @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)))) *)
intros UV R1; exists UV.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV))) *)
elim (residuals_intro V U).
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: forall (x : redexes) (_ : residuals V U x), @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV))) *)
intros VU R2; exists VU.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)) *)
elim (residuals_intro WU VU).
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: regular VU *)
(* Goal: comp WU VU *)
(* Goal: forall (x : redexes) (_ : residuals WU VU x), @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)) *)
intros WUV R3; exists WUV.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: regular VU *)
(* Goal: comp WU VU *)
(* Goal: and (residuals WU VU WUV) (residuals WV UV WUV) *)
split; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: regular VU *)
(* Goal: comp WU VU *)
(* Goal: residuals WV UV WUV *)
apply cube with U V VU W WU; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: regular VU *)
(* Goal: comp WU VU *)
apply mutual_residuals_comp with U W V; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: regular VU *)
apply residuals_preserve_regular with V U; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
(* Goal: regular V *)
apply residuals_regular with U UV; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
(* Goal: comp V U *)
apply comp_sym; apply residuals_comp with UV; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
(* Goal: regular U *)
apply residuals_regular with W WU; trivial.
(* Goal: regular V *)
(* Goal: comp U V *)
apply comp_trans with W.
(* Goal: regular V *)
(* Goal: comp W V *)
(* Goal: comp U W *)
apply comp_sym; apply residuals_comp with WU; trivial.
(* Goal: regular V *)
(* Goal: comp W V *)
apply residuals_comp with WV; trivial.
(* Goal: regular V *)
apply residuals_regular with W WV; trivial.
Qed.
|
Require Export c_completeness.
Set Implicit Arguments.
Module Type sequent_mod (B: base_mod) (S: sound_mod B) (C: complete_mod B S).
Import B S C.
Reserved Notation "Γ ⊃ A" (at level 80).
Inductive G : list PropF->list PropF->Prop :=
| Gax : forall A Γ Δ , In A Γ -> In A Δ -> Γ ⊃ Δ
| GBot : forall Γ Δ , In ⊥ Γ -> Γ ⊃ Δ
| AndL : forall A B Γ1 Γ2 Δ, Γ1++A::B::Γ2 ⊃ Δ -> Γ1++A∧B::Γ2 ⊃ Δ
| AndR : forall A B Γ Δ1 Δ2, Γ ⊃ Δ1++A::Δ2 -> Γ ⊃ Δ1++B::Δ2 -> Γ ⊃ Δ1++A∧B::Δ2
| OrL : forall A B Γ1 Γ2 Δ, Γ1++A::Γ2 ⊃ Δ -> Γ1++B::Γ2 ⊃ Δ -> Γ1++A∨B::Γ2 ⊃ Δ
| OrR : forall A B Γ Δ1 Δ2, Γ ⊃ Δ1++A::B::Δ2 -> Γ ⊃ Δ1++A∨B::Δ2
| ImpL : forall A B Γ1 Γ2 Δ, Γ1++B::Γ2 ⊃ Δ -> Γ1++Γ2 ⊃ A::Δ -> Γ1++A→B::Γ2 ⊃ Δ
| ImpR : forall A B Γ Δ1 Δ2, A::Γ ⊃ Δ1++B::Δ2 -> Γ ⊃ Δ1++A→B::Δ2
| Cut : forall A Γ Δ , Γ ⊃ A::Δ -> A::Γ ⊃ Δ -> Γ ⊃ Δ
where "Γ ⊃ Δ" := (G Γ Δ) : My_scope.
Definition BigOr := fold_right Disj ⊥.
Notation "⋁ Δ" := (BigOr Δ) (at level 19).
Definition Ncl Γ := map_fold_right (Nc Γ) and True.
Notation "Γ ⊢⊢ Δ" := (Ncl Γ Δ) (at level 80).
Notation "¬l Γ" := (map Neg Γ) (at level 40).
Lemma NegAnd_impl_OrNeg : forall Γ A B, Γ ⊢ ¬(A∧B) -> Γ ⊢ ¬A∨¬B.
Proof.
(* Goal: None *)
do 3 intro;apply prov_impl.
(* Goal: None *)
apply ImpI;apply BotC;apply ImpE with (A ∧ B); [is_ass|apply AndI;apply BotC;(apply ImpE with (¬A ∨ ¬B);[is_ass|])].
(* Goal: None *)
(* Goal: None *)
apply OrI1;is_ass.
(* Goal: None *)
apply OrI2;is_ass.
Qed.
Lemma Nc_list_weakening : forall Γ1 Γ2 Δ, (forall B, In B Γ1 -> In B Γ2) -> Γ1 ⊢⊢ Δ -> Γ2 ⊢⊢ Δ.
Proof.
(* Goal: None *)
intros;induction Δ.
(* Goal: None *)
(* Goal: None *)
trivial.
(* Goal: None *)
destruct H0;split.
(* Goal: None *)
(* Goal: None *)
eapply weakening2;eassumption.
(* Goal: None *)
apply IHΔ;apply H1.
Qed.
Lemma Nc_list_impl : forall Γ A, Γ ⊢ A ->forall Δ, Δ ⊢⊢ Γ -> Δ ⊢ A.
Proof.
(* Goal: None *)
induction 1;intros;[induction Γ;destruct H;[subst;apply H0|apply IHΓ;[assumption|apply H0]] |constructor 2|econstructor 3|constructor 4|constructor 5|econstructor 6 |econstructor 7|constructor 8|constructor 9|econstructor 10];try eauto; [apply IHNc..|apply IHNc2|try apply IHNc3]; (split;[is_ass|eapply Nc_list_weakening;[|eassumption];in_solve]).
Qed.
Lemma Nc_list_contained : forall Γ Δ, (forall B, In B Δ -> In B Γ) -> Γ ⊢⊢ Δ.
Proof.
(* Goal: None *)
intros;induction Δ.
(* Goal: None *)
(* Goal: None *)
exact I.
(* Goal: None *)
split.
(* Goal: None *)
(* Goal: None *)
constructor;apply H;in_solve.
(* Goal: None *)
apply IHΔ;intros;apply H;in_solve.
Qed.
Lemma Nc_list_app : forall Γ Δ1 Δ2, Γ ⊢⊢ Δ1 -> Γ ⊢⊢ Δ2 -> Γ ⊢⊢ Δ1++Δ2.
Proof.
(* Goal: None *)
intros;induction Δ1.
(* Goal: None *)
(* Goal: None *)
assumption.
(* Goal: None *)
destruct H;split.
(* Goal: None *)
(* Goal: None *)
assumption.
(* Goal: None *)
apply IHΔ1;apply H1.
Qed.
Ltac Ncl_solve := repeat match goal with
| |- _ ⊢ _ => idtac
| |- _ ⊢⊢ _::_ => split;[eassumption||(try (is_ass;fail))|]
| |- _ ⊢⊢ _++_ => apply Nc_list_app
| |- map_fold_right (Nc ?Γ) and True _ => change (map_fold_right (Nc Γ) and True) with (Ncl Γ)
| _ => eassumption||(apply Nc_list_contained;in_solve)
end.
Lemma G_to_Nc_Neg : forall Γ Δ, Γ ⊃ Δ -> Γ++¬l Δ ⊢ ⊥.
Proof.
(* Goal: None *)
induction 1;try rewrite map_app in *;simpl in *.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
mp;[|is_ass].
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
constructor.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
apply in_app_iff;right.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
change (A → ⊥) with (¬A).
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
apply in_map;assumption.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
is_ass.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply Nc_list_impl;[eassumption|].
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
Ncl_solve.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply AndE1;is_ass.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply AndE2;is_ass.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply OrE;[apply NegAnd_impl_OrNeg;is_ass|eapply Nc_list_impl..]; [apply IHG1| |apply IHG2|];Ncl_solve.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply OrE;[is_ass|eapply Nc_list_impl..];[apply IHG1| |apply IHG2|];Ncl_solve.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply Nc_list_impl;[eassumption|].
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
Ncl_solve;(apply ImpI;mp;[is_ass|]).
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply OrI1;is_ass.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply OrI2;is_ass.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply OrE;[apply Excluded_Middle|eapply Nc_list_impl..]; [apply IHG1| |apply IHG2|Ncl_solve];Ncl_solve;mp;is_ass.
(* Goal: None *)
(* Goal: None *)
eapply Nc_list_impl;[eassumption|].
(* Goal: None *)
(* Goal: None *)
Ncl_solve.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
apply BotC;mp;[|apply ImpI;apply BotC;apply ImpE with A];is_ass.
(* Goal: None *)
(* Goal: None *)
apply ImpI;mp;[|apply ImpI];is_ass.
(* Goal: None *)
eapply OrE;[apply Excluded_Middle|eapply Nc_list_impl..]; [apply IHG2| |apply IHG1|];Ncl_solve.
Qed.
Lemma ConjNeg_Disj : forall Δ Γ, Γ ++ ¬l Δ ⊢ ⊥ -> Γ ⊢ ⋁Δ.
Theorem G_to_Nc : forall Γ Δ, Γ ⊃ Δ -> Γ ⊢ ⋁Δ.
Proof.
(* Goal: None *)
intros;apply ConjNeg_Disj;apply G_to_Nc_Neg;assumption.
Qed.
Local Ltac temp1 := econstructor;split;reflexivity||(rewrite app_comm_cons;reflexivity).
Lemma in_split_app : forall A (a:A) l2 l4 l1 l3, l1++a::l2=l3++l4 -> ((exists l,l3=l1++a::l/\l2=l++l4)\/
(exists l,l4=l++a::l2/\l1=l3++l)).
Proof.
(* Goal: forall (A : Type) (a : A) (l2 l4 l1 l3 : list A) (_ : @eq (list A) (@app A l1 (@cons A a l2)) (@app A l3 l4)), or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A l1 (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) l1 (@app A l3 l)))) *)
induction l1;intros; (destruct l3;[destruct l4|];discriminate||(injection H;intros;subst)).
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 l3) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@nil A) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a1 (@app A l1 (@cons A a l2))))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a l2))) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@nil A) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a0 l3) (@app A (@nil A) (@cons A a0 l))) (@eq (list A) (@app A l3 l4) (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a0 (@app A l3 l4)))) (@eq (list A) (@nil A) (@app A (@cons A a0 l3) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@nil A) (@app A (@nil A) (@cons A a0 l))) (@eq (list A) l4 (@app A l (@cons A a0 l4))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a0 l4) (@app A l (@cons A a0 l4))) (@eq (list A) (@nil A) (@app A (@nil A) l)))) *)
right;exists [];split;reflexivity.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 l3) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@nil A) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a1 (@app A l1 (@cons A a l2))))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a l2))) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@nil A) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a0 l3) (@app A (@nil A) (@cons A a0 l))) (@eq (list A) (@app A l3 l4) (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a0 (@app A l3 l4)))) (@eq (list A) (@nil A) (@app A (@cons A a0 l3) l)))) *)
left;temp1.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 l3) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@nil A) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a1 (@app A l1 (@cons A a l2))))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a l2))) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@nil A) l)))) *)
right;temp1.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 l3) l)))) *)
destruct (IHl1 _ H0) as [(?&?&?)|(?&?&?)];subst.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 (@app A l3 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@app A x (@cons A a l2)))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 (@app A l3 x)) (@app A (@cons A a1 l3) l)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a x))) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) (@app A x l4) (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a (@app A x l4)))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 (@app A l1 (@cons A a x))) l)))) *)
left;temp1.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 (@app A l3 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@app A x (@cons A a l2)))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 (@app A l3 x)) (@app A (@cons A a1 l3) l)))) *)
right;temp1.
Qed.
Lemma in_in_split_app : forall A (a:A) b l2 l4 l1 l3, l1++a::l2=l3++b::l4 -> (exists l,l3=l1++a::l/\l2=l++b::l4)\/
(exists l,l4=l++a::l2/\l1=l3++b::l)\/
(a=b/\l1=l3/\l2=l4).
Proof.
(* Goal: forall (A : Type) (a b : A) (l2 l4 l1 l3 : list A) (_ : @eq (list A) (@app A l1 (@cons A a l2)) (@app A l3 (@cons A b l4))), or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A l1 (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) l1 (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) l1 l3) (@eq (list A) l2 l4)))) *)
intros;apply in_split_app in H as [(?&?&?)|(?&?&?)];subst.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 x) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 x) (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) (@app A l3 x) l3) (@eq (list A) l2 l4)))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@app A l1 (@cons A a x)) (@app A l1 (@cons A a l))) (@eq (list A) (@app A x (@cons A b l4)) (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a (@app A x (@cons A b l4))))) (@eq (list A) l1 (@app A (@app A l1 (@cons A a x)) (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) l1 (@app A l1 (@cons A a x))) (@eq (list A) (@app A x (@cons A b l4)) l4)))) *)
left;econstructor;split;reflexivity.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 x) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 x) (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) (@app A l3 x) l3) (@eq (list A) l2 l4)))) *)
destruct x;injection H;intros;subst.
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 (@cons A a0 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a0 (@app A x (@cons A a l2))))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 (@cons A a0 x)) (@app A l3 (@cons A a0 l))))) (and (@eq A a a0) (and (@eq (list A) (@app A l3 (@cons A a0 x)) l3) (@eq (list A) l2 (@app A x (@cons A a l2)))))) *)
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 (@nil A)) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a l2))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l2 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 (@nil A)) (@app A l3 (@cons A a l))))) (and (@eq A a a) (and (@eq (list A) (@app A l3 (@nil A)) l3) (@eq (list A) l2 l2)))) *)
repeat (right||split||rewrite app_nil_r||reflexivity).
(* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 (@cons A a0 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a0 (@app A x (@cons A a l2))))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 (@cons A a0 x)) (@app A l3 (@cons A a0 l))))) (and (@eq A a a0) (and (@eq (list A) (@app A l3 (@cons A a0 x)) l3) (@eq (list A) l2 (@app A x (@cons A a l2)))))) *)
right;left;econstructor;split;reflexivity.
Qed.
Ltac rew1 := repeat rewrite <- app_assoc;repeat rewrite <- app_comm_cons.
Ltac rew2 := repeat rewrite app_comm_cons;try rewrite app_assoc.
Ltac constr := constructor 3||constructor 4||constructor 5||constructor 6||constructor 7||constructor 8.
Local Ltac temp2 X Y Z :=
(rew1;constr;rew2;eapply X;rew1;reflexivity)||
(rew2;constr;rew1;eapply X;rew2;reflexivity)||
(rew1;constr;rew2;[eapply Y|eapply Z];rew1;reflexivity)||
(rew2;constr;rew1;[eapply Y|eapply Z];rew2;reflexivity).
Local Ltac temp3 H IHG IHG1 IHG2 Heql A0 := induction H;intros;subst;
try apply in_split_app in Heql as [(?&?&?)|(?&?&?)];
subst;try (temp2 IHG IHG1 IHG2;fail);[is_ass|constructor 2;in_solve|
apply Cut with A0;[try rewrite app_comm_cons|rew2];auto..].
Lemma WeakL : forall Γ1 Γ2 Δ A, Γ1++Γ2 ⊃ Δ -> Γ1++A::Γ2 ⊃ Δ.
Proof.
(* Goal: None *)
intros;remember (Γ1++Γ2);revert Γ1 Γ2 Heql;temp3 H IHG IHG1 IHG2 Heql A0.
Qed.
Lemma WeakR : forall Γ Δ1 Δ2 A, Γ ⊃ Δ1++Δ2 -> Γ ⊃ Δ1++A::Δ2.
Proof.
(* Goal: None *)
intros;remember (Δ1++Δ2);revert Δ1 Δ2 Heql;temp3 H IHG IHG1 IHG2 Heql A0.
Qed.
Theorem Nc_to_G : forall Γ A, Γ ⊢ A -> Γ ⊃ [A].
End sequent_mod. |
Require Import Arith.
Definition test : forall n m : nat, {n <= m} + {n > m}.
Proof.
(* Goal: forall n m : nat, sumbool (le n m) (gt n m) *)
simple induction n; simple induction m; simpl in |- *; auto with arith.
(* Goal: forall (n : nat) (_ : sumbool (le (S n0) n) (gt (S n0) n)), sumbool (le (S n0) (S n)) (gt (S n0) (S n)) *)
intros m' H'; elim (H m'); auto with arith.
Qed.
Definition le_lt : forall n m : nat, n <= m -> {n < m} + {n = m}.
Proof.
(* Goal: forall (n m : nat) (_ : le n m), sumbool (lt n m) (@eq nat n m) *)
simple induction n; simple induction m; simpl in |- *; auto with arith.
(* Goal: forall (n : nat) (_ : forall _ : le (S n0) n, sumbool (lt (S n0) n) (@eq nat (S n0) n)) (_ : le (S n0) (S n)), sumbool (lt (S n0) (S n)) (@eq nat (S n0) (S n)) *)
intros m' H1 H2; elim (H m'); auto with arith.
Qed.
Definition compare : forall n m : nat, {n < m} + {n = m} + {n > m}.
Proof.
(* Goal: forall n m : nat, sumor (sumbool (lt n m) (@eq nat n m)) (gt n m) *)
intros n m; elim (test n m); auto with arith.
(* Goal: forall _ : le n m, sumor (sumbool (lt n m) (@eq nat n m)) (gt n m) *)
left; apply le_lt; trivial with arith.
Qed.
|
Require Import Ensf_types.
Require Import Ensf_dans.
Require Import Ensf_union.
Require Import Ensf_produit.
Definition inclus (A B : Ensf) : Prop := forall x : Elt, dans x A -> dans x B.
Hint Unfold inclus.
Lemma empty_inclus : forall x : Ensf, inclus empty x.
Proof.
(* Goal: forall x : Ensf, inclus empty x *)
unfold inclus in |- *; intros.
(* Goal: dans x0 x *)
absurd (dans x0 empty); auto.
Qed.
Hint Resolve empty_inclus.
Lemma refl_inclus : forall x : Ensf, inclus x x.
Proof.
(* Goal: forall x : Ensf, inclus x x *)
auto.
Qed.
Hint Resolve refl_inclus.
Lemma inclus_trans :
forall a b c : Ensf, inclus a b -> inclus b c -> inclus a c.
Proof.
(* Goal: forall (a b c : Ensf) (_ : inclus a b) (_ : inclus b c), inclus a c *)
auto.
Qed.
Lemma cart_inclus :
forall a b c d : Ensf,
inclus a b -> inclus c d -> inclus (prodcart a c) (prodcart b d).
Hint Resolve cart_inclus.
Lemma inclus_add :
forall (a b : Ensf) (y : Elt), inclus a b -> inclus a (add y b).
Proof.
(* Goal: forall (a b : Ensf) (y : Elt) (_ : inclus a b), inclus a (add y b) *)
auto.
Qed.
Hint Resolve inclus_add.
Lemma singl_inclus_add :
forall (e : Elt) (a : Ensf), inclus (singleton e) (add e a).
Proof.
(* Goal: forall (e : Elt) (a : Ensf), inclus (singleton e) (add e a) *)
unfold inclus in |- *.
(* Goal: forall (e : Elt) (a : Ensf) (x : Elt) (_ : dans x (singleton e)), dans x (add e a) *)
intros e a x H.
(* Goal: dans x (add e a) *)
cut (x = e); auto.
(* Goal: forall _ : @eq Elt x e, dans x (add e a) *)
intro H0.
(* Goal: dans x (add e a) *)
rewrite H0; auto.
Qed.
Hint Resolve singl_inclus_add.
Lemma inclus_singl :
forall (e : Elt) (a : Ensf), inclus (singleton e) a -> dans e a.
Proof.
(* Goal: forall (e : Elt) (a : Ensf) (_ : inclus (singleton e) a), dans e a *)
auto.
Qed.
Lemma add_inclus :
forall (x : Elt) (a b : Ensf), dans x b -> inclus a b -> inclus (add x a) b.
Hint Resolve add_inclus.
Lemma dans_trans :
forall (x : Elt) (a b : Ensf), dans x a -> inclus a b -> dans x b.
Proof.
(* Goal: forall (x : Elt) (a b : Ensf) (_ : dans x a) (_ : inclus a b), dans x b *)
auto.
Qed.
Lemma union_inclus :
forall a b c : Ensf, inclus a c -> inclus b c -> inclus (union a b) c.
Proof.
(* Goal: forall (a b c : Ensf) (_ : inclus a c) (_ : inclus b c), inclus (union a b) c *)
unfold inclus in |- *.
(* Goal: forall (a b c : Ensf) (_ : forall (x : Elt) (_ : dans x a), dans x c) (_ : forall (x : Elt) (_ : dans x b), dans x c) (x : Elt) (_ : dans x (union a b)), dans x c *)
intros.
(* Goal: dans x c *)
cut (dans x a \/ dans x b); auto.
(* Goal: forall _ : or (dans x a) (dans x b), dans x c *)
intro H2; elim H2; auto.
Qed.
Hint Resolve union_inclus.
Lemma inclus_g : forall a b : Ensf, inclus a (union a b).
Proof.
(* Goal: forall a b : Ensf, inclus a (union a b) *)
auto.
Qed.
Lemma inclus_d : forall a b : Ensf, inclus b (union a b).
Proof.
(* Goal: forall a b : Ensf, inclus b (union a b) *)
auto.
Qed.
Lemma inclus_g2 : forall A B C : Ensf, inclus A B -> inclus A (union B C).
Proof.
(* Goal: forall (A B C : Ensf) (_ : inclus A B), inclus A (union B C) *)
auto.
Qed.
Hint Resolve inclus_g2.
Lemma inclus_d2 : forall A B C : Ensf, inclus A C -> inclus A (union B C).
Proof.
(* Goal: forall (A B C : Ensf) (_ : inclus A C), inclus A (union B C) *)
auto.
Qed.
Hint Resolve inclus_d2.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_03.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCorder.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ABCequalsCBA.
Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglestransitive.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_angleorderrespectscongruence :
forall A B C D E F P Q R,
LtA A B C D E F -> CongA P Q R D E F ->
LtA A B C P Q R.
Proof.
(* Goal: forall (A B C D E F P Q R : @Point Ax0) (_ : @LtA Ax0 A B C D E F) (_ : @CongA Ax0 P Q R D E F), @LtA Ax0 A B C P Q R *)
intros.
(* Goal: @LtA Ax0 A B C P Q R *)
rename_H H;let Tf:=fresh in assert (Tf:exists G H J, (BetS G H J /\ Out E D G /\ Out E F J /\ CongA A B C D E H)) by (conclude_def LtA );destruct Tf as [G[H[J]]];spliter.
(* Goal: @LtA Ax0 A B C P Q R *)
assert ((neq P Q /\ neq Q R /\ neq P R /\ neq D E /\ neq E F /\ neq D F)) by (forward_using lemma_angledistinct).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (neq Q P) by (conclude lemma_inequalitysymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert ((neq A B /\ neq B C /\ neq A C /\ neq D E /\ neq E H /\ neq D H)) by (forward_using lemma_angledistinct).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (neq E G) by (conclude lemma_raystrict).
(* Goal: @LtA Ax0 A B C P Q R *)
let Tf:=fresh in assert (Tf:exists U, (Out Q P U /\ Cong Q U E G)) by (conclude lemma_layoff);destruct Tf as [U];spliter.
(* Goal: @LtA Ax0 A B C P Q R *)
assert (neq E J) by (conclude lemma_raystrict).
(* Goal: @LtA Ax0 A B C P Q R *)
let Tf:=fresh in assert (Tf:exists V, (Out Q R V /\ Cong Q V E J)) by (conclude lemma_layoff);destruct Tf as [V];spliter.
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Cong G H G H) by (conclude cn_congruencereflexive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Lt G H G J) by (conclude_def Lt ).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA D E F P Q R) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA D E F U Q V) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA U Q V D E F) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA U Q V G E J) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA G E J U Q V) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Cong E G Q U) by (conclude lemma_congruencesymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Cong E J Q V) by (conclude lemma_congruencesymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert ((Cong G J U V /\ CongA E G J Q U V /\ CongA E J G Q V U)) by (conclude proposition_04).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Cong U V G J) by (conclude lemma_congruencesymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (neq G J) by (forward_using lemma_betweennotequal).
(* Goal: @LtA Ax0 A B C P Q R *)
let Tf:=fresh in assert (Tf:exists W, (BetS U W V /\ Cong U W G H)) by (conclude proposition_03);destruct Tf as [W];spliter.
(* Goal: @LtA Ax0 A B C P Q R *)
assert (eq H H) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out E H H) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA A B C G E H) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (nCol G E H) by (conclude lemma_equalanglesNC).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (nCol G H E) by (forward_using lemma_NCorder).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (neq U V) by (forward_using lemma_betweennotequal).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out U V W) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (eq Q Q) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (eq E E) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (nCol U Q V) by (conclude lemma_equalanglesNC).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (neq U Q) by (forward_using lemma_NCdistinct).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out U Q Q) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (~ eq G E).
(* Goal: @LtA Ax0 A B C P Q R *)
(* Goal: not (@eq Ax0 G E) *)
{
(* Goal: not (@eq Ax0 G E) *)
intro.
(* Goal: False *)
assert (Col G H E) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 A B C P Q R *)
}
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out G E E) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA E G J Q U W) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA Q U W E G J) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out G J H) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA Q U W E G H) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA E G H Q U W) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (nCol Q U W) by (conclude lemma_equalanglesNC).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (nCol U W Q) by (forward_using lemma_NCorder).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (nCol H G E) by (forward_using lemma_NCorder).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (~ Col W U Q).
(* Goal: @LtA Ax0 A B C P Q R *)
(* Goal: not (@Col Ax0 W U Q) *)
{
(* Goal: not (@Col Ax0 W U Q) *)
intro.
(* Goal: False *)
assert (Col U W Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 A B C P Q R *)
}
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Cong G H U W) by (conclude lemma_congruencesymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Cong G E U Q) by (forward_using lemma_congruenceflip).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA E G H Q U W) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA Q U W W U Q) by (conclude lemma_ABCequalsCBA).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA E G H W U Q) by (conclude lemma_equalanglestransitive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA H G E E G H) by (conclude lemma_ABCequalsCBA).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA H G E W U Q) by (conclude lemma_equalanglestransitive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert ((Cong H E W Q /\ CongA G H E U W Q /\ CongA G E H U Q W)) by (conclude proposition_04).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA A B C U Q W) by (conclude lemma_equalanglestransitive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (eq W W) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (~ eq Q W).
(* Goal: @LtA Ax0 A B C P Q R *)
(* Goal: not (@eq Ax0 Q W) *)
{
(* Goal: not (@eq Ax0 Q W) *)
intro.
(* Goal: False *)
assert (Col Q U W) by (conclude_def Col ).
(* Goal: False *)
assert (Col W U Q) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 A B C P Q R *)
}
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out Q W W) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (Out Q U P) by (conclude lemma_ray5).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (CongA A B C P Q W) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 A B C P Q R *)
assert (LtA A B C P Q R) by (conclude_def LtA ).
(* Goal: @LtA Ax0 A B C P Q R *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_congruenceflip.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthancongruence.
Require Export GeoCoq.Elements.OriginalProofs.lemma_lessthancongruence2.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_TGflip :
forall A B C a b c,
TG A a B b C c ->
TG a A B b C c /\ TG A a B b c C.
Proof.
(* Goal: forall (A B C a b c : @Point Ax0) (_ : @TG Ax0 A a B b C c), and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
intros.
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
rename_H H;let Tf:=fresh in assert (Tf:exists H, (BetS A a H /\ Cong a H B b /\ Lt C c A H)) by (conclude_def TG );destruct Tf as [H];spliter.
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (neq A a) by (forward_using lemma_betweennotequal).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (neq a A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (neq a H) by (forward_using lemma_betweennotequal).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (neq B b) by (conclude axiom_nocollapse).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
let Tf:=fresh in assert (Tf:exists h, (BetS a A h /\ Cong A h B b)) by (conclude lemma_extension);destruct Tf as [h];spliter.
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Cong A a a A) by (conclude cn_equalityreverse).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Cong B b A h) by (conclude lemma_congruencesymmetric).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Cong a H A h) by (conclude lemma_congruencetransitive).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Cong A H a h) by (conclude cn_sumofparts).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Lt C c a h) by (conclude lemma_lessthancongruence).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (TG a A B b C c) by (conclude_def TG ).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Cong C c c C) by (conclude cn_equalityreverse).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Lt c C A H) by (conclude lemma_lessthancongruence2).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (TG A a B b c C) by (conclude_def TG ).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
assert (Lt C c a h) by (conclude lemma_lessthancongruence).
(* Goal: and (@TG Ax0 a A B b C c) (@TG Ax0 A a B b c C) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_20.
Require Export GeoCoq.Elements.OriginalProofs.lemma_TGflip.
Require Export GeoCoq.Elements.OriginalProofs.lemma_TGsymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_22.
Require Export GeoCoq.Elements.OriginalProofs.lemma_10_12.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_Euclid4 :
forall A B C a b c,
Per A B C -> Per a b c ->
CongA A B C a b c.
Proof.
(* Goal: forall (A B C a b c : @Point Ax0) (_ : @Per Ax0 A B C) (_ : @Per Ax0 a b c), @CongA Ax0 A B C a b c *)
intros.
(* Goal: @CongA Ax0 A B C a b c *)
let Tf:=fresh in assert (Tf:exists D, (BetS A B D /\ Cong A B D B /\ Cong A C D C /\ neq B C)) by (conclude_def Per );destruct Tf as [D];spliter.
(* Goal: @CongA Ax0 A B C a b c *)
let Tf:=fresh in assert (Tf:exists d, (BetS a b d /\ Cong a b d b /\ Cong a c d c /\ neq b c)) by (conclude_def Per );destruct Tf as [d];spliter.
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq a b) by (forward_using lemma_betweennotequal).
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq b a) by (conclude lemma_inequalitysymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq A B) by (forward_using lemma_betweennotequal).
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
let Tf:=fresh in assert (Tf:exists p, (Out b a p /\ Cong b p B A)) by (conclude lemma_layoff);destruct Tf as [p];spliter.
(* Goal: @CongA Ax0 A B C a b c *)
let Tf:=fresh in assert (Tf:exists q, (Out b c q /\ Cong b q B C)) by (conclude lemma_layoff);destruct Tf as [q];spliter.
(* Goal: @CongA Ax0 A B C a b c *)
assert (Per a b q) by (conclude lemma_8_3).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Per q b a) by (conclude lemma_8_2).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Per q b p) by (conclude lemma_8_3).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Per p b q) by (conclude lemma_8_2).
(* Goal: @CongA Ax0 A B C a b c *)
let Tf:=fresh in assert (Tf:exists r, (BetS p b r /\ Cong p b r b /\ Cong p q r q /\ neq b q)) by (conclude_def Per );destruct Tf as [r];spliter.
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong q p q r) by (forward_using lemma_congruenceflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (nCol p b q) by (conclude lemma_rightangleNC).
(* Goal: @CongA Ax0 A B C a b c *)
assert (~ Col b q p).
(* Goal: @CongA Ax0 A B C a b c *)
(* Goal: not (@Col Ax0 b q p) *)
{
(* Goal: not (@Col Ax0 b q p) *)
intro.
(* Goal: False *)
assert (Col p b q) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @CongA Ax0 A B C a b c *)
}
(* Goal: @CongA Ax0 A B C a b c *)
assert (~ Col q p b).
(* Goal: @CongA Ax0 A B C a b c *)
(* Goal: not (@Col Ax0 q p b) *)
{
(* Goal: not (@Col Ax0 q p b) *)
intro.
(* Goal: False *)
assert (Col p b q) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @CongA Ax0 A B C a b c *)
}
(* Goal: @CongA Ax0 A B C a b c *)
assert (Triangle p b q) by (conclude_def Triangle ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Triangle b q p) by (conclude_def Triangle ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Triangle q p b) by (conclude_def Triangle ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG b p p q b q) by (conclude proposition_20).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG q b b p q p) by (conclude proposition_20).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG p q q b p b) by (conclude proposition_20).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG b q b p q p) by (forward_using lemma_TGflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG b q b p p q) by (forward_using lemma_TGflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG q b p q p b) by (conclude lemma_TGsymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG b q p q p b) by (forward_using lemma_TGflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG b q p q b p) by (forward_using lemma_TGflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (TG b p p q q b) by (forward_using lemma_TGflip).
(* Goal: @CongA Ax0 A B C a b c *)
let Tf:=fresh in assert (Tf:exists E F, (Cong B E b p /\ Cong B F b q /\ Cong E F p q /\ Out B A E /\ Triangle B E F)) by (conclude proposition_22);destruct Tf as [E[F]];spliter.
(* Goal: @CongA Ax0 A B C a b c *)
assert (BetS D B A) by (conclude axiom_betweennesssymmetry).
(* Goal: @CongA Ax0 A B C a b c *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out B A A) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B E B A) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (eq E A) by (conclude lemma_layoffunique).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B A b p) by (conclude cn_equalitysub).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A F p q) by (conclude cn_equalitysub).
(* Goal: @CongA Ax0 A B C a b c *)
assert (~ eq p b).
(* Goal: @CongA Ax0 A B C a b c *)
(* Goal: not (@eq Ax0 p b) *)
{
(* Goal: not (@eq Ax0 p b) *)
intro.
(* Goal: False *)
assert (Col p b q) by (conclude_def Col ).
(* Goal: False *)
assert (nCol p b q) by (conclude lemma_rightangleNC).
(* Goal: False *)
contradict.
(* BG Goal: @CongA Ax0 A B C a b c *)
}
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong r b p b) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b r p b) by (forward_using lemma_congruenceflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b p B E) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq b p) by (conclude lemma_inequalitysymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B A A B) by (conclude cn_equalityreverse).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong p b b r) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong p q r q) by (conclude lemma_rightreverse).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong p b A B) by (forward_using lemma_doublereverse).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b r p b) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b r A B) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A B B D) by (forward_using lemma_congruenceflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b r B D) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b q B F) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong p q A F) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong q r F D) by (conclude axiom_5_line).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A F r q) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A F q r) by (forward_using lemma_congruenceflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A F F D) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A F D F) by (forward_using lemma_congruenceflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq b q) by (conclude_def Per ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong q b b q) by (conclude cn_equalityreverse).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong q b B F) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (neq B F) by (conclude axiom_nocollapse).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Per A B F) by (conclude_def Per ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b q B F) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B C b q) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B C B F) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong A C A F) by (conclude lemma_10_12).
(* Goal: @CongA Ax0 A B C a b c *)
assert (eq F F) by (conclude cn_equalityreflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out B F F) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out B C C) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out B A A) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B A B A) by (conclude cn_congruencereflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (nCol A B C) by (conclude lemma_rightangleNC).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA A B C A B F) by (conclude_def CongA ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA A B C A B C) by (conclude lemma_equalanglesreflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA A B C A B F) by (conclude lemma_equalanglestransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (eq p p) by (conclude cn_equalityreflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (eq q q) by (conclude cn_equalityreflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out b p p) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out b q q) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out B F F) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out B A A) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B A b p) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong B A p b) by (forward_using lemma_congruenceflip).
(* Goal: @CongA Ax0 A B C a b c *)
assert (nCol A B F) by (conclude lemma_rightangleNC).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA A B F p b q) by (conclude_def CongA ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA A B C p b q) by (conclude lemma_equalanglestransitive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (nCol a b c) by (conclude lemma_rightangleNC).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out b p p) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Out b q q) by (conclude lemma_ray4).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b p b p) by (conclude cn_congruencereflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong b q b q) by (conclude cn_congruencereflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (Cong p q p q) by (conclude cn_congruencereflexive).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA a b c p b q) by (conclude_def CongA ).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA p b q a b c) by (conclude lemma_equalanglessymmetric).
(* Goal: @CongA Ax0 A B C a b c *)
assert (CongA A B C a b c) by (conclude lemma_equalanglestransitive).
(* Goal: @CongA Ax0 A B C a b c *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_congruencetransitive.
Section Euclid.
Context `{Ax1:euclidean_neutral}.
Lemma lemma_doublereverse :
forall A B C D,
Cong A B C D ->
Cong D C B A /\ Cong B A D C.
Proof.
(* Goal: forall (A B C D : @Point Ax1) (_ : @Cong Ax1 A B C D), and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
intros.
(* Goal: and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
assert (Cong C D D C) by (conclude cn_equalityreverse).
(* Goal: and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
assert (Cong A B D C) by (conclude lemma_congruencetransitive).
(* Goal: and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
assert (Cong B A A B) by (conclude cn_equalityreverse).
(* Goal: and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
assert (Cong B A D C) by (conclude lemma_congruencetransitive).
(* Goal: and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
assert (Cong D C B A) by (conclude lemma_congruencesymmetric).
(* Goal: and (@Cong Ax1 D C B A) (@Cong Ax1 B A D C) *)
close.
Qed.
End Euclid.
|
Set Implicit Arguments.
Require Export Arith.
Require Export List.
Section Wrap.
Unset Elimination Schemes.
Variable A : Set.
Variable leA : A -> A -> Prop.
Inductive tree : Set :=
| node : A -> list tree -> tree.
Section definitions.
Fixpoint tree_size (t : tree) : nat :=
match t with
| node _ l => S ((fix l_size (l : list tree) : nat :=
match l with
| nil => 0
| t' :: l' => (tree_size t') + (l_size l')
end) l)
end.
Definition root (t : tree) : A :=
match t with
| node a l => a
end.
Definition subtrees (t : tree) : list tree :=
match t with
| node _ l => l
end.
Inductive tree_in_forest : tree -> list tree -> Prop :=
| tif0 : forall t t' l, In t' l -> subtree t t' -> tree_in_forest t l
with subtree : tree -> tree -> Prop :=
| sub0 : forall t, subtree t t
| sub1 : forall t l ts, tree_in_forest t ts -> subtree t (node l ts).
End definitions.
Section tree_rect.
Variables
(P : tree -> Type)
(Q : list tree -> Type).
Hypotheses
(H1 : forall x, P (node x nil))
(H2 : forall f v, Q v -> P (node f v))
(H3 : Q nil)
(H4 : forall t v, P t -> Q v -> Q (t :: v)).
Fixpoint tree_rect_aux t : P t :=
match t as t return P t with
| node f v => H2 f
((fix vt_rect (v : list tree) : Q v :=
match v as v return Q v with
| nil => H3
| cons t' v' => H4 (tree_rect_aux t') (vt_rect v')
end) v)
end.
End tree_rect.
Set Elimination Schemes.
Inductive lforall (P : tree -> Type) : list tree -> Type :=
| lforall_nil : lforall P nil
| lforall_cons : forall a l, lforall P l -> P a -> lforall P (a::l).
Lemma tree_rect : forall P : tree -> Type,
(forall x, P (node x nil)) -> (forall f v, lforall P v -> P (node f v)) ->
forall t, P t.
Proof.
(* Goal: forall (P : forall _ : tree, Type) (_ : forall x : A, P (node x (@nil tree))) (_ : forall (f : A) (v : list tree) (_ : lforall P v), P (node f v)) (t : tree), P t *)
intros P H1 H2.
(* Goal: forall t : tree, P t *)
apply tree_rect_aux with (Q := fun l => lforall P l); trivial.
(* Goal: forall (t : tree) (v : list tree) (_ : P t) (_ : lforall P v), lforall P (@cons tree t v) *)
(* Goal: lforall P (@nil tree) *)
constructor.
(* Goal: forall (t : tree) (v : list tree) (_ : P t) (_ : lforall P v), lforall P (@cons tree t v) *)
intros; constructor; trivial.
Qed.
Lemma tree_ind : forall P : tree -> Prop,
(forall x, P (node x nil)) -> (forall f v, (forall u, In u v -> P u) -> P (node f v)) ->
forall t, P t.
Proof.
(* Goal: forall (P : forall _ : tree, Prop) (_ : forall x : A, P (node x (@nil tree))) (_ : forall (f : A) (v : list tree) (_ : forall (u : tree) (_ : @In tree u v), P u), P (node f v)) (t : tree), P t *)
intros P H1 H2.
(* Goal: forall t : tree, P t *)
apply tree_rect; trivial.
(* Goal: forall (f : A) (v : list tree) (_ : lforall P v), P (node f v) *)
intros f v H; apply H2.
(* Goal: forall (u : tree) (_ : @In tree u v), P u *)
induction H; intros u Hu.
(* Goal: P u *)
(* Goal: P u *)
inversion Hu.
(* Goal: P u *)
elim Hu; clear Hu; intro Hu.
(* Goal: P u *)
(* Goal: P u *)
subst; trivial.
(* Goal: P u *)
apply IHlforall; trivial.
Qed.
Fact im_sub_tree_size : forall a l t, In t l -> (tree_size t) < (tree_size (node a l)).
Proof.
(* Goal: forall (a : A) (l : list tree) (t : tree) (_ : @In tree t l), lt (tree_size t) (tree_size (node a l)) *)
intros a l; induction l as [| u l IHl]; intros t Hin.
(* Goal: lt (tree_size t) (tree_size (node a (@cons tree u l))) *)
(* Goal: lt (tree_size t) (tree_size (node a (@nil tree))) *)
inversion Hin.
(* Goal: lt (tree_size t) (tree_size (node a (@cons tree u l))) *)
elim Hin; clear Hin; intro Hin.
(* Goal: lt (tree_size t) (tree_size (node a (@cons tree u l))) *)
(* Goal: lt (tree_size t) (tree_size (node a (@cons tree u l))) *)
subst; simpl in |- *.
(* Goal: lt (tree_size t) (tree_size (node a (@cons tree u l))) *)
(* Goal: lt (tree_size t) (S (Init.Nat.add (tree_size t) ((fix l_size (l : list tree) : nat := match l with | nil => O | cons t' l' => Init.Nat.add (tree_size t') (l_size l') end) l))) *)
apply lt_le_trans with (S (tree_size t)); auto with arith.
(* Goal: lt (tree_size t) (tree_size (node a (@cons tree u l))) *)
apply lt_le_trans with (tree_size (node a l)); auto with arith.
(* Goal: le (tree_size (node a l)) (tree_size (node a (@cons tree u l))) *)
simpl; auto with arith.
Qed.
Fact subtree_trans : forall t t' t'', subtree t t' -> subtree t' t'' -> subtree t t''.
Proof.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
assert (H : forall t'' t', subtree t' t'' -> forall t, subtree t t' -> subtree t t'').
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: forall (t'' t' : tree) (_ : subtree t' t'') (t : tree) (_ : subtree t t'), subtree t t'' *)
intro t; induction t as [a | a f IHt]; intros t' H1 t'' H2.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: subtree t'' (node a f) *)
(* Goal: subtree t'' (node a (@nil tree)) *)
inversion H1; subst; trivial.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: subtree t'' (node a f) *)
(* Goal: subtree t'' (node a (@nil tree)) *)
inversion H3; subst; trivial.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: subtree t'' (node a f) *)
(* Goal: subtree t'' (node a (@nil tree)) *)
inversion H.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: subtree t'' (node a f) *)
inversion H1; subst; trivial.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: subtree t'' (node a f) *)
constructor 2.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: tree_in_forest t'' f *)
inversion H3; subst.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: tree_in_forest t'' f *)
constructor 1 with t'0; trivial.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
(* Goal: subtree t'' t'0 *)
apply IHt with t'; trivial.
(* Goal: forall (t t' t'' : tree) (_ : subtree t t') (_ : subtree t' t''), subtree t t'' *)
intros t t' t'' H1 H2; apply H with t'; trivial.
Qed.
Fact eq_tree_dec : (forall (a a' : A), {a = a'} + {a <> a'}) ->
forall (t t' : tree), {t = t'} + {t <> t'}.
Proof.
(* Goal: forall (_ : forall a a' : A, sumbool (@eq A a a') (not (@eq A a a'))) (t t' : tree), sumbool (@eq tree t t') (not (@eq tree t t')) *)
intro eq_A_dec; apply (tree_rect (P:=fun t => forall (t' : tree), {t = t'} + {t <> t'})).
(* Goal: forall (f : A) (v : list tree) (_ : lforall (fun t : tree => forall t' : tree, sumbool (@eq tree t t') (not (@eq tree t t'))) v) (t' : tree), sumbool (@eq tree (node f v) t') (not (@eq tree (node f v) t')) *)
(* Goal: forall (x : A) (t' : tree), sumbool (@eq tree (node x (@nil tree)) t') (not (@eq tree (node x (@nil tree)) t')) *)
intros a t'; destruct t' as [a' ts'].
(* Goal: forall (f : A) (v : list tree) (_ : lforall (fun t : tree => forall t' : tree, sumbool (@eq tree t t') (not (@eq tree t t'))) v) (t' : tree), sumbool (@eq tree (node f v) t') (not (@eq tree (node f v) t')) *)
(* Goal: sumbool (@eq tree (node a (@nil tree)) (node a' ts')) (not (@eq tree (node a (@nil tree)) (node a' ts'))) *)
destruct ts'; [idtac | right; intro HF; inversion HF].
(* Goal: forall (f : A) (v : list tree) (_ : lforall (fun t : tree => forall t' : tree, sumbool (@eq tree t t') (not (@eq tree t t'))) v) (t' : tree), sumbool (@eq tree (node f v) t') (not (@eq tree (node f v) t')) *)
(* Goal: sumbool (@eq tree (node a (@nil tree)) (node a' (@nil tree))) (not (@eq tree (node a (@nil tree)) (node a' (@nil tree)))) *)
elim (eq_A_dec a a'); intro case_a_a'; [left | right; intro HF; apply case_a_a']; subst; trivial.
(* Goal: forall (f : A) (v : list tree) (_ : lforall (fun t : tree => forall t' : tree, sumbool (@eq tree t t') (not (@eq tree t t'))) v) (t' : tree), sumbool (@eq tree (node f v) t') (not (@eq tree (node f v) t')) *)
(* Goal: @eq A a a' *)
inversion HF; trivial.
(* Goal: forall (f : A) (v : list tree) (_ : lforall (fun t : tree => forall t' : tree, sumbool (@eq tree t t') (not (@eq tree t t'))) v) (t' : tree), sumbool (@eq tree (node f v) t') (not (@eq tree (node f v) t')) *)
intros a ts IHt t'; destruct t' as [a' ts'].
(* Goal: sumbool (@eq tree (node a ts) (node a' ts')) (not (@eq tree (node a ts) (node a' ts'))) *)
elim (eq_A_dec a a'); intro case_a_a'; [subst a'|right;intro HF;inversion HF;apply case_a_a'; trivial].
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
assert (H : {ts = ts'} + {ts <> ts'}).
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) ts ts') (not (@eq (list tree) ts ts')) *)
generalize ts'; clear ts'; induction IHt; intro ts'.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) ts') (not (@eq (list tree) (@cons tree a0 l) ts')) *)
(* Goal: sumbool (@eq (list tree) (@nil tree) ts') (not (@eq (list tree) (@nil tree) ts')) *)
destruct ts' as [| t' ts']; [left | right]; trivial.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) ts') (not (@eq (list tree) (@cons tree a0 l) ts')) *)
(* Goal: not (@eq (list tree) (@nil tree) (@cons tree t' ts')) *)
intro HF; inversion HF.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) ts') (not (@eq (list tree) (@cons tree a0 l) ts')) *)
destruct ts' as [| t' ts']; [right | idtac]; trivial.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts')) (not (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts'))) *)
(* Goal: not (@eq (list tree) (@cons tree a0 l) (@nil tree)) *)
intro HF; inversion HF.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts')) (not (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts'))) *)
elim (IHIHt ts'); intro case_ts'.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts')) (not (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts')) (not (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts'))) *)
subst; elim (p t'); intro case_t'; subst; [left | right]; trivial.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts')) (not (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts'))) *)
(* Goal: not (@eq (list tree) (@cons tree a0 ts') (@cons tree t' ts')) *)
intro HF; inversion HF; apply case_t'; trivial.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
(* Goal: sumbool (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts')) (not (@eq (list tree) (@cons tree a0 l) (@cons tree t' ts'))) *)
right; intro HF; inversion HF; apply case_ts'; trivial.
(* Goal: sumbool (@eq tree (node a ts) (node a ts')) (not (@eq tree (node a ts) (node a ts'))) *)
elim H; clear H; intro H; [left; subst | right]; trivial.
(* Goal: not (@eq tree (node a ts) (node a ts')) *)
intro HF; inversion HF; apply H; trivial.
Qed.
End Wrap.
|
Require Import Coq.Lists.List.
Require Import Coq.Lists.SetoidList.
Require Import Metalib.CoqUniquenessTac.
Open Scope list_scope.
Lemma cons_eq_app : forall (A : Type) (z : A) (xs ys zs : list A),
z :: zs = xs ++ ys ->
(exists qs, xs = z :: qs /\ zs = qs ++ ys) \/
(xs = nil /\ ys = z :: zs).
Proof.
(* Goal: forall (A : Type) (z : A) (xs ys zs : list A) (_ : @eq (list A) (@cons A z zs) (@app A xs ys)), or (@ex (list A) (fun qs : list A => and (@eq (list A) xs (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) xs (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
destruct xs; intros ? ? H; simpl in *.
(* Goal: or (@ex (list A) (fun qs : list A => and (@eq (list A) (@cons A a xs) (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) (@cons A a xs) (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
(* Goal: or (@ex (list A) (fun qs : list A => and (@eq (list A) (@nil A) (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) (@nil A) (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
auto.
(* Goal: or (@ex (list A) (fun qs : list A => and (@eq (list A) (@cons A a xs) (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) (@cons A a xs) (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
injection H.
(* Goal: forall (_ : @eq (list A) zs (@app A xs ys)) (_ : @eq A z a), or (@ex (list A) (fun qs : list A => and (@eq (list A) (@cons A a xs) (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) (@cons A a xs) (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
intros.
(* Goal: or (@ex (list A) (fun qs : list A => and (@eq (list A) (@cons A a xs) (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) (@cons A a xs) (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
subst.
(* Goal: or (@ex (list A) (fun qs : list A => and (@eq (list A) (@cons A a xs) (@cons A a qs)) (@eq (list A) (@app A xs ys) (@app A qs ys)))) (and (@eq (list A) (@cons A a xs) (@nil A)) (@eq (list A) ys (@cons A a (@app A xs ys)))) *)
eauto.
Qed.
Lemma app_eq_cons : forall (A : Type) (z : A) (xs ys zs : list A),
xs ++ ys = z :: zs ->
(exists qs, xs = z :: qs /\ zs = qs ++ ys) \/
(xs = nil /\ ys = z :: zs).
Proof.
(* Goal: forall (A : Type) (z : A) (xs ys zs : list A) (_ : @eq (list A) (@app A xs ys) (@cons A z zs)), or (@ex (list A) (fun qs : list A => and (@eq (list A) xs (@cons A z qs)) (@eq (list A) zs (@app A qs ys)))) (and (@eq (list A) xs (@nil A)) (@eq (list A) ys (@cons A z zs))) *)
auto using cons_eq_app.
Qed.
Lemma nil_eq_app : forall (A : Type) (xs ys : list A),
nil = xs ++ ys ->
xs = nil /\ ys = nil.
Proof.
(* Goal: forall (A : Type) (xs ys : list A) (_ : @eq (list A) (@nil A) (@app A xs ys)), and (@eq (list A) xs (@nil A)) (@eq (list A) ys (@nil A)) *)
auto using List.app_eq_nil.
Qed.
Lemma app_cons_not_nil : forall (A : Type) (y : A) (xs ys : list A),
xs ++ y :: ys <> nil.
Proof.
(* Goal: forall (A : Type) (y : A) (xs ys : list A), not (@eq (list A) (@app A xs (@cons A y ys)) (@nil A)) *)
intros ? ? ? ? H.
(* Goal: False *)
symmetry in H.
(* Goal: False *)
revert H.
(* Goal: forall _ : @eq (list A) (@nil A) (@app A xs (@cons A y ys)), False *)
apply List.app_cons_not_nil.
Qed.
Lemma In_map : forall (A B : Type) (xs : list A) (x : A) (f : A -> B),
In x xs ->
In (f x) (map f xs).
Proof.
(* Goal: forall (A B : Type) (xs : list A) (x : A) (f : forall _ : A, B) (_ : @In A x xs), @In B (f x) (@map A B f xs) *)
induction xs; intros ? ? H; simpl in *.
(* Goal: or (@eq B (f a) (f x)) (@In B (f x) (@map A B f xs)) *)
(* Goal: False *)
auto.
(* Goal: or (@eq B (f a) (f x)) (@In B (f x) (@map A B f xs)) *)
destruct H; subst; auto.
Qed.
Lemma not_In_cons : forall (A : Type) (ys : list A) (x y : A),
x <> y ->
~ In x ys ->
~ In x (y :: ys).
Proof.
(* Goal: forall (A : Type) (ys : list A) (x y : A) (_ : not (@eq A x y)) (_ : not (@In A x ys)), not (@In A x (@cons A y ys)) *)
unfold not.
(* Goal: forall (A : Type) (ys : list A) (x y : A) (_ : forall _ : @eq A x y, False) (_ : forall _ : @In A x ys, False) (_ : @In A x (@cons A y ys)), False *)
inversion 3; auto.
Qed.
Lemma not_In_app : forall (A : Type) (xs ys : list A) (x : A),
~ In x xs ->
~ In x ys ->
~ In x (xs ++ ys).
Proof.
(* Goal: forall (A : Type) (xs ys : list A) (x : A) (_ : not (@In A x xs)) (_ : not (@In A x ys)), not (@In A x (@app A xs ys)) *)
intros ? xs ys x ? ? H.
(* Goal: False *)
apply in_app_or in H.
(* Goal: False *)
intuition.
Qed.
Lemma elim_not_In_cons : forall (A : Type) (y : A) (ys : list A) (x : A),
~ In x (y :: ys) ->
x <> y /\ ~ In x ys.
Proof.
(* Goal: forall (A : Type) (y : A) (ys : list A) (x : A) (_ : not (@In A x (@cons A y ys))), and (not (@eq A x y)) (not (@In A x ys)) *)
simpl.
(* Goal: forall (A : Type) (y : A) (ys : list A) (x : A) (_ : not (or (@eq A y x) (@In A x ys))), and (not (@eq A x y)) (not (@In A x ys)) *)
intuition.
Qed.
Lemma elim_not_In_app : forall (A : Type) (xs ys : list A) (x : A),
~ In x (xs ++ ys) ->
~ In x xs /\ ~ In x ys.
Proof.
(* Goal: forall (A : Type) (xs ys : list A) (x : A) (_ : not (@In A x (@app A xs ys))), and (not (@In A x xs)) (not (@In A x ys)) *)
split; auto using in_or_app.
Qed.
Lemma incl_nil : forall (A : Type) (xs : list A),
incl nil xs.
Proof.
(* Goal: forall (A : Type) (xs : list A), @incl A (@nil A) xs *)
unfold incl.
(* Goal: forall (A : Type) (xs : list A) (a : A) (_ : @In A a (@nil A)), @In A a xs *)
inversion 1.
Qed.
Lemma In_incl : forall (A : Type) (x : A) (ys zs : list A),
In x ys ->
incl ys zs ->
In x zs.
Proof.
(* Goal: forall (A : Type) (x : A) (ys zs : list A) (_ : @In A x ys) (_ : @incl A ys zs), @In A x zs *)
unfold incl.
(* Goal: forall (A : Type) (x : A) (ys zs : list A) (_ : @In A x ys) (_ : forall (a : A) (_ : @In A a ys), @In A a zs), @In A x zs *)
auto.
Qed.
Lemma elim_incl_cons : forall (A : Type) (x : A) (xs zs : list A),
incl (x :: xs) zs ->
In x zs /\ incl xs zs.
Proof.
(* Goal: forall (A : Type) (x : A) (xs zs : list A) (_ : @incl A (@cons A x xs) zs), and (@In A x zs) (@incl A xs zs) *)
unfold incl.
(* Goal: forall (A : Type) (x : A) (xs zs : list A) (_ : forall (a : A) (_ : @In A a (@cons A x xs)), @In A a zs), and (@In A x zs) (forall (a : A) (_ : @In A a xs), @In A a zs) *)
auto with datatypes.
Qed.
Lemma elim_incl_app : forall (A : Type) (xs ys zs : list A),
incl (xs ++ ys) zs ->
incl xs zs /\ incl ys zs.
Proof.
(* Goal: forall (A : Type) (xs ys zs : list A) (_ : @incl A (@app A xs ys) zs), and (@incl A xs zs) (@incl A ys zs) *)
unfold incl.
(* Goal: forall (A : Type) (xs ys zs : list A) (_ : forall (a : A) (_ : @In A a (@app A xs ys)), @In A a zs), and (forall (a : A) (_ : @In A a xs), @In A a zs) (forall (a : A) (_ : @In A a ys), @In A a zs) *)
auto with datatypes.
Qed.
Lemma InA_In : forall (A : Type) (x : A) (xs : list A),
InA (@eq _) x xs -> In x xs.
Proof.
(* Goal: forall (A : Type) (x : A) (xs : list A) (_ : @InA A (@eq A) x xs), @In A x xs *)
induction xs; intros H.
(* Goal: @In A x (@cons A a xs) *)
(* Goal: @In A x (@nil A) *)
inversion H.
(* Goal: @In A x (@cons A a xs) *)
inversion H; subst; simpl in *; auto.
Qed.
Lemma InA_iff_In : forall (A : Type) (x : A) (xs : list A),
InA (@eq _) x xs <-> In x xs.
Proof.
(* Goal: forall (A : Type) (x : A) (xs : list A), iff (@InA A (@eq A) x xs) (@In A x xs) *)
split; auto using InA_In.
(* Goal: forall _ : @In A x xs, @InA A (@eq A) x xs *)
apply SetoidList.In_InA.
(* Goal: @Equivalence A (@eq A) *)
apply eq_equivalence.
Qed.
Section DecidableSorting.
Variable A : Type.
Variable leA : relation A.
Hypothesis leA_dec : forall x y, {leA x y} + {~ leA x y}.
Theorem lelistA_dec : forall a xs,
{lelistA leA a xs} + {~ lelistA leA a xs}.
Theorem sort_dec : forall xs,
{sort leA xs} + {~ sort leA xs}.
End DecidableSorting.
Section SortedListEquality.
Variable A : Type.
Variable ltA : relation A.
Hypothesis ltA_trans : forall x y z, ltA x y -> ltA y z -> ltA x z.
Hypothesis ltA_not_eqA : forall x y, ltA x y -> x <> y.
Hypothesis ltA_eqA : forall x y z, ltA x y -> y = z -> ltA x z.
Hypothesis eqA_ltA : forall x y z, x = y -> ltA y z -> ltA x z.
Hint Resolve ltA_trans.
Hint Immediate ltA_eqA eqA_ltA.
Notation Inf := (lelistA ltA).
Notation Sort := (sort ltA).
Lemma eqlist_eq : forall (xs ys : list A),
eqlistA (@eq _) xs ys ->
xs = ys.
Proof.
(* Goal: forall (xs ys : list A) (_ : @eqlistA A (@eq A) xs ys), @eq (list A) xs ys *)
induction xs; destruct ys; inversion 1; f_equal; auto.
Qed.
Lemma Sort_InA_eq : forall xs ys,
Sort xs ->
Sort ys ->
(forall a, InA (@eq _) a xs <-> InA (@eq _) a ys) ->
xs = ys.
Proof.
(* Goal: forall (xs ys : list A) (_ : @Sorted A ltA xs) (_ : @Sorted A ltA ys) (_ : forall a : A, iff (@InA A (@eq A) a xs) (@InA A (@eq A) a ys)), @eq (list A) xs ys *)
intros xs ys ? ? ?.
(* Goal: @eq (list A) xs ys *)
cut (eqlistA (@eq _) xs ys).
(* Goal: @eqlistA A (@eq A) xs ys *)
(* Goal: forall _ : @eqlistA A (@eq A) xs ys, @eq (list A) xs ys *)
auto using eqlist_eq.
(* Goal: @eqlistA A (@eq A) xs ys *)
apply SetoidList.SortA_equivlistA_eqlistA with (ltA := ltA); eauto.
(* Goal: @Proper (forall (_ : A) (_ : A), Prop) (@respectful A (forall _ : A, Prop) (@eq A) (@respectful A Prop (@eq A) iff)) ltA *)
(* Goal: @StrictOrder A ltA *)
(* Goal: @Equivalence A (@eq A) *)
apply eq_equivalence.
(* Goal: @Proper (forall (_ : A) (_ : A), Prop) (@respectful A (forall _ : A, Prop) (@eq A) (@respectful A Prop (@eq A) iff)) ltA *)
(* Goal: @StrictOrder A ltA *)
firstorder.
(* Goal: @Proper (forall (_ : A) (_ : A), Prop) (@respectful A (forall _ : A, Prop) (@eq A) (@respectful A Prop (@eq A) iff)) ltA *)
reduce.
(* Goal: iff (ltA x x0) (ltA y y0) *)
subst.
(* Goal: iff (ltA y y0) (ltA y y0) *)
split; auto.
Qed.
Lemma Sort_In_eq : forall xs ys,
Sort xs ->
Sort ys ->
(forall a, In a xs <-> In a ys) ->
xs = ys.
End SortedListEquality.
Section Uniqueness_Of_SetoidList_Proofs.
Variable A : Type.
Variable R : A -> A -> Prop.
Hypothesis R_unique : forall (x y : A) (p q : R x y), p = q.
Hypothesis list_eq_dec : forall (xs ys : list A), {xs = ys} + {xs <> ys}.
Scheme lelistA_ind' := Induction for lelistA Sort Prop.
Scheme sort_ind' := Induction for sort Sort Prop.
Scheme eqlistA_ind' := Induction for eqlistA Sort Prop.
Theorem lelistA_unique :
forall (x : A) (xs : list A) (p q : lelistA R x xs), p = q.
Proof.
(* Goal: forall (x : A) (xs : list A) (p q : @HdRel A R x xs), @eq (@HdRel A R x xs) p q *)
induction p using lelistA_ind'; uniqueness 1.
Qed.
Theorem sort_unique :
forall (xs : list A) (p q : sort R xs), p = q.
Proof.
(* Goal: forall (xs : list A) (p q : @Sorted A R xs), @eq (@Sorted A R xs) p q *)
induction p using sort_ind'; uniqueness 1.
(* Goal: @eq (@HdRel A R a0 l0) h h0 *)
apply lelistA_unique.
Qed.
Theorem eqlistA_unique :
forall (xs ys : list A) (p q : eqlistA R xs ys), p = q.
Proof.
(* Goal: forall (xs ys : list A) (p q : @eqlistA A R xs ys), @eq (@eqlistA A R xs ys) p q *)
induction p using eqlistA_ind'; uniqueness 2.
Qed.
End Uniqueness_Of_SetoidList_Proofs.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat seq path div.
From mathcomp
Require Import fintype tuple finfun bigop prime finset.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Lemma fact_smonotone m n : 0 < m -> m < n -> m`! < n`!.
Proof.
(* Goal: forall (_ : is_true (leq (S O) m)) (_ : is_true (leq (S m) n)), is_true (leq (S (factorial m)) (factorial n)) *)
case: m => // m _; elim: n m => // n IHn [|m] lt_m_n.
(* Goal: is_true (leq (S (factorial (S (S m)))) (factorial (S n))) *)
(* Goal: is_true (leq (S (factorial (S O))) (factorial (S n))) *)
by rewrite -[_.+1]muln1 leq_mul ?fact_gt0.
(* Goal: is_true (leq (S (factorial (S (S m)))) (factorial (S n))) *)
by rewrite ltn_mul ?IHn.
Qed.
Lemma fact_prod n : n`! = \prod_(1 <= i < n.+1) i.
Proof.
(* Goal: @eq nat (factorial n) (@BigOp.bigop nat nat (S O) (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i muln true i)) *)
elim: n => [|n IHn] //; first by rewrite big_nil.
(* Goal: @eq nat (factorial (S n)) (@BigOp.bigop nat nat (S O) (index_iota (S O) (S (S n))) (fun i : nat => @BigBody nat nat i muln true i)) *)
by apply sym_equal; rewrite factS IHn // !big_add1 big_nat_recr //= mulnC.
Qed.
Lemma logn_fact p n : prime p -> logn p n`! = \sum_(1 <= k < n.+1) n %/ p ^ k.
Proof.
(* Goal: forall _ : is_true (prime p), @eq nat (logn p (factorial n)) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
move=> p_prime; transitivity (\sum_(1 <= i < n.+1) logn p i).
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (logn p i))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
(* Goal: @eq nat (logn p (factorial n)) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (logn p i))) *)
rewrite big_add1; elim: n => /= [|n IHn]; first by rewrite logn1 big_geq.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (logn p i))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
(* Goal: @eq nat (logn p (factorial (S n))) (@BigOp.bigop nat nat O (index_iota O (S n)) (fun i : nat => @BigBody nat nat i addn true (logn p (S i)))) *)
by rewrite big_nat_recr // -IHn /= factS mulnC lognM ?fact_gt0.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (logn p i))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
transitivity (\sum_(1 <= i < n.+1) \sum_(1 <= k < n.+1) (p ^ k %| i)).
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (logn p i))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))))) *)
apply: eq_big_nat => i /andP[i_gt0 le_i_n]; rewrite logn_count_dvd //.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) i) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))) *)
rewrite -!big_mkcond (big_nat_widen _ _ n.+1) 1?ltnW //; apply: eq_bigl => k.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
(* Goal: @eq bool (andb (dvdn (expn p k) i) (leq (S k) i)) (dvdn (expn p k) i) *)
by apply: andb_idr => /dvdn_leq/(leq_trans (ltn_expl _ (prime_gt1 _)))->.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun i : nat => @BigBody nat nat i addn true (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (nat_of_bool (dvdn (expn p k) i)))))) (@BigOp.bigop nat nat O (index_iota (S O) (S n)) (fun k : nat => @BigBody nat nat k addn true (divn n (expn p k)))) *)
by rewrite exchange_big_nat; apply: eq_bigr => i _; rewrite divn_count_dvd.
Qed.
Theorem Wilson p : p > 1 -> prime p = (p %| ((p.-1)`!).+1).
Proof.
have dFact n: 0 < n -> (n.-1)`! = \prod_(0 <= i < n | i != 0) i.
move=> n_gt0; rewrite -big_filter fact_prod; symmetry; apply: congr_big => //.
rewrite /index_iota subn1 -[n]prednK //=; apply/all_filterP.
by rewrite all_predC has_pred1 mem_iota.
move=> lt1p; have p_gt0 := ltnW lt1p.
apply/idP/idP=> [pr_p | dv_pF]; last first.
apply/primeP; split=> // d dv_dp; have: d <= p by apply: dvdn_leq.
rewrite orbC leq_eqVlt => /orP[-> // | ltdp].
have:= dvdn_trans dv_dp dv_pF; rewrite dFact // big_mkord.
rewrite (bigD1 (Ordinal ltdp)) /=; last by rewrite -lt0n (dvdn_gt0 p_gt0).
by rewrite orbC -addn1 dvdn_addr ?dvdn_mulr // dvdn1 => ->.
pose Fp1 := Ordinal lt1p; pose Fp0 := Ordinal p_gt0.
have ltp1p: p.-1 < p by [rewrite prednK]; pose Fpn1 := Ordinal ltp1p.
case eqF1n1: (Fp1 == Fpn1); first by rewrite -{1}[p]prednK -1?((1 =P p.-1) _).
have toFpP m: m %% p < p by rewrite ltn_mod.
pose toFp := Ordinal (toFpP _); pose mFp (i j : 'I_p) := toFp (i * j).
have Fp_mod (i : 'I_p) : i %% p = i by apply: modn_small.
have mFpA: associative mFp.
by move=> i j k; apply: val_inj; rewrite /= modnMml modnMmr mulnA.
have mFpC: commutative mFp by move=> i j; apply: val_inj; rewrite /= mulnC.
have mFp1: left_id Fp1 mFp by move=> i; apply: val_inj; rewrite /= mul1n.
have mFp1r: right_id Fp1 mFp by move=> i; apply: val_inj; rewrite /= muln1.
pose mFpLaw := Monoid.Law mFpA mFp1 mFp1r.
pose mFpM := Monoid.operator (@Monoid.ComLaw _ _ mFpLaw mFpC).
pose vFp (i : 'I_p) := toFp (egcdn i p).1.
have vFpV i: i != Fp0 -> mFp (vFp i) i = Fp1.
rewrite -val_eqE /= -lt0n => i_gt0; apply: val_inj => /=.
rewrite modnMml; case: egcdnP => //= _ km -> _; rewrite {km}modnMDl.
suffices: coprime i p by move/eqnP->; rewrite modn_small.
rewrite coprime_sym prime_coprime //; apply/negP=> /(dvdn_leq i_gt0).
by rewrite leqNgt ltn_ord.
have vFp0 i: i != Fp0 -> vFp i != Fp0.
move/vFpV=> inv_i; apply/eqP=> vFp0.
by have:= congr1 val inv_i; rewrite vFp0 /= mod0n.
have vFpK: {in predC1 Fp0, involutive vFp}.
move=> i n0i; rewrite /= -[vFp _]mFp1r -(vFpV _ n0i) mFpA.
by rewrite vFpV (vFp0, mFp1).
have le_pmFp (i : 'I_p) m: i <= p + m.
by apply: leq_trans (ltnW _) (leq_addr _ _).
have eqFp (i j : 'I_p): (i == j) = (p %| p + i - j).
by rewrite -eqn_mod_dvd ?(modnDl, Fp_mod).
have vFpId i: (vFp i == i :> nat) = xpred2 Fp1 Fpn1 i.
symmetry; have [->{i} | /eqP ni0] := i =P Fp0.
by rewrite /= -!val_eqE /= -{2}[p]prednK //= modn_small //= -(subnKC lt1p).
rewrite 2!eqFp -Euclid_dvdM //= -[_ - p.-1]subSS prednK //.
have lt0i: 0 < i by rewrite lt0n.
rewrite -addnS addKn -addnBA // mulnDl -{2}(addn1 i) -subn_sqr.
rewrite addnBA ?leq_sqr // mulnS -addnA -mulnn -mulnDl.
rewrite -(subnK (le_pmFp (vFp i) i)) mulnDl addnCA.
rewrite -[1 ^ 2]/(Fp1 : nat) -addnBA // dvdn_addl.
by rewrite Euclid_dvdM // -eqFp eq_sym orbC /dvdn Fp_mod eqn0Ngt lt0i.
by rewrite -eqn_mod_dvd // Fp_mod modnDl -(vFpV _ ni0) eqxx.
suffices [mod_fact]: toFp (p.-1)`! = Fpn1.
by rewrite /dvdn -addn1 -modnDml mod_fact addn1 prednK // modnn.
rewrite dFact //; rewrite ((big_morph toFp) Fp1 mFpM) //; first last.
Fixpoint ffact_rec n m := if m is m'.+1 then n * ffact_rec n.-1 m' else 1.
Definition falling_factorial := nosimpl ffact_rec.
Notation "n ^_ m" := (falling_factorial n m)
(at level 30, right associativity) : nat_scope.
Lemma ffactE : falling_factorial = ffact_rec. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : nat) (_ : nat), nat) falling_factorial ffact_rec *)
by [].
Qed.
Lemma ffact0n m : 0 ^_ m = (m == 0). Proof. by case: m. Qed.
Proof.
(* Goal: @eq nat (falling_factorial O m) (nat_of_bool (@eq_op nat_eqType m O)) *)
by case: m.
Qed.
Lemma ffactSS n m : n.+1 ^_ m.+1 = n.+1 * n ^_ m. Proof. by []. Qed.
Proof.
(* Goal: @eq nat (falling_factorial (S n) (S m)) (muln (S n) (falling_factorial n m)) *)
by [].
Qed.
Lemma ffactnSr n m : n ^_ m.+1 = n ^_ m * (n - m).
Proof.
(* Goal: @eq nat (falling_factorial n (S m)) (muln (falling_factorial n m) (subn n m)) *)
elim: n m => [|n IHn] [|m] //=; first by rewrite ffactn1 mul1n.
(* Goal: @eq nat (falling_factorial (S n) (S (S m))) (muln (falling_factorial (S n) (S m)) (subn (S n) (S m))) *)
by rewrite !ffactSS IHn mulnA.
Qed.
Lemma ffact_gt0 n m : (0 < n ^_ m) = (m <= n).
Proof.
(* Goal: @eq bool (leq (S O) (falling_factorial n m)) (leq m n) *)
by elim: n m => [|n IHn] [|m] //=; rewrite ffactSS muln_gt0 IHn.
Qed.
Lemma ffact_small n m : n < m -> n ^_ m = 0.
Proof.
(* Goal: forall _ : is_true (leq (S n) m), @eq nat (falling_factorial n m) O *)
by rewrite ltnNge -ffact_gt0; case: posnP.
Qed.
Lemma ffactnn n : n ^_ n = n`!.
Proof.
(* Goal: @eq nat (falling_factorial n n) (factorial n) *)
by elim: n => [|n IHn] //; rewrite ffactnS IHn.
Qed.
Lemma ffact_fact n m : m <= n -> n ^_ m * (n - m)`! = n`!.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (muln (falling_factorial n m) (factorial (subn n m))) (factorial n) *)
by elim: n m => [|n IHn] [|m] //= le_m_n; rewrite ?mul1n // -mulnA IHn.
Qed.
Lemma ffact_factd n m : m <= n -> n ^_ m = n`! %/ (n - m)`!.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (falling_factorial n m) (divn (factorial n) (factorial (subn n m))) *)
by move/ffact_fact <-; rewrite mulnK ?fact_gt0.
Qed.
Fixpoint binomial_rec n m :=
match n, m with
| n'.+1, m'.+1 => binomial_rec n' m + binomial_rec n' m'
| _, 0 => 1
| 0, _.+1 => 0
end.
Definition binomial := nosimpl binomial_rec.
Notation "''C' ( n , m )" := (binomial n m)
(at level 8, format "''C' ( n , m )") : nat_scope.
Lemma binE : binomial = binomial_rec. Proof. by []. Qed.
Proof.
(* Goal: @eq (forall (_ : nat) (_ : nat), nat) binomial binomial_rec *)
by [].
Qed.
Lemma bin0n m : 'C(0, m) = (m == 0). Proof. by case: m. Qed.
Proof.
(* Goal: @eq nat (binomial O m) (nat_of_bool (@eq_op nat_eqType m O)) *)
by case: m.
Qed.
Lemma bin1 n : 'C(n, 1) = n.
Proof.
(* Goal: @eq nat (binomial n (S O)) n *)
by elim: n => //= n IHn; rewrite binS bin0 IHn addn1.
Qed.
Lemma bin_gt0 n m : (0 < 'C(n, m)) = (m <= n).
Proof.
(* Goal: @eq bool (leq (S O) (binomial n m)) (leq m n) *)
by elim: n m => [|n IHn] [|m] //; rewrite addn_gt0 !IHn orbC ltn_neqAle andKb.
Qed.
Lemma leq_bin2l n1 n2 m : n1 <= n2 -> 'C(n1, m) <= 'C(n2, m).
Proof.
(* Goal: forall _ : is_true (leq n1 n2), is_true (leq (binomial n1 m) (binomial n2 m)) *)
by elim: n1 n2 m => [|n1 IHn] [|n2] [|n] le_n12 //; rewrite leq_add ?IHn.
Qed.
Lemma bin_small n m : n < m -> 'C(n, m) = 0.
Proof.
(* Goal: forall _ : is_true (leq (S n) m), @eq nat (binomial n m) O *)
by rewrite ltnNge -bin_gt0; case: posnP.
Qed.
Lemma binn n : 'C(n, n) = 1.
Proof.
(* Goal: @eq nat (binomial n n) (S O) *)
by elim: n => [|n IHn] //; rewrite binS bin_small.
Qed.
Lemma mul_bin_diag n m : n * 'C(n.-1, m) = m.+1 * 'C(n, m.+1).
Proof.
(* Goal: @eq nat (muln n (binomial (Nat.pred n) m)) (muln (S m) (binomial n (S m))) *)
rewrite [RHS]mulnC; elim: n m => [|[|n] IHn] [|m] //=; first by rewrite bin1.
(* Goal: @eq nat (muln (S (S n)) (binomial (S n) (S m))) (muln (binomial (S (S n)) (S (S m))) (S (S m))) *)
by rewrite mulSn [in _ * _]binS mulnDr addnCA !IHn -mulnS -mulnDl -binS.
Qed.
Lemma bin_fact n m : m <= n -> 'C(n, m) * (m`! * (n - m)`!) = n`!.
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (muln (binomial n m) (muln (factorial m) (factorial (subn n m)))) (factorial n) *)
elim: n m => [|n IHn] [|m] // le_m_n; first by rewrite bin0 !mul1n.
(* Goal: @eq nat (muln (binomial (S n) (S m)) (muln (factorial (S m)) (factorial (subn (S n) (S m))))) (factorial (S n)) *)
by rewrite !factS -!mulnA mulnCA mulnA -mul_bin_diag -mulnA IHn.
Qed.
Lemma bin_factd n m : 0 < n -> 'C(n, m) = n`! %/ (m`! * (n - m)`!).
Proof.
(* Goal: forall _ : is_true (leq (S O) n), @eq nat (binomial n m) (divn (factorial n) (muln (factorial m) (factorial (subn n m)))) *)
have [/bin_fact<-|*] := leqP m n; first by rewrite mulnK ?muln_gt0 ?fact_gt0.
(* Goal: @eq nat (binomial n m) (divn (factorial n) (muln (factorial m) (factorial (subn n m)))) *)
by rewrite divnMA bin_small ?divn_small ?fact_gt0 ?fact_smonotone.
Qed.
Lemma bin_ffact n m : 'C(n, m) * m`! = n ^_ m.
Proof.
(* Goal: @eq nat (muln (binomial n m) (factorial m)) (falling_factorial n m) *)
have [lt_n_m | le_m_n] := ltnP n m; first by rewrite bin_small ?ffact_small.
(* Goal: @eq nat (muln (binomial n m) (factorial m)) (falling_factorial n m) *)
by rewrite ffact_factd // -(bin_fact le_m_n) mulnA mulnK ?fact_gt0.
Qed.
Lemma bin_ffactd n m : 'C(n, m) = n ^_ m %/ m`!.
Proof.
(* Goal: @eq nat (binomial n m) (divn (falling_factorial n m) (factorial m)) *)
by rewrite -bin_ffact mulnK ?fact_gt0.
Qed.
Lemma bin_sub n m : m <= n -> 'C(n, n - m) = 'C(n, m).
Proof.
(* Goal: forall _ : is_true (leq m n), @eq nat (binomial n (subn n m)) (binomial n m) *)
by move=> le_m_n; rewrite !bin_ffactd !ffact_factd ?leq_subr // divnAC subKn.
Qed.
Lemma mul_bin_down n m : n * 'C(n.-1, m) = (n - m) * 'C(n, m).
Proof.
(* Goal: @eq nat (muln n (binomial (Nat.pred n) m)) (muln (subn n m) (binomial n m)) *)
case: n => //= n; have [lt_n_m | le_m_n] := ltnP n m.
(* Goal: @eq nat (muln (S n) (binomial n m)) (muln (subn (S n) m) (binomial (S n) m)) *)
(* Goal: @eq nat (muln (S n) (binomial n m)) (muln (subn (S n) m) (binomial (S n) m)) *)
by rewrite (eqnP lt_n_m) mulnC bin_small.
(* Goal: @eq nat (muln (S n) (binomial n m)) (muln (subn (S n) m) (binomial (S n) m)) *)
by rewrite -!['C(_, m)]bin_sub ?leqW ?subSn ?mul_bin_diag.
Qed.
Lemma mul_bin_left n m : m.+1 * 'C(n, m.+1) = (n - m) * 'C(n, m).
Proof.
(* Goal: @eq nat (muln (S m) (binomial n (S m))) (muln (subn n m) (binomial n m)) *)
by rewrite -mul_bin_diag mul_bin_down.
Qed.
Lemma binSn n : 'C(n.+1, n) = n.+1.
Proof.
(* Goal: @eq nat (binomial (S n) n) (S n) *)
by rewrite -bin_sub ?leqnSn // subSnn bin1.
Qed.
Lemma bin2 n : 'C(n, 2) = (n * n.-1)./2.
Proof.
(* Goal: @eq nat (binomial n (S (S O))) (half (muln n (Nat.pred n))) *)
by rewrite -[n.-1]bin1 mul_bin_diag -divn2 mulKn.
Qed.
Lemma bin2odd n : odd n -> 'C(n, 2) = n * n.-1./2.
Proof.
(* Goal: forall _ : is_true (odd n), @eq nat (binomial n (S (S O))) (muln n (half (Nat.pred n))) *)
by case: n => // n oddn; rewrite bin2 -!divn2 muln_divA ?dvdn2.
Qed.
Lemma prime_dvd_bin k p : prime p -> 0 < k < p -> p %| 'C(p, k).
Proof.
(* Goal: forall (_ : is_true (prime p)) (_ : is_true (andb (leq (S O) k) (leq (S k) p))), is_true (dvdn p (binomial p k)) *)
move=> p_pr /andP[k_gt0 lt_k_p].
(* Goal: is_true (dvdn p (binomial p k)) *)
suffices /Gauss_dvdr<-: coprime p (p - k) by rewrite -mul_bin_down dvdn_mulr.
(* Goal: is_true (coprime p (subn p k)) *)
by rewrite prime_coprime // dvdn_subr 1?ltnW // gtnNdvd.
Qed.
Lemma triangular_sum n : \sum_(0 <= i < n) i = 'C(n, 2).
Proof.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota O n) (fun i : nat => @BigBody nat nat i addn true i)) (binomial n (S (S O))) *)
elim: n => [|n IHn]; first by rewrite big_geq.
(* Goal: @eq nat (@BigOp.bigop nat nat O (index_iota O (S n)) (fun i : nat => @BigBody nat nat i addn true i)) (binomial (S n) (S (S O))) *)
by rewrite big_nat_recr // IHn binS bin1.
Qed.
Lemma textbook_triangular_sum n : \sum_(0 <= i < n) i = 'C(n, 2).
Theorem Pascal a b n :
(a + b) ^ n = \sum_(i < n.+1) 'C(n, i) * (a ^ (n - i) * b ^ i).
Definition expnDn := Pascal.
Lemma Vandermonde k l i :
\sum_(j < i.+1) 'C(k, j) * 'C(l, i - j) = 'C(k + l , i).
Lemma subn_exp m n k :
m ^ k - n ^ k = (m - n) * (\sum_(i < k) m ^ (k.-1 -i) * n ^ i).
Lemma predn_exp m k : (m ^ k).-1 = m.-1 * (\sum_(i < k) m ^ i).
Lemma dvdn_pred_predX n e : (n.-1 %| (n ^ e).-1)%N.
Proof.
(* Goal: is_true (dvdn (Nat.pred n) (Nat.pred (expn n e))) *)
by rewrite predn_exp dvdn_mulr.
Qed.
Lemma modn_summ I r (P : pred I) F d :
\sum_(i <- r | P i) F i %% d = \sum_(i <- r | P i) F i %[mod d].
Proof.
(* Goal: @eq nat (modn (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i addn (P i) (modn (F i) d))) d) (modn (@BigOp.bigop nat I O r (fun i : I => @BigBody nat I i addn (P i) (F i))) d) *)
by apply/eqP; elim/big_rec2: _ => // i m n _; rewrite modnDml eqn_modDl.
Qed.
Section Combinations.
Implicit Types T D : finType.
Lemma card_uniq_tuples T n (A : pred T) :
#|[set t : n.-tuple T | all A t & uniq t]| = #|A| ^_ n.
Lemma card_inj_ffuns_on D T (R : pred T) :
#|[set f : {ffun D -> T} in ffun_on R | injectiveb f]| = #|R| ^_ #|D|.
Lemma card_inj_ffuns D T :
#|[set f : {ffun D -> T} | injectiveb f]| = #|T| ^_ #|D|.
Proof.
(* Goal: @eq nat (@card (finfun_of_finType D T) (@mem (Finite.sort (finfun_of_finType D T)) (predPredType (Finite.sort (finfun_of_finType D T))) (@SetDef.pred_of_set (finfun_of_finType D T) (@SetDef.finset (finfun_of_finType D T) (fun f : @finfun_of D (Finite.sort T) (Phant (forall _ : Finite.sort D, Finite.sort T)) => @injectiveb D (Finite.eqType T) (@FunFinfun.fun_of_fin D (Finite.sort T) f)))))) (falling_factorial (@card T (@mem (Equality.sort (Finite.eqType T)) (predPredType (Equality.sort (Finite.eqType T))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType T)) (pred_of_argType (Equality.sort (Finite.eqType T)))))) (@card D (@mem (Equality.sort (Finite.eqType D)) (predPredType (Equality.sort (Finite.eqType D))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType D)) (pred_of_argType (Equality.sort (Finite.eqType D))))))) *)
rewrite -card_inj_ffuns_on; apply: eq_card => f.
(* Goal: @eq bool (@in_mem (Finite.sort (finfun_of_finType D T)) f (@mem (Finite.sort (finfun_of_finType D T)) (predPredType (Finite.sort (finfun_of_finType D T))) (@SetDef.pred_of_set (finfun_of_finType D T) (@SetDef.finset (finfun_of_finType D T) (fun f : @finfun_of D (Finite.sort T) (Phant (forall _ : Finite.sort D, Finite.sort T)) => @injectiveb D (Finite.eqType T) (@FunFinfun.fun_of_fin D (Finite.sort T) f)))))) (@in_mem (Finite.sort (finfun_of_finType D T)) f (@mem (Finite.sort (finfun_of_finType D T)) (predPredType (Finite.sort (finfun_of_finType D T))) (@SetDef.pred_of_set (finfun_of_finType D T) (@SetDef.finset (finfun_of_finType D T) (fun f : @finfun_of D (Finite.sort T) (Phant (forall _ : Finite.sort D, Finite.sort T)) => andb (@in_mem (@finfun_of D (Finite.sort T) (Phant (forall _ : Finite.sort D, Finite.sort T))) f (@mem (@finfun_of D (Finite.sort T) (Phant (forall _ : Finite.sort D, Finite.sort T))) (simplPredType (@finfun_of D (Finite.sort T) (Phant (forall _ : Finite.sort D, Finite.sort T)))) (@ffun_on_mem D (Finite.sort T) (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@sort_of_simpl_pred (Equality.sort (Finite.eqType T)) (pred_of_argType (Equality.sort (Finite.eqType T)))))))) (@injectiveb D (Finite.eqType T) (@FunFinfun.fun_of_fin D (Finite.sort T) f))))))) *)
by rewrite 2!inE; case: ffun_onP.
Qed.
Lemma cards_draws T (B : {set T}) k :
#|[set A : {set T} | A \subset B & #|A| == k]| = 'C(#|B|, k).
Lemma card_draws T k : #|[set A : {set T} | #|A| == k]| = 'C(#|T|, k).
Proof.
(* Goal: @eq nat (@card (set_of_finType T) (@mem (Finite.sort (set_of_finType T)) (predPredType (Finite.sort (set_of_finType T))) (@SetDef.pred_of_set (set_of_finType T) (@SetDef.finset (set_of_finType T) (fun A : @set_of T (Phant (Finite.sort T)) => @eq_op nat_eqType (@card T (@mem (Finite.sort T) (predPredType (Finite.sort T)) (@SetDef.pred_of_set T A))) k))))) (binomial (@card T (@mem (Equality.sort (Finite.eqType T)) (predPredType (Equality.sort (Finite.eqType T))) (@sort_of_simpl_pred (Equality.sort (Finite.eqType T)) (pred_of_argType (Equality.sort (Finite.eqType T)))))) k) *)
by rewrite -cardsT -cards_draws; apply: eq_card => A; rewrite !inE subsetT.
Qed.
Lemma card_ltn_sorted_tuples m n :
#|[set t : m.-tuple 'I_n | sorted ltn (map val t)]| = 'C(n, m).
Lemma card_sorted_tuples m n :
#|[set t : m.-tuple 'I_n.+1 | sorted leq (map val t)]| = 'C(m + n, m).
Lemma card_partial_ord_partitions m n :
#|[set t : m.-tuple 'I_n.+1 | \sum_(i <- t) i <= n]| = 'C(m + n, m).
Proof.
(* Goal: @eq nat (@card (tuple_finType m (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType m (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType m (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType m (ordinal_finType (S n))) (@SetDef.finset (tuple_finType m (ordinal_finType (S n))) (fun t : tuple_of m (ordinal (S n)) => leq (@BigOp.bigop nat (ordinal (S n)) O (@tval m (ordinal (S n)) t) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i))) n))))) (binomial (addn m n) m) *)
symmetry; set In1 := 'I_n.+1; pose x0 : In1 := ord0.
(* Goal: @eq nat (binomial (addn m n) m) (@card (tuple_finType m (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType m (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType m (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType m (ordinal_finType (S n))) (@SetDef.finset (tuple_finType m (ordinal_finType (S n))) (fun t : tuple_of m In1 => leq (@BigOp.bigop nat In1 O (@tval m In1 t) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n))))) *)
pose add_mn (i j : In1) : In1 := inord (i + j).
(* Goal: @eq nat (binomial (addn m n) m) (@card (tuple_finType m (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType m (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType m (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType m (ordinal_finType (S n))) (@SetDef.finset (tuple_finType m (ordinal_finType (S n))) (fun t : tuple_of m In1 => leq (@BigOp.bigop nat In1 O (@tval m In1 t) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n))))) *)
pose f_add (t : m.-tuple In1) := [tuple of scanl add_mn x0 t].
(* Goal: @eq nat (binomial (addn m n) m) (@card (tuple_finType m (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType m (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType m (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType m (ordinal_finType (S n))) (@SetDef.finset (tuple_finType m (ordinal_finType (S n))) (fun t : tuple_of m In1 => leq (@BigOp.bigop nat In1 O (@tval m In1 t) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n))))) *)
rewrite -card_sorted_tuples -!sum1dep_card (reindex f_add) /=.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq nat (@BigOp.bigop nat (tuple_of m (ordinal (S n))) O (index_enum (tuple_finType m (ordinal_finType (S n)))) (fun j : tuple_of m (ordinal (S n)) => @BigBody nat (tuple_of m (ordinal (S n))) j addn (@sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@scanl In1 In1 add_mn x0 (@tval m In1 j)))) (S O))) (@BigOp.bigop nat (tuple_of m (ordinal (S n))) O (index_enum (tuple_finType m (ordinal_finType (S n)))) (fun x : tuple_of m (ordinal (S n)) => @BigBody nat (tuple_of m (ordinal (S n))) x addn (leq (@BigOp.bigop nat In1 O (@tval m In1 x) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n) (S O))) *)
apply: eq_bigl => t; rewrite -[\sum_(i <- t) i]add0n.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool (@sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@scanl In1 In1 add_mn x0 (@tval m In1 t)))) (leq (addn O (@BigOp.bigop nat (ordinal (S n)) O (@tval m (ordinal (S n)) t) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n) *)
transitivity (path leq x0 (map val (f_add t))) => /=; first by case: map.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool (@path nat leq O (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@scanl In1 In1 add_mn x0 (@tval m In1 t)))) (leq (addn O (@BigOp.bigop nat (ordinal (S n)) O (@tval m (ordinal (S n)) t) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n) *)
rewrite -{1 2}[0]/(val x0); elim: {t}(val t) (x0) => /= [|x t IHt] s.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool (andb (leq (@nat_of_ord (S n) s) (@nat_of_ord (S n) (add_mn s x))) (@path nat leq (@nat_of_ord (S n) (add_mn s x)) (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@scanl In1 In1 add_mn (add_mn s x) t)))) (leq (addn (@nat_of_ord (S n) s) (@BigOp.bigop nat (ordinal (S n)) O (@cons (ordinal (S n)) x t) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n) *)
(* Goal: @eq bool true (leq (addn (@nat_of_ord (S n) s) (@BigOp.bigop nat (ordinal (S n)) O (@nil (ordinal (S n))) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n) *)
by rewrite big_nil addn0 -ltnS ltn_ord.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool (andb (leq (@nat_of_ord (S n) s) (@nat_of_ord (S n) (add_mn s x))) (@path nat leq (@nat_of_ord (S n) (add_mn s x)) (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@scanl In1 In1 add_mn (add_mn s x) t)))) (leq (addn (@nat_of_ord (S n) s) (@BigOp.bigop nat (ordinal (S n)) O (@cons (ordinal (S n)) x t) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n) *)
rewrite big_cons addnA IHt /= val_insubd ltnS.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool (andb (leq (@nat_of_ord (S n) s) (if leq (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x)) n then addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x) else @val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n))) (leq (addn (if leq (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x)) n then addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x) else @val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n)) (@BigOp.bigop nat (ordinal (S n)) O t (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n)) (leq (addn (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x)) (@BigOp.bigop nat (ordinal (S n)) O t (fun j : ordinal (S n) => @BigBody nat (ordinal (S n)) j addn true (@nat_of_ord (S n) j)))) n) *)
have [_ | ltn_n_sx] := leqP (s + x) n; first by rewrite leq_addr.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool (andb (leq (@nat_of_ord (S n) s) (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n))) (leq (addn (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n)) (@BigOp.bigop nat (ordinal (S n)) O t (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i)))) n)) (leq (addn (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x)) (@BigOp.bigop nat (ordinal (S n)) O t (fun j : ordinal (S n) => @BigBody nat (ordinal (S n)) j addn true (@nat_of_ord (S n) j)))) n) *)
rewrite -(leq_add2r x) leqNgt (leq_trans (valP x)) //=.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
(* Goal: @eq bool false (leq (addn (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x)) (@BigOp.bigop nat (ordinal (S n)) O t (fun j : ordinal (S n) => @BigBody nat (ordinal (S n)) j addn true (@nat_of_ord (S n) j)))) n) *)
by rewrite leqNgt (leq_trans ltn_n_sx) ?leq_addr.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
pose sub_mn (i j : In1) := Ordinal (leq_ltn_trans (leq_subr i j) (valP j)).
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of m (ordinal (S n))) (@mem (tuple_of m (ordinal (S n))) (simplPredType (tuple_of m (ordinal (S n)))) (@SimplPred (tuple_of m (ordinal (S n))) (fun i : tuple_of m (ordinal (S n)) => @sorted nat_eqType leq (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@tval m (ordinal (S n)) i))))) f_add *)
exists (fun t : m.-tuple In1 => [tuple of pairmap sub_mn x0 t]) => /= t inc_t.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: @eq (tuple_of m (ordinal (S n))) (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 (f_add t)) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@scanl In1 In1 add_mn x0 (@tval m In1 t)))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@scanl In1 In1 add_mn x0 (@tval m In1 t))) sP)) t *)
apply: val_inj => /=; have{inc_t}: path leq x0 (map val (f_add t)).
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: forall _ : is_true (@path nat leq (@nat_of_ord (S n) x0) (@map (@sub_sort nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) nat (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) (@tval m In1 (f_add t)))), @eq (list (ordinal (S n))) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@scanl In1 In1 add_mn x0 (@tval m In1 t))) (@tval m (ordinal (S n)) t) *)
(* Goal: is_true (@path nat leq (@nat_of_ord (S n) x0) (@map (@sub_sort nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) nat (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) (@tval m In1 (f_add t)))) *)
by move: inc_t; rewrite inE /=; case: map.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: forall _ : is_true (@path nat leq (@nat_of_ord (S n) x0) (@map (@sub_sort nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) nat (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) (@tval m In1 (f_add t)))), @eq (list (ordinal (S n))) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@scanl In1 In1 add_mn x0 (@tval m In1 t))) (@tval m (ordinal (S n)) t) *)
rewrite [map _ _]/=; elim: {t}(val t) (x0) => //= x t IHt s.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: forall _ : is_true (andb (leq (@nat_of_ord (S n) s) (@nat_of_ord (S n) (add_mn s x))) (@path nat leq (@nat_of_ord (S n) (add_mn s x)) (@map (ordinal (S n)) nat (@nat_of_ord (S n)) (@scanl In1 In1 add_mn (add_mn s x) t)))), @eq (list (ordinal (S n))) (@cons (ordinal (S n)) (sub_mn s (add_mn s x)) (@pairmap In1 (ordinal (S n)) sub_mn (add_mn s x) (@scanl In1 In1 add_mn (add_mn s x) t))) (@cons (ordinal (S n)) x t) *)
case/andP=> le_s_sx /IHt->; congr (_ :: _); apply: val_inj => /=.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: @eq nat (subn (@nat_of_ord (S n) (add_mn s x)) (@nat_of_ord (S n) s)) (@nat_of_ord (S n) x) *)
move: le_s_sx; rewrite val_insubd.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: forall _ : is_true (leq (@nat_of_ord (S n) s) (if leq (S (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x))) (S n) then addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x) else @val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n))), @eq nat (subn (if leq (S (addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x))) (S n) then addn (@nat_of_ord (S n) s) (@nat_of_ord (S n) x) else @val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n)) (@nat_of_ord (S n) s)) (@nat_of_ord (S n) x) *)
case le_sx_n: (_ < n.+1); first by rewrite addKn.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
(* Goal: forall _ : is_true (leq (@nat_of_ord (S n) s) (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n))), @eq nat (subn (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n)) (@ord0 n)) (@nat_of_ord (S n) s)) (@nat_of_ord (S n) x) *)
by case: (val s) le_sx_n; rewrite ?ltn_ord.
(* Goal: @eq (tuple_of m (ordinal (S n))) (f_add (@tuple m (ordinal (S n)) (@pairmap_tuple m In1 (ordinal (S n)) sub_mn x0 t) (fun sP : is_true (@eq_op nat_eqType (@size (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) m) => @Tuple m (ordinal (S n)) (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t)) sP))) t *)
apply: val_inj => /=; have{inc_t}: path leq x0 (map val t).
(* Goal: forall _ : is_true (@path nat leq (@nat_of_ord (S n) x0) (@map (@sub_sort nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) nat (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) (@tval m (ordinal (S n)) t))), @eq (list (ordinal (S n))) (@scanl In1 In1 add_mn x0 (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) (@tval m (ordinal (S n)) t) *)
(* Goal: is_true (@path nat leq (@nat_of_ord (S n) x0) (@map (@sub_sort nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) nat (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) (@tval m (ordinal (S n)) t))) *)
by move: inc_t; rewrite inE /=; case: map.
(* Goal: forall _ : is_true (@path nat leq (@nat_of_ord (S n) x0) (@map (@sub_sort nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) nat (@val nat (fun x : nat => leq (S x) (S n)) (ordinal_subType (S n))) (@tval m (ordinal (S n)) t))), @eq (list (ordinal (S n))) (@scanl In1 In1 add_mn x0 (@pairmap In1 (ordinal (S n)) sub_mn x0 (@tval m In1 t))) (@tval m (ordinal (S n)) t) *)
elim: {t}(val t) (x0) => //= x t IHt s /andP[le_s_sx inc_t].
(* Goal: @eq (list (ordinal (S n))) (@cons In1 (add_mn s (sub_mn s x)) (@scanl In1 In1 add_mn (add_mn s (sub_mn s x)) (@pairmap In1 (ordinal (S n)) sub_mn x t))) (@cons (ordinal (S n)) x t) *)
suffices ->: add_mn s (sub_mn s x) = x by rewrite IHt.
(* Goal: @eq In1 (add_mn s (sub_mn s x)) x *)
by apply: val_inj; rewrite /add_mn /= subnKC ?inord_val.
Qed.
Lemma card_ord_partitions m n :
#|[set t : m.+1.-tuple 'I_n.+1 | \sum_(i <- t) i == n]| = 'C(m + n, m).
Proof.
(* Goal: @eq nat (@card (tuple_finType (S m) (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType (S m) (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType (S m) (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType (S m) (ordinal_finType (S n))) (@SetDef.finset (tuple_finType (S m) (ordinal_finType (S n))) (fun t : tuple_of (S m) (ordinal (S n)) => @eq_op nat_eqType (@BigOp.bigop nat (ordinal (S n)) O (@tval (S m) (ordinal (S n)) t) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i))) n))))) (binomial (addn m n) m) *)
symmetry; set In1 := 'I_n.+1; pose x0 : In1 := ord0.
(* Goal: @eq nat (binomial (addn m n) m) (@card (tuple_finType (S m) (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType (S m) (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType (S m) (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType (S m) (ordinal_finType (S n))) (@SetDef.finset (tuple_finType (S m) (ordinal_finType (S n))) (fun t : tuple_of (S m) In1 => @eq_op nat_eqType (@BigOp.bigop nat In1 O (@tval (S m) In1 t) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n))))) *)
pose f_add (t : m.-tuple In1) := [tuple of sub_ord (\sum_(x <- t) x) :: t].
(* Goal: @eq nat (binomial (addn m n) m) (@card (tuple_finType (S m) (ordinal_finType (S n))) (@mem (Finite.sort (tuple_finType (S m) (ordinal_finType (S n)))) (predPredType (Finite.sort (tuple_finType (S m) (ordinal_finType (S n))))) (@SetDef.pred_of_set (tuple_finType (S m) (ordinal_finType (S n))) (@SetDef.finset (tuple_finType (S m) (ordinal_finType (S n))) (fun t : tuple_of (S m) In1 => @eq_op nat_eqType (@BigOp.bigop nat In1 O (@tval (S m) In1 t) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n))))) *)
rewrite -card_partial_ord_partitions -!sum1dep_card (reindex f_add) /=.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of (S m) (ordinal (S n))) (@mem (tuple_of (S m) (ordinal (S n))) (simplPredType (tuple_of (S m) (ordinal (S n)))) (@SimplPred (tuple_of (S m) (ordinal (S n))) (fun i : tuple_of (S m) (ordinal (S n)) => @eq_op nat_eqType (@BigOp.bigop nat In1 O (@tval (S m) In1 i) (fun i0 : In1 => @BigBody nat In1 i0 addn true (@nat_of_ord (S n) i0))) n))) f_add *)
(* Goal: @eq nat (@BigOp.bigop nat (tuple_of m (ordinal (S n))) O (index_enum (tuple_finType m (ordinal_finType (S n)))) (fun x : tuple_of m (ordinal (S n)) => @BigBody nat (tuple_of m (ordinal (S n))) x addn (leq (@BigOp.bigop nat (ordinal (S n)) O (@tval m (ordinal (S n)) x) (fun i : ordinal (S n) => @BigBody nat (ordinal (S n)) i addn true (@nat_of_ord (S n) i))) n) (S O))) (@BigOp.bigop nat (tuple_of m (ordinal (S n))) O (index_enum (tuple_finType m (ordinal_finType (S n)))) (fun j : tuple_of m (ordinal (S n)) => @BigBody nat (tuple_of m (ordinal (S n))) j addn (@eq_op nat_eqType (@BigOp.bigop nat In1 O (@cons (ordinal (S n)) (@sub_ord n (@BigOp.bigop nat In1 O (@tval m In1 j) (fun x : In1 => @BigBody nat In1 x addn true (@nat_of_ord (S n) x)))) (@tval m In1 j)) (fun i : In1 => @BigBody nat In1 i addn true (@nat_of_ord (S n) i))) n) (S O))) *)
by apply: eq_bigl => t; rewrite big_cons /= addnC (sameP maxn_idPr eqP) maxnE.
(* Goal: @bijective_on (tuple_of m (ordinal (S n))) (tuple_of (S m) (ordinal (S n))) (@mem (tuple_of (S m) (ordinal (S n))) (simplPredType (tuple_of (S m) (ordinal (S n)))) (@SimplPred (tuple_of (S m) (ordinal (S n))) (fun i : tuple_of (S m) (ordinal (S n)) => @eq_op nat_eqType (@BigOp.bigop nat In1 O (@tval (S m) In1 i) (fun i0 : In1 => @BigBody nat In1 i0 addn true (@nat_of_ord (S n) i0))) n))) f_add *)
exists (fun t : m.+1.-tuple In1 => [tuple of behead t]) => [t _|].
(* Goal: @prop_in1 (tuple_of (S m) (ordinal (S n))) (@mem (tuple_of (S m) (ordinal (S n))) (simplPredType (tuple_of (S m) (ordinal (S n)))) (@SimplPred (tuple_of (S m) (ordinal (S n))) (fun i : tuple_of (S m) (ordinal (S n)) => @eq_op nat_eqType (@BigOp.bigop nat In1 O (@tval (S m) In1 i) (fun i0 : In1 => @BigBody nat In1 i0 addn true (@nat_of_ord (S n) i0))) n))) (fun x : tuple_of (S m) (ordinal (S n)) => @eq (tuple_of (S m) (ordinal (S n))) (f_add (@tuple (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 x) (fun sP : is_true (@eq_op nat_eqType (@size In1 (@tval (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 x))) (Nat.pred (S m))) => @Tuple (Nat.pred (S m)) In1 (@behead In1 (@tval (S m) In1 x)) sP))) x) (inPhantom (@cancel (tuple_of m (ordinal (S n))) (tuple_of (S m) (ordinal (S n))) (fun t : tuple_of (S m) In1 => @tuple (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 t) (fun sP : is_true (@eq_op nat_eqType (@size In1 (@tval (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 t))) (Nat.pred (S m))) => @Tuple (Nat.pred (S m)) In1 (@behead In1 (@tval (S m) In1 t)) sP)) f_add)) *)
(* Goal: @eq (tuple_of m (ordinal (S n))) (@tuple (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 (f_add t)) (fun sP : is_true (@eq_op nat_eqType (@size In1 (@tval (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 (f_add t)))) (Nat.pred (S m))) => @Tuple (Nat.pred (S m)) In1 (@behead In1 (@tval (S m) In1 (f_add t))) sP)) t *)
exact: val_inj.
(* Goal: @prop_in1 (tuple_of (S m) (ordinal (S n))) (@mem (tuple_of (S m) (ordinal (S n))) (simplPredType (tuple_of (S m) (ordinal (S n)))) (@SimplPred (tuple_of (S m) (ordinal (S n))) (fun i : tuple_of (S m) (ordinal (S n)) => @eq_op nat_eqType (@BigOp.bigop nat In1 O (@tval (S m) In1 i) (fun i0 : In1 => @BigBody nat In1 i0 addn true (@nat_of_ord (S n) i0))) n))) (fun x : tuple_of (S m) (ordinal (S n)) => @eq (tuple_of (S m) (ordinal (S n))) (f_add (@tuple (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 x) (fun sP : is_true (@eq_op nat_eqType (@size In1 (@tval (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 x))) (Nat.pred (S m))) => @Tuple (Nat.pred (S m)) In1 (@behead In1 (@tval (S m) In1 x)) sP))) x) (inPhantom (@cancel (tuple_of m (ordinal (S n))) (tuple_of (S m) (ordinal (S n))) (fun t : tuple_of (S m) In1 => @tuple (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 t) (fun sP : is_true (@eq_op nat_eqType (@size In1 (@tval (Nat.pred (S m)) In1 (@behead_tuple (S m) In1 t))) (Nat.pred (S m))) => @Tuple (Nat.pred (S m)) In1 (@behead In1 (@tval (S m) In1 t)) sP)) f_add)) *)
case/tupleP=> x t; rewrite inE /= big_cons => /eqP def_n.
(* Goal: @eq (tuple_of (S m) (ordinal (S n))) (f_add (@tuple m In1 (@behead_tuple (S m) In1 (@tuple (S m) (ordinal (S n)) (@cons_tuple m (ordinal (S n)) x t) (fun sP : is_true (@eq_op nat_eqType (S (@size (ordinal (S n)) (@tval m (ordinal (S n)) t))) (S m)) => @Tuple (S m) (ordinal (S n)) (@cons (ordinal (S n)) x (@tval m (ordinal (S n)) t)) sP))) (fun sP : is_true (@eq_op nat_eqType (@size In1 (@tval m (ordinal (S n)) t)) m) => @Tuple m In1 (@tval m (ordinal (S n)) t) sP))) (@tuple (S m) (ordinal (S n)) (@cons_tuple m (ordinal (S n)) x t) (fun sP : is_true (@eq_op nat_eqType (S (@size (ordinal (S n)) (@tval m (ordinal (S n)) t))) (S m)) => @Tuple (S m) (ordinal (S n)) (@cons (ordinal (S n)) x (@tval m (ordinal (S n)) t)) sP)) *)
by apply: val_inj; congr (_ :: _); apply: val_inj; rewrite /= -{1}def_n addnK.
Qed.
End Combinations.
|
From mathcomp
Require Import ssreflect ssrbool ssrnat eqtype.
From LemmaOverloading
Require Import heaps.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Structure tagged_heap := Tag {untag :> heap}.
Definition right_tag := Tag.
Definition left_tag := right_tag.
Canonical Structure found_tag h := left_tag h.
Definition invariant x (h : tagged_heap) :=
def (untag h) -> x \in dom (untag h).
Structure find (x : ptr) :=
Form { heap_of :> tagged_heap;
_ : invariant x heap_of }.
Lemma found_pf A x (v : A) : invariant x (found_tag (x :-> v)).
Proof.
(* Goal: invariant x (found_tag (@pts A x v)) *)
by rewrite /invariant defPt domPt inE /= eq_refl.
Qed.
Canonical Structure ptr_found A x (v : A) :=
@Form x (found_tag (x :-> v)) (@found_pf A x v).
Lemma left_pf x (h : heap) (f : find x) :
invariant x (left_tag (untag (heap_of f) :+ h)).
Proof.
(* Goal: invariant x (left_tag (union2 (untag (@heap_of x f)) h)) *)
case:f=>[[i]]; rewrite /invariant /= => H D.
(* Goal: is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 i h)))) *)
by rewrite domUn !inE /= D (H (defUnl D)).
Qed.
Canonical Structure search_left x (h : heap) (f : find x) :=
@Form x (left_tag (untag (heap_of f) :+ h)) (@left_pf x h f).
Lemma right_pf x (h : heap) (f : find x) :
invariant x (right_tag (h :+ untag (heap_of f))).
Proof.
(* Goal: invariant x (right_tag (union2 h (untag (@heap_of x f)))) *)
case: f=>[[i]]; rewrite /invariant /= => H D.
(* Goal: is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (union2 h i)))) *)
by rewrite domUn !inE /= D (H (defUnr D)) orbT.
Qed.
Canonical Structure search_right x (h : heap) (f : find x) :=
@Form x (right_tag (h :+ untag (heap_of f))) (@right_pf x h f).
Lemma indom (x : ptr) (f : find x) : def f -> x \in dom f.
Proof.
(* Goal: forall _ : is_true (def (untag (@heap_of x f))), is_true (@in_mem ptr x (@mem ptr (predPredType ptr) (dom (untag (@heap_of x f))))) *)
by case: f=>[[i]]; apply.
Qed.
|
From mathcomp
Require Import ssreflect ssrfun ssrbool seq.
Require Import Setoid.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Lemma andTp p : True /\ p <-> p. Proof. by intuition. Qed.
Proof.
(* Goal: iff (and True p) p *)
by intuition.
Qed.
Lemma andFp p : False /\ p <-> False. Proof. by intuition. Qed.
Proof.
(* Goal: iff (and False p) False *)
by intuition.
Qed.
Lemma orTp p : True \/ p <-> True. Proof. by intuition. Qed.
Proof.
(* Goal: iff (or True p) True *)
by intuition.
Qed.
Lemma orFp p : False \/ p <-> p. Proof. by intuition. Qed.
Proof.
(* Goal: iff (or False p) p *)
by intuition.
Qed.
Delimit Scope rel_scope with rel.
Open Scope rel_scope.
Definition Pred T := T -> Prop.
Identity Coercion fun_of_Pred : Pred >-> Funclass.
Notation xPred0 := (fun _ => False).
Notation xPred1 := (fun x y => x = y).
Notation xPredT := (fun _ => True).
Notation xPredI := (fun (p1 p2 : Pred _) x => p1 x /\ p2 x).
Notation xPredU := (fun (p1 p2 : Pred _) x => p1 x \/ p2 x).
Notation xPredC := (fun (p : Pred _) x => ~ p x).
Notation xPredD := (fun (p1 p2 : Pred _) x => ~ p2 x /\ p1 x).
Notation xPreim := (fun f (p : Pred _) x => p (f x)).
Section Predicates.
Variable T : Type.
Definition Simpl_Pred := simpl_fun T Prop.
Definition SimplPred (p : Pred T) : Simpl_Pred := SimplFun p.
Coercion Pred_of_Simpl (p : Simpl_Pred) : Pred T := p : T -> Prop.
Definition Pred0 := SimplPred xPred0.
Definition Pred1 x := SimplPred (xPred1 x).
Definition PredT := SimplPred xPredT.
Definition PredI p1 p2 := SimplPred (xPredI p1 p2).
Definition PredU p1 p2 := SimplPred (xPredU p1 p2).
Definition PredC p := SimplPred (xPredC p).
Definition PredD p1 p2 := SimplPred (xPredD p1 p2).
Definition Preim rT f (d : Pred rT) := SimplPred (xPreim f d).
CoInductive Mem_Pred : Type := MemProp of Pred T.
Definition isMem pT toPred mem := mem = (fun p : pT => MemProp [eta toPred p]).
Structure PredType : Type := PropPredType {
Pred_Sort :> Type;
toPred : Pred_Sort -> Pred T;
_ : {mem | isMem toPred mem}}.
Definition mkPredType pT toP := PropPredType (exist (@isMem pT toP) _ (erefl _)).
Canonical Structure PredPredType := Eval hnf in @mkPredType (Pred T) id.
Canonical Structure SimplPredPredType := Eval hnf in mkPredType Pred_of_Simpl.
Coercion Pred_of_Mem mp : Pred_Sort PredPredType :=
let: MemProp p := mp in [eta p].
Canonical Structure MemPredType := Eval hnf in mkPredType Pred_of_Mem.
Canonical Structure predPredType := Eval hnf in @mkPredType (pred T) id.
Canonical Structure simplpredPredType :=
Eval hnf in @mkPredType (simpl_pred T) (fun p x => p x).
End Predicates.
Arguments Pred0 {T}.
Arguments PredT {T}.
Prenex Implicits PredI PredU PredC PredD Preim.
Notation "r1 +p r2" := (PredU r1 r2)
(at level 55, right associativity) : rel_scope.
Notation "r1 *p r2" := (PredI r1 r2)
(at level 45, right associativity) : rel_scope.
Notation "[ 'Pred' : T | E ]" := (SimplPred (fun _ : T => E))
(at level 0, format "[ 'Pred' : T | E ]") : fun_scope.
Notation "[ 'Pred' x | E ]" := (SimplPred (fun x => E))
(at level 0, x ident, format "[ 'Pred' x | E ]") : fun_scope.
Notation "[ 'Pred' x : T | E ]" := (SimplPred (fun x : T => E))
(at level 0, x ident, only parsing) : fun_scope.
Notation "[ 'Pred' x y | E ]" := (SimplPred (fun t => let: (x, y) := t in E))
(at level 0, x ident, y ident, format "[ 'Pred' x y | E ]") : fun_scope.
Notation "[ 'Pred' x y : T | E ]" :=
(SimplPred (fun t : (T*T) => let: (x, y) := t in E))
(at level 0, x ident, y ident, only parsing) : fun_scope.
Definition repack_Pred T pT :=
let: PropPredType _ a mP := pT return {type of @PropPredType T for pT} -> _ in
fun k => k a mP.
Notation "[ 'PredType' 'of' T ]" := (repack_Pred (fun a => @PropPredType _ T a))
(at level 0, format "[ 'PredType' 'of' T ]") : form_scope.
Notation Pred_Class := (Pred_Sort (PredPredType _)).
Coercion Sort_of_Simpl_Pred T (p : Simpl_Pred T) : Pred_Class := p : Pred T.
Definition PredArgType := Type.
Coercion Pred_of_argType (T : PredArgType) : Simpl_Pred T := PredT.
Notation "{ :: T }" := (T%type : PredArgType)
(at level 0, format "{ :: T }") : type_scope.
Definition Mem T (pT : PredType T) : pT -> Mem_Pred T :=
nosimpl (let: PropPredType _ _ (exist mem _) := pT return pT -> _ in mem).
Definition InMem T x mp := nosimpl Pred_of_Mem T mp x.
Prenex Implicits Mem.
Coercion Pred_of_Mem_Pred T mp := [Pred x : T | InMem x mp].
Definition EqPredType T (pT : PredType T) (p1 p2 : pT) :=
forall x : T, toPred p1 x <-> toPred p2 x.
Definition SubPredType T (pT : PredType T) (p1 p2 : pT) :=
forall x : T, toPred p1 x -> toPred p2 x.
Definition EqPred T (p1 p2 : Pred T) := EqPredType p1 p2.
Definition SubPred T (p1 p2 : Pred T) := SubPredType p1 p2.
Definition EqSimplPred T (p1 p2 : Simpl_Pred T) := EqPredType p1 p2.
Definition SubSimplPred T (p1 p2 : Simpl_Pred T) := SubPredType p1 p2.
Definition EqPredFun T1 T2 p1 p2 :=
forall x : T1, @EqPred T2 (p1 x) (p2 x).
Definition SubPredFun T1 T2 p1 p2 :=
forall x : T1, @SubPred T2 (p1 x) (p2 x).
Definition EqMem T p1 p2 := forall x : T, InMem x p1 <-> InMem x p2.
Definition SubMem T p1 p2 := forall x : T, InMem x p1 -> InMem x p2.
Notation "A <~> B" := (EqPred A B)
(at level 70, no associativity) : rel_scope.
Notation "A ~> B" := (SubPred A B)
(at level 70, no associativity) : rel_scope.
Notation "A <~1> B" := (EqPredFun A B)
(at level 70, no associativity) : rel_scope.
Notation "A ~1> B" := (SubPredFun A B)
(at level 70, no associativity) : rel_scope.
Notation "x \In A" := (InMem x (Mem A))
(at level 70, no associativity) : rel_scope.
Notation "x \Notin A" := (~ (x \In A))
(at level 70, no associativity) : rel_scope.
Notation "A =p B" := (EqMem (Mem A) (Mem B))
(at level 70, no associativity) : type_scope.
Notation "A <=p B" := (SubMem (Mem A) (Mem B))
(at level 70, no associativity) : type_scope.
Notation "[ 'Mem' A ]" := (Pred_of_Simpl (Pred_of_Mem_Pred (Mem A)))
(at level 0, only parsing) : fun_scope.
Notation "[ 'PredI' A & B ]" := (PredI [Mem A] [Mem B])
(at level 0, format "[ 'PredI' A & B ]") : fun_scope.
Notation "[ 'PredU' A & B ]" := (PredU [Mem A] [Mem B])
(at level 0, format "[ 'PredU' A & B ]") : fun_scope.
Notation "[ 'PredD' A & B ]" := (PredD [Mem A] [Mem B])
(at level 0, format "[ 'PredD' A & B ]") : fun_scope.
Notation "[ 'PredC' A ]" := (PredC [Mem A])
(at level 0, format "[ 'PredC' A ]") : fun_scope.
Notation "[ 'Preim' f 'of' A ]" := (Preim f [Mem A])
(at level 0, format "[ 'Preim' f 'of' A ]") : fun_scope.
Notation "[ 'Pred' x \In A ]" := [Pred x | x \In A]
(at level 0, x ident, format "[ 'Pred' x \In A ]") : fun_scope.
Notation "[ 'Pred' x \In A | E ]" := [Pred x | (x \In A) /\ E]
(at level 0, x ident, format "[ 'Pred' x \In A | E ]") : fun_scope.
Notation "[ 'Pred' x y \In A & B | E ]" :=
[Pred x y | (x \In A) /\ (y \In B) /\ E]
(at level 0, x ident, y ident,
format "[ 'Pred' x y \In A & B | E ]") : fun_scope.
Notation "[ 'Pred' x y \In A & B ]" := [Pred x y | (x \In A) /\ (y \In B)]
(at level 0, x ident, y ident,
format "[ 'Pred' x y \In A & B ]") : fun_scope.
Notation "[ 'Pred' x y \In A | E ]" := [Pred x y \In A & A | E]
(at level 0, x ident, y ident,
format "[ 'Pred' x y \In A | E ]") : fun_scope.
Notation "[ 'Pred' x y \In A ]" := [Pred x y \In A & A]
(at level 0, x ident, y ident,
format "[ 'Pred' x y \In A ]") : fun_scope.
Section Simplifications.
Variables (T : Type) (pT : PredType T).
Lemma Mem_toPred : forall (p : pT), Mem (toPred p) = Mem p.
Proof.
(* Goal: forall p : @Pred_Sort T pT, @eq (Mem_Pred T) (@Mem T (PredPredType T) (@toPred T pT p)) (@Mem T pT p) *)
by rewrite /Mem; case: pT => T1 app1 [mem1 /= ->].
Qed.
Lemma toPredE : forall x (p : pT), toPred p x = (x \In p).
Proof.
(* Goal: forall (x : T) (p : @Pred_Sort T pT), @eq Prop (@toPred T pT p x) (@InMem T x (@Mem T pT p)) *)
by move=> *; rewrite -Mem_toPred.
Qed.
Lemma In_Simpl : forall x (p : Simpl_Pred T), (x \In p) = p x.
Proof.
(* Goal: forall (x : T) (p : Simpl_Pred T), @eq Prop (@InMem T x (@Mem T (SimplPredPredType T) p)) (@Pred_of_Simpl T p x) *)
by [].
Qed.
Lemma Simpl_PredE : forall (p : Pred T), [Pred x | p x] <~> p.
Proof.
(* Goal: forall p : Pred T, @EqPred T (@Pred_of_Simpl T (@SimplPred T (fun x : T => p x))) p *)
by [].
Qed.
Lemma Mem_Simpl : forall (p : Simpl_Pred T), Mem p = p :> Pred T.
Proof.
(* Goal: forall p : Simpl_Pred T, @eq (Pred T) (@Pred_of_Simpl T (@Pred_of_Mem_Pred T (@Mem T (SimplPredPredType T) p))) (@Pred_of_Simpl T p) *)
by [].
Qed.
Definition MemE := Mem_Simpl.
Lemma Mem_Mem : forall p : pT, (Mem (Mem p) = Mem p) * (Mem [Mem p] = Mem p).
Proof.
(* Goal: forall p : @Pred_Sort T pT, prod (@eq (Mem_Pred T) (@Mem T (MemPredType T) (@Mem T pT p)) (@Mem T pT p)) (@eq (Mem_Pred T) (@Mem T (PredPredType T) (@Pred_of_Simpl T (@Pred_of_Mem_Pred T (@Mem T pT p)))) (@Mem T pT p)) *)
by move=> p; rewrite -Mem_toPred.
Qed.
End Simplifications.
Section RelProperties.
Variables (T : Type) (pT : PredType T).
Lemma EqPredType_refl (r : pT) : EqPredType r r. Proof. by []. Qed.
Proof.
(* Goal: @EqPredType T pT r r *)
by [].
Qed.
Lemma EqPredType_sym (r1 r2 : pT) : EqPredType r1 r2 -> EqPredType r2 r1.
Proof.
(* Goal: forall _ : @EqPredType T pT r1 r2, @EqPredType T pT r2 r1 *)
by move=>H1 x; split; move/H1.
Qed.
Lemma EqPredType_trans' (r1 r2 r3 : pT) :
EqPredType r1 r2 -> EqPredType r2 r3 -> EqPredType r1 r3.
Proof.
(* Goal: forall (_ : @EqPredType T pT r1 r2) (_ : @EqPredType T pT r2 r3), @EqPredType T pT r1 r3 *)
by move=>H1 H2 x; split; [move/H1; move/H2 | move/H2; move/H1].
Qed.
Lemma SubPredType_trans' (r1 r2 r3 : pT) :
SubPredType r1 r2 -> SubPredType r2 r3 -> SubPredType r1 r3.
Proof.
(* Goal: forall (_ : @SubPredType T pT r1 r2) (_ : @SubPredType T pT r2 r3), @SubPredType T pT r1 r3 *)
by move=>H1 H2 x; move/H1; move/H2.
Qed.
Definition EqPredType_trans r2 r1 r3 := @EqPredType_trans' r1 r2 r3.
Definition SubPredType_trans r2 r1 r3 := @SubPredType_trans' r1 r2 r3.
Section RelLaws.
Variable (T : Type).
Lemma orrI (r : Pred T) : r +p r <~> r.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T r r)) r *)
by move=>x; split; [case | left].
Qed.
Lemma orrC (r1 r2 : Pred T) : r1 +p r2 <~> r2 +p r1.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T r1 r2)) (@Pred_of_Simpl T (@PredU T r2 r1)) *)
move=>x; split=>/=; tauto.
Qed.
Lemma orr0 (r : Pred T) : r +p Pred0 <~> r.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T r (@Pred_of_Simpl T (@Pred0 T)))) r *)
by move=>x; split; [case | left].
Qed.
Lemma or0r (r : Pred T) : Pred0 +p r <~> r.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@Pred0 T)) r)) r *)
by rewrite orrC orr0.
Qed.
Lemma orrCA (r1 r2 r3 : Pred T) : r1 +p r2 +p r3 <~> r2 +p r1 +p r3.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T r1 (@Pred_of_Simpl T (@PredU T r2 r3)))) (@Pred_of_Simpl T (@PredU T r2 (@Pred_of_Simpl T (@PredU T r1 r3)))) *)
by move=>x; split=>/=; intuition.
Qed.
Lemma orrAC (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> (r1 +p r3) +p r2.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@PredU T r1 r2)) r3)) (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@PredU T r1 r3)) r2)) *)
by move=>?; split=>/=; intuition.
Qed.
Lemma orrA (r1 r2 r3 : Pred T) : (r1 +p r2) +p r3 <~> r1 +p r2 +p r3.
Proof.
(* Goal: @EqPred T (@Pred_of_Simpl T (@PredU T (@Pred_of_Simpl T (@PredU T r1 r2)) r3)) (@Pred_of_Simpl T (@PredU T r1 (@Pred_of_Simpl T (@PredU T r2 r3)))) *)
by rewrite (orrC r2) orrCA orrC.
Qed.
Lemma orrAb (r1 a : Pred T) : r1 <~> r1 +p a <-> a ~> r1.
Proof.
(* Goal: iff (@EqPred T r1 (@Pred_of_Simpl T (@PredU T r1 a))) (@SubPred T a r1) *)
split; first by move=>-> x /=; auto.
(* Goal: forall _ : @SubPred T a r1, @EqPred T r1 (@Pred_of_Simpl T (@PredU T r1 a)) *)
move=>H x /=; split; first by auto.
(* Goal: forall _ : or (r1 x) (a x), r1 x *)
by case=>//; move/H.
Qed.
Lemma sub_orl (r1 r2 : Pred T) : r1 ~> r1 +p r2. Proof. by left. Qed.
Proof.
(* Goal: @SubPred T r1 (@Pred_of_Simpl T (@PredU T r1 r2)) *)
by left.
Qed.
End RelLaws.
Section SubMemLaws.
Variable T : Type.
Lemma subp_refl (p : Pred T) : p <=p p.
Proof.
(* Goal: @SubMem T (@Mem T (PredPredType T) p) (@Mem T (PredPredType T) p) *)
by [].
Qed.
Lemma subp_asym (p1 p2 : Pred T) : p1 <=p p2 -> p2 <=p p1 -> p1 =p p2.
Proof.
(* Goal: forall (_ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2)) (_ : @SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) p1)), @EqMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2) *)
by move=>H1 H2 x; split; [move/H1 | move/H2].
Qed.
Lemma subp_trans (p2 p1 p3 : Pred T) : p1 <=p p2 -> p2 <=p p3 -> p1 <=p p3.
Proof.
(* Goal: forall (_ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2)) (_ : @SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) p3)), @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p3) *)
by move=>H1 H2 x; move/H1; move/H2.
Qed.
Lemma subp_or (p1 p2 q : Pred T) : p1 <=p q /\ p2 <=p q <-> p1 +p p2 <=p q.
Proof.
(* Goal: iff (and (@SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) q)) (@SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) q))) (@SubMem T (@Mem T (SimplPredPredType T) (@PredU T p1 p2)) (@Mem T (PredPredType T) q)) *)
split=>[[H1] H2 x|H1]; first by case; [move/H1 | move/H2].
(* Goal: and (@SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) q)) (@SubMem T (@Mem T (PredPredType T) p2) (@Mem T (PredPredType T) q)) *)
by split=>x H2; apply: H1; [left | right].
Qed.
Lemma subp_and (p1 p2 q : Pred T) : q <=p p1 /\ q <=p p2 <-> q <=p p1 *p p2.
Proof.
(* Goal: iff (and (@SubMem T (@Mem T (PredPredType T) q) (@Mem T (PredPredType T) p1)) (@SubMem T (@Mem T (PredPredType T) q) (@Mem T (PredPredType T) p2))) (@SubMem T (@Mem T (PredPredType T) q) (@Mem T (SimplPredPredType T) (@PredI T p1 p2))) *)
split=>[[H1] H2 x|] H; last by split=>x; case/H.
(* Goal: @InMem T x (@Mem T (SimplPredPredType T) (@PredI T p1 p2)) *)
by split; [apply: H1 | apply: H2].
Qed.
Lemma subp_orl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 +p q <=p p2 +p q.
Proof.
(* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (SimplPredPredType T) (@PredU T p1 q)) (@Mem T (SimplPredPredType T) (@PredU T p2 q)) *)
by move=>H x; case; [move/H; left|right].
Qed.
Lemma subp_orr (p1 p2 q : Pred T) : p1 <=p p2 -> q +p p1 <=p q +p p2.
Proof.
(* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (SimplPredPredType T) (@PredU T q p1)) (@Mem T (SimplPredPredType T) (@PredU T q p2)) *)
by move=>H x; case; [left | move/H; right].
Qed.
Lemma subp_andl (p1 p2 q : Pred T) : p1 <=p p2 -> p1 *p q <=p p2 *p q.
Proof.
(* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (SimplPredPredType T) (@PredI T p1 q)) (@Mem T (SimplPredPredType T) (@PredI T p2 q)) *)
by by move=>H x [H1 H2]; split; [apply: H|].
Qed.
Lemma subp_andr (p1 p2 q : Pred T) : p1 <=p p2 -> q *p p1 <=p q *p p2.
Proof.
(* Goal: forall _ : @SubMem T (@Mem T (PredPredType T) p1) (@Mem T (PredPredType T) p2), @SubMem T (@Mem T (SimplPredPredType T) (@PredI T q p1)) (@Mem T (SimplPredPredType T) (@PredI T q p2)) *)
by move=>H x [H1 H2]; split; [|apply: H].
Qed.
End SubMemLaws.
Hint Resolve subp_refl : core.
Section ListMembership.
Variable T : Type.
Fixpoint Mem_Seq (s : seq T) :=
if s is y::s' then (fun x => x = y \/ Mem_Seq s' x) else xPred0.
Definition EqSeq_Class := seq T.
Identity Coercion seq_of_EqSeq : EqSeq_Class >-> seq.
Coercion Pred_of_Eq_Seq (s : EqSeq_Class) : Pred_Class := [eta Mem_Seq s].
Canonical Structure seq_PredType := @mkPredType T (seq T) Pred_of_Eq_Seq.
Canonical Structure Mem_Seq_PredType := mkPredType Mem_Seq.
Lemma In_cons : forall y s x, (x \In y :: s) <-> (x = y) \/ (x \In s).
Proof.
(* Goal: forall (y : T) (s : list T) (x : T), iff (@InMem T x (@Mem T seq_PredType (@cons T y s))) (or (@eq T x y) (@InMem T x (@Mem T seq_PredType s))) *)
by [].
Qed.
Lemma In_nil : forall x, (x \In [::]) <-> False.
Proof.
(* Goal: forall x : T, iff (@InMem T x (@Mem T seq_PredType (@nil T))) False *)
by [].
Qed.
Lemma Mem_Seq1 : forall x y, (x \In [:: y]) <-> (x = y).
Proof.
(* Goal: forall x y : T, iff (@InMem T x (@Mem T seq_PredType (@cons T y (@nil T)))) (@eq T x y) *)
by move=> x y; rewrite In_cons orpF.
Qed.
Definition InE := (Mem_Seq1, In_cons, In_Simpl).
Lemma eqfun_sym A B (f1 f2 : A -> B) : f1 =1 f2 -> f2 =1 f1.
Proof.
(* Goal: forall _ : @eqfun B A f1 f2, @eqfun B A f2 f1 *)
by move=>H x; rewrite H.
Qed.
Lemma eqfun_trans A B (f1 f2 f3 : A -> B) : f1 =1 f2 -> f2 =1 f3 -> f1 =1 f3.
Proof.
(* Goal: forall (_ : @eqfun B A f1 f2) (_ : @eqfun B A f2 f3), @eqfun B A f1 f3 *)
by move=>H1 H2 x; rewrite H1 H2.
Qed.
Add Parametric Relation A B : (A -> B) (@eqfun _ _)
reflexivity proved by (@eqfun_refl A B)
symmetry proved by (@eqfun_sym A B)
transitivity proved by (@eqfun_trans A B) as eqfun_morph.
|
Require Import Ensf.
Require Import Words.
Require Import more_words.
Require Import need.
Require Import fonctions.
Require Import Relations.
Definition Mots (X : Ensf) :=
forall a : Elt, dans a X -> exists w : Word, word w = a.
Definition Regles (X V R : Ensf) :=
forall x : Elt,
dans x R ->
ex2 (fun A : Elt => dans A V)
(fun A : Elt =>
ex2 (fun B : Word => x = couple A (word B))
(fun B : Word => inmonoid (union X V) B)).
Lemma Regles_inv1 :
forall (X V R : Ensf) (x y : Elt),
Regles X V R -> dans (couple x y) R -> dans x V.
Proof.
(* Goal: forall (X V R : Ensf) (x y : Elt) (_ : Regles X V R) (_ : dans (couple x y) R), dans x V *)
intros X V R x y Regles_R dans_couple_R.
(* Goal: dans x V *)
cut (ex2 (fun A : Elt => dans A V) (fun A : Elt => ex2 (fun B : Word => couple x y = couple A (word B)) (fun B : Word => inmonoid (union X V) B))).
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: forall _ : @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)), dans x V *)
intro temp; elim temp; clear temp.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: forall (x0 : Elt) (_ : dans x0 V) (_ : @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple x0 (word B))) (fun B : Word => inmonoid (union X V) B)), dans x V *)
intros x0 dans_x0_V temp; elim temp; clear temp.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: forall (x1 : Word) (_ : @eq Elt (couple x y) (couple x0 (word x1))) (_ : inmonoid (union X V) x1), dans x V *)
intros u eg_couple inmonoid_u.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: dans x V *)
replace x with x0; prolog [ sym_equal couple_couple_inv1 ] 3.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x y) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
auto.
Qed.
Lemma Regles_inv2 :
forall (X V R : Ensf) (x : Elt) (u : Word),
Regles X V R -> dans (couple x (word u)) R -> inmonoid (union X V) u.
Proof.
(* Goal: forall (X V R : Ensf) (x : Elt) (u : Word) (_ : Regles X V R) (_ : dans (couple x (word u)) R), inmonoid (union X V) u *)
intros X V R x u Regles_R dans_couple_R.
(* Goal: inmonoid (union X V) u *)
cut (ex2 (fun A : Elt => dans A V) (fun A : Elt => ex2 (fun B : Word => couple x (word u) = couple A (word B)) (fun B : Word => inmonoid (union X V) B))).
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: forall _ : @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)), inmonoid (union X V) u *)
intro temp; elim temp; clear temp.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: forall (x0 : Elt) (_ : dans x0 V) (_ : @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple x0 (word B))) (fun B : Word => inmonoid (union X V) B)), inmonoid (union X V) u *)
intros x0 dans_x0_V temp; elim temp; clear temp.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: forall (x1 : Word) (_ : @eq Elt (couple x (word u)) (couple x0 (word x1))) (_ : inmonoid (union X V) x1), inmonoid (union X V) u *)
intros u0 eg_couple inmonoid_u0.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
(* Goal: inmonoid (union X V) u *)
replace u with u0; prolog [ sym_equal couple_couple_inv2 word_word_inv ] 4.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt (couple x (word u)) (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
auto.
Qed.
Definition isGram (X V R : Ensf) (S : Elt) : Prop :=
Mots X /\ inter X V empty /\ dans S V /\ Regles X V R.
Section Easy_lemma_isGram.
Variable X V R : Ensf.
Variable S : Elt.
Let H := isGram X V R S.
Lemma isGram1 : H -> Mots X.
Proof.
(* Goal: forall _ : H, Mots X *)
intro H1.
(* Goal: Mots X *)
elim H1.
(* Goal: forall (_ : Mots X) (_ : and (inter X V empty) (and (dans S V) (Regles X V R))), Mots X *)
trivial.
Qed.
Lemma isGram2 : H -> inter X V empty.
Proof.
(* Goal: forall _ : H, inter X V empty *)
intro H1.
(* Goal: inter X V empty *)
elim H1.
(* Goal: forall (_ : Mots X) (_ : and (inter X V empty) (and (dans S V) (Regles X V R))), inter X V empty *)
intuition.
Qed.
Lemma isGram3 : H -> dans S V.
Proof.
(* Goal: forall _ : H, dans S V *)
intro H1.
(* Goal: dans S V *)
elim H1.
(* Goal: forall (_ : Mots X) (_ : and (inter X V empty) (and (dans S V) (Regles X V R))), dans S V *)
intuition.
Qed.
Lemma isGram4 : H -> Regles X V R.
Proof.
(* Goal: forall _ : H, Regles X V R *)
intro H1.
(* Goal: Regles X V R *)
elim H1.
(* Goal: forall (_ : Mots X) (_ : and (inter X V empty) (and (dans S V) (Regles X V R))), Regles X V R *)
intuition.
Qed.
Lemma isGram5 : Mots X -> inter X V empty -> dans S V -> Regles X V R -> H.
Proof.
(* Goal: forall (_ : Mots X) (_ : inter X V empty) (_ : dans S V) (_ : Regles X V R), H *)
intros.
(* Goal: H *)
red in |- *; red in |- *.
(* Goal: and (Mots X) (and (inter X V empty) (and (dans S V) (Regles X V R))) *)
auto.
Qed.
End Easy_lemma_isGram.
Lemma Regles_R :
forall X V R R' : Ensf, inclus R' R -> Regles X V R -> Regles X V R'.
Proof.
(* Goal: forall (X V R R' : Ensf) (_ : inclus R' R) (_ : Regles X V R), Regles X V R' *)
unfold Regles in |- *.
(* Goal: forall (X V R R' : Ensf) (_ : inclus R' R) (_ : forall (x : Elt) (_ : dans x R), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B))) (x : Elt) (_ : dans x R'), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
auto.
Qed.
Lemma Regles_V :
forall X V R V' : Ensf, inclus V V' -> Regles X V R -> Regles X V' R.
Proof.
(* Goal: forall (X V R V' : Ensf) (_ : inclus V V') (_ : Regles X V R), Regles X V' R *)
unfold Regles in |- *.
(* Goal: forall (X V R V' : Ensf) (_ : inclus V V') (_ : forall (x : Elt) (_ : dans x R), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B))) (x : Elt) (_ : dans x R), @ex2 Elt (fun A : Elt => dans A V') (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B)) *)
intros X V R V' inclus_V_V' Regles_X_V_R x dans_x_R.
(* Goal: @ex2 Elt (fun A : Elt => dans A V') (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B)) *)
elim (Regles_X_V_R x dans_x_R).
(* Goal: forall (x0 : Elt) (_ : dans x0 V) (_ : @ex2 Word (fun B : Word => @eq Elt x (couple x0 (word B))) (fun B : Word => inmonoid (union X V) B)), @ex2 Elt (fun A : Elt => dans A V') (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B)) *)
intros A dans_A_V temp; elim temp; clear temp.
(* Goal: forall (x0 : Word) (_ : @eq Elt x (couple A (word x0))) (_ : inmonoid (union X V) x0), @ex2 Elt (fun A : Elt => dans A V') (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B)) *)
intros B egal_B inmonoid_B.
(* Goal: @ex2 Elt (fun A : Elt => dans A V') (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B)) *)
exists A.
(* Goal: @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B) *)
(* Goal: dans A V' *)
auto.
(* Goal: @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V') B) *)
exists B.
(* Goal: inmonoid (union X V') B *)
(* Goal: @eq Elt x (couple A (word B)) *)
assumption.
(* Goal: inmonoid (union X V') B *)
apply inmonoid_inclus with (union X V); auto.
Qed.
Lemma Regles_add :
forall (X V R : Ensf) (a : Elt) (u : Word),
Regles X V R ->
dans a V -> inmonoid (union X V) u -> Regles X V (add (couple a (word u)) R).
Proof.
(* Goal: forall (X V R : Ensf) (a : Elt) (u : Word) (_ : Regles X V R) (_ : dans a V) (_ : inmonoid (union X V) u), Regles X V (add (couple a (word u)) R) *)
intros X V R a u R_R dans_a_V inmonoid_u_X_V_u.
(* Goal: Regles X V (add (couple a (word u)) R) *)
red in |- *.
(* Goal: forall (x : Elt) (_ : dans x (add (couple a (word u)) R)), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
intros x dans_x_R'.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
cut (couple a (word u) = x :>Elt \/ dans x R).
(* Goal: or (@eq Elt (couple a (word u)) x) (dans x R) *)
(* Goal: forall _ : or (@eq Elt (couple a (word u)) x) (dans x R), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
intuition.
(* Goal: or (@eq Elt (couple a (word u)) x) (dans x R) *)
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
exists a.
(* Goal: or (@eq Elt (couple a (word u)) x) (dans x R) *)
(* Goal: @ex2 Word (fun B : Word => @eq Elt x (couple a (word B))) (fun B : Word => inmonoid (union X V) B) *)
(* Goal: dans a V *)
assumption.
(* Goal: or (@eq Elt (couple a (word u)) x) (dans x R) *)
(* Goal: @ex2 Word (fun B : Word => @eq Elt x (couple a (word B))) (fun B : Word => inmonoid (union X V) B) *)
exists u; auto.
(* Goal: or (@eq Elt (couple a (word u)) x) (dans x R) *)
apply dans_add; assumption.
Qed.
Lemma Regles_add2 :
forall (X V R : Ensf) (a : Elt), Regles X V R -> Regles X (add a V) R.
Proof.
(* Goal: forall (X V R : Ensf) (a : Elt) (_ : Regles X V R), Regles X (add a V) R *)
intros.
(* Goal: Regles X (add a V) R *)
apply Regles_V with V; auto.
Qed.
Lemma Regles_union :
forall X V R R' : Ensf,
Regles X V R -> Regles X V R' -> Regles X V (union R R').
Proof.
(* Goal: forall (X V R R' : Ensf) (_ : Regles X V R) (_ : Regles X V R'), Regles X V (union R R') *)
unfold Regles in |- *.
(* Goal: forall (X V R R' : Ensf) (_ : forall (x : Elt) (_ : dans x R), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B))) (_ : forall (x : Elt) (_ : dans x R'), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B))) (x : Elt) (_ : dans x (union R R')), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
intros X V R R' R_R R_R' x dans_x_union.
(* Goal: @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
cut (dans x R \/ dans x R'); auto.
(* Goal: forall _ : or (dans x R) (dans x R'), @ex2 Elt (fun A : Elt => dans A V) (fun A : Elt => @ex2 Word (fun B : Word => @eq Elt x (couple A (word B))) (fun B : Word => inmonoid (union X V) B)) *)
intros [HR| HR']; auto.
Qed.
Lemma isGram_inclus2 :
forall (X V R R' : Ensf) (S : Elt),
inclus R' R -> isGram X V R S -> isGram X V R' S.
Proof.
(* Goal: forall (X V R R' : Ensf) (S : Elt) (_ : inclus R' R) (_ : isGram X V R S), isGram X V R' S *)
prolog [ isGram4 Regles_R isGram3 isGram2 isGram1 isGram5 ] 11.
Qed.
Lemma isGram_inclus3 :
forall (X V R : Ensf) (S a : Elt), isGram X V (add a R) S -> isGram X V R S.
Proof.
(* Goal: forall (X V R : Ensf) (S a : Elt) (_ : isGram X V (add a R) S), isGram X V R S *)
intros X V R S a isGram_X_V_a_R_S.
(* Goal: isGram X V R S *)
apply isGram_inclus2 with (add a R); auto.
Qed.
Inductive Derive (R : Ensf) : Word -> Word -> Prop :=
| Derive1 :
forall (u v : Word) (A : Elt),
dans (couple A (word u)) R ->
Derive R (cons A v) (Append u v)
| Derive2 :
forall (u v : Word) (x : Elt),
Derive R u v -> Derive R (cons x u) (cons x v).
Hint Resolve Derive1.
Hint Resolve Derive2.
Lemma Derive_inclus :
forall (R1 R2 : Ensf) (u v : Word),
inclus R1 R2 -> Derive R1 u v -> Derive R2 u v.
Proof.
(* Goal: forall (R1 R2 : Ensf) (u v : Word) (_ : inclus R1 R2) (_ : Derive R1 u v), Derive R2 u v *)
intros R1 R2 u v inclus_R1_R2 Der_R1.
(* Goal: Derive R2 u v *)
elim Der_R1; auto.
Qed.
Definition Derive_inv (R : Ensf) (x y : Word) :=
match x return Prop with
| nil =>
False
| cons A w =>
ex2 (fun u : Word => dans (couple A (word u)) R)
(fun u : Word =>
ex2 (fun v : Word => cons A v = x :>Word)
(fun v : Word => Append u v = y :>Word)) \/
ex2 (fun v : Word => Derive R w v)
(fun v : Word => cons A v = y :>Word)
end.
Lemma Derive_inv1 :
forall (R : Ensf) (u v : Word), Derive R u v -> Derive_inv R u v.
Proof.
(* Goal: forall (R : Ensf) (u v : Word) (_ : Derive R u v), Derive_inv R u v *)
intros R x y Der_x_y.
(* Goal: Derive_inv R x y *)
unfold Derive_inv in |- *.
(* Goal: match x with | nil => False | cons A w => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) x) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons A v) y)) end *)
elim Der_x_y; prolog [ ex_intro2 refl_equal or_intror or_introl ] 8.
Qed.
Hint Resolve Derive_inv1.
Lemma Derive_inv2 :
forall (R : Ensf) (x y : Word),
Derive_inv R x y ->
exists A : Elt,
(exists2 w : Word,
cons A w = x &
(exists2 u : Word,
dans (couple A (word u)) R &
(exists2 v : Word, cons A v = x & Append u v = y)) \/
(exists2 v : Word, Derive R w v & cons A v = y)).
Proof.
(* Goal: forall (R : Ensf) (x y : Word) (_ : Derive_inv R x y), @ex Elt (fun A : Elt => @ex2 Word (fun w : Word => @eq Word (cons A w) x) (fun w : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) x) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons A v) y)))) *)
intros R x y.
(* Goal: forall _ : Derive_inv R x y, @ex Elt (fun A : Elt => @ex2 Word (fun w : Word => @eq Word (cons A w) x) (fun w : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) x) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons A v) y)))) *)
elim x.
(* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Derive_inv R w y, @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) w) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) w) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y))))) (_ : Derive_inv R (cons e w) y), @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) (cons e w)) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) (cons e w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y)))) *)
(* Goal: forall _ : Derive_inv R nil y, @ex Elt (fun A : Elt => @ex2 Word (fun w : Word => @eq Word (cons A w) nil) (fun w : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) nil) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons A v) y)))) *)
unfold Derive_inv in |- *.
(* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Derive_inv R w y, @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) w) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) w) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y))))) (_ : Derive_inv R (cons e w) y), @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) (cons e w)) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) (cons e w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y)))) *)
(* Goal: forall _ : False, @ex Elt (fun A : Elt => @ex2 Word (fun w : Word => @eq Word (cons A w) nil) (fun w : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) nil) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons A v) y)))) *)
intuition.
(* Goal: forall (e : Elt) (w : Word) (_ : forall _ : Derive_inv R w y, @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) w) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) w) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y))))) (_ : Derive_inv R (cons e w) y), @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) (cons e w)) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) (cons e w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y)))) *)
intros x0 w Hyp_rec.
(* Goal: forall _ : Derive_inv R (cons x0 w) y, @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) (cons x0 w)) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) (cons x0 w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y)))) *)
unfold Derive_inv in |- *.
(* Goal: forall _ : or (@ex2 Word (fun u : Word => dans (couple x0 (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons x0 v) (cons x0 w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons x0 v) y)), @ex Elt (fun A : Elt => @ex2 Word (fun w0 : Word => @eq Word (cons A w0) (cons x0 w)) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) (cons x0 w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons A v) y)))) *)
exists x0.
(* Goal: @ex2 Word (fun w0 : Word => @eq Word (cons x0 w0) (cons x0 w)) (fun w0 : Word => or (@ex2 Word (fun u : Word => dans (couple x0 (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons x0 v) (cons x0 w)) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w0 v) (fun v : Word => @eq Word (cons x0 v) y))) *)
exists w; trivial.
Qed.
Lemma Derive_inv3 :
forall (R : Ensf) (x y : Word),
Derive R x y ->
exists A : _,
(exists2 w : _,
cons A w = x &
(exists2 u : _,
dans (couple A (word u)) R &
(exists2 v : _, cons A v = x & Append u v = y)) \/
(exists2 v : _, Derive R w v & cons A v = y)).
Proof.
(* Goal: forall (R : Ensf) (x y : Word) (_ : Derive R x y), @ex Elt (fun A : Elt => @ex2 Word (fun w : Word => @eq Word (cons A w) x) (fun w : Word => or (@ex2 Word (fun u : Word => dans (couple A (word u)) R) (fun u : Word => @ex2 Word (fun v : Word => @eq Word (cons A v) x) (fun v : Word => @eq Word (Append u v) y))) (@ex2 Word (fun v : Word => Derive R w v) (fun v : Word => @eq Word (cons A v) y)))) *)
prolog [ Derive_inv1 Derive Derive_inv2 ] 7.
Qed.
Lemma in_mon_X_Der_imp_inmon_X :
forall (X V R : Ensf) (u v : Word),
Regles X V R ->
Derive R u v -> inmonoid (union X V) u -> inmonoid (union X V) v.
Proof.
(* Goal: forall (X V R : Ensf) (u v : Word) (_ : Regles X V R) (_ : Derive R u v) (_ : inmonoid (union X V) u), inmonoid (union X V) v *)
intros X V1 R1 u v Regles_R1 Der_R1.
(* Goal: forall _ : inmonoid (union X V1) u, inmonoid (union X V1) v *)
elim Der_R1; prolog [ Regles_inv2 inmonoid_cons_inv inmonoid_cons_inv2 inmonoid_cons inmonoid_Append ] 10.
Qed.
Definition Derivestar (R : Ensf) := Rstar Word (Derive R).
Hint Unfold Derivestar.
Lemma Derivestar_refl : forall (R : Ensf) (u : Word), Derivestar R u u.
Proof.
(* Goal: forall (R : Ensf) (u : Word), Derivestar R u u *)
auto.
Qed.
Hint Resolve Derivestar_refl.
Lemma Derivestar_R :
forall (R : Ensf) (u v w : Word),
Derive R u v -> Derivestar R v w -> Derivestar R u w.
Proof.
(* Goal: forall (R : Ensf) (u v w : Word) (_ : Derive R u v) (_ : Derivestar R v w), Derivestar R u w *)
unfold Derivestar in |- *.
(* Goal: forall (R : Ensf) (u v w : Word) (_ : Derive R u v) (_ : Rstar Word (Derive R) v w), Rstar Word (Derive R) u w *)
prolog [ Rstar_R ] 8.
Qed.
Lemma Derivestar_inv :
forall (R : Ensf) (u v : Word),
Derivestar R u v ->
u = v \/ (exists2 w : Word, Derive R u w & Derivestar R w v).
Proof.
(* Goal: forall (R : Ensf) (u v : Word) (_ : Derivestar R u v), or (@eq Word u v) (@ex2 Word (fun w : Word => Derive R u w) (fun w : Word => Derivestar R w v)) *)
unfold Derivestar in |- *.
(* Goal: forall (R : Ensf) (u v : Word) (_ : Rstar Word (Derive R) u v), or (@eq Word u v) (@ex2 Word (fun w : Word => Derive R u w) (fun w : Word => Rstar Word (Derive R) w v)) *)
prolog [ Rstar_inv ] 6.
Qed.
Hint Resolve Derivestar_inv.
Lemma Derivestar_inclus :
forall (R1 R2 : Ensf) (u v : Word),
inclus R1 R2 -> Derivestar R1 u v -> Derivestar R2 u v.
Proof.
(* Goal: forall (R1 R2 : Ensf) (u v : Word) (_ : inclus R1 R2) (_ : Derivestar R1 u v), Derivestar R2 u v *)
intros R1 R2 u v inclus_R1_R2 Der_R1.
(* Goal: Derivestar R2 u v *)
unfold Derivestar, Rstar in Der_R1.
(* Goal: Derivestar R2 u v *)
pattern u, v in |- *.
(* Goal: (fun w w0 : Word => Derivestar R2 w w0) u v *)
apply Der_R1.
(* Goal: forall (u v w : Word) (_ : Derive R1 u v) (_ : Derivestar R2 v w), Derivestar R2 u w *)
(* Goal: forall u : Word, Derivestar R2 u u *)
auto.
(* Goal: forall (u v w : Word) (_ : Derive R1 u v) (_ : Derivestar R2 v w), Derivestar R2 u w *)
intros; prolog [ Derive_inclus Derivestar_R ] 3.
Qed.
Definition LG (X V R : Ensf) (S : Elt) : wordset :=
fun w : Word => Derivestar R (cons S nil) w /\ inmonoid X w.
Lemma LG_inv :
forall (X V R : Ensf) (S : Elt) (w : Word), LG X V R S w -> inmonoid X w.
Proof.
(* Goal: forall (X V R : Ensf) (S : Elt) (w : Word) (_ : LG X V R S w), inmonoid X w *)
unfold LG in |- *.
(* Goal: forall (X _ : Ensf) (R : Ensf) (S : Elt) (w : Word) (_ : and (Derivestar R (cons S nil) w) (inmonoid X w)), inmonoid X w *)
intros.
(* Goal: inmonoid X w *)
elim H; auto.
Qed.
Lemma LG_langage :
forall (X V R : Ensf) (S : Elt), isGram X V R S -> islanguage X (LG X V R S).
Proof.
(* Goal: forall (X V R : Ensf) (S : Elt) (_ : isGram X V R S), islanguage X (LG X V R S) *)
intros; red in |- *; intros; elim H0; auto.
Qed.
Definition Gunion (V1 R1 V2 R2 : Ensf) := (union V1 V2, union R1 R2).
Section injprod.
Let injproduc (f : Elt -> Elt) (V : Ensf) := extension V f.
Definition injproducg : Ensf -> Elt -> Elt := injproduc injgauche.
Definition injproducd : Ensf -> Elt -> Elt := injproduc injdroite.
End injprod.
Definition Gunion_disj_p (V1 R1 : Ensf) (S1 : Elt)
(V2 R2 : Ensf) (S2 S : Elt) :=
(add S (fst (Gunion V1 R1 V2 R2)),
(add (couple S (word (cons S1 nil)))
(add (couple S (word (cons S2 nil))) (snd (Gunion V1 R1 V2 R2))), S)).
Definition imageGram (f : Elt -> Elt) (X V R : Ensf)
(S : Elt) :=
(map f X,
(map f V,
(map
(fun P : Elt =>
couple (f (first P))
((fun w : Elt => word (Word_ext f (word_inv w))) (second P))) R,
f S))).
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_angleorderrespectscongruence2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_angletrichotomy.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_06a :
forall A B C,
Triangle A B C -> CongA A B C A C B ->
~ Lt A C A B.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @CongA Ax0 A B C A C B), not (@Lt Ax0 A C A B) *)
intros.
(* Goal: not (@Lt Ax0 A C A B) *)
assert (neq A B) by (forward_using lemma_angledistinct).
(* Goal: not (@Lt Ax0 A C A B) *)
assert (neq A C) by (forward_using lemma_angledistinct).
(* Goal: not (@Lt Ax0 A C A B) *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: not (@Lt Ax0 A C A B) *)
assert (neq C A) by (conclude lemma_inequalitysymmetric).
(* Goal: not (@Lt Ax0 A C A B) *)
assert (neq B C) by (forward_using lemma_angledistinct).
(* Goal: not (@Lt Ax0 A C A B) *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: not (@Lt Ax0 A C A B) *)
assert (~ Lt A C A B).
(* Goal: not (@Lt Ax0 A C A B) *)
(* Goal: not (@Lt Ax0 A C A B) *)
{
(* Goal: not (@Lt Ax0 A C A B) *)
intro.
(* Goal: False *)
assert (Cong B A A B) by (conclude cn_equalityreverse).
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists D, (BetS B D A /\ Cong B D A C)) by (conclude proposition_03);destruct Tf as [D];spliter.
(* Goal: False *)
assert (Cong D B A C) by (forward_using lemma_congruenceflip).
(* Goal: False *)
assert (Cong B C B C) by (conclude cn_congruencereflexive).
(* Goal: False *)
assert (Out B A D) by (conclude lemma_ray4).
(* Goal: False *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Out B C C) by (conclude lemma_ray4).
(* Goal: False *)
assert (nCol A B C) by (conclude_def Triangle ).
(* Goal: False *)
assert (CongA A B C A B C) by (conclude lemma_equalanglesreflexive).
(* Goal: False *)
assert (CongA A B C D B C) by (conclude lemma_equalangleshelper).
(* Goal: False *)
assert (CongA D B C A B C) by (conclude lemma_equalanglessymmetric).
(* Goal: False *)
assert (CongA D B C A C B) by (conclude lemma_equalanglestransitive).
(* Goal: False *)
assert (Cong B D C A) by (forward_using lemma_congruenceflip).
(* Goal: False *)
assert (Cong B C C B) by (conclude cn_equalityreverse).
(* Goal: False *)
assert ((Cong D C A B /\ CongA B D C C A B /\ CongA B C D C B A)) by (conclude proposition_04).
(* Goal: False *)
assert (~ Col C B A).
(* Goal: False *)
(* Goal: not (@Col Ax0 C B A) *)
{
(* Goal: not (@Col Ax0 C B A) *)
intro.
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: not (@Lt Ax0 A C A B) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (CongA C B A A B C) by (conclude lemma_ABCequalsCBA).
(* Goal: False *)
assert (CongA B C D A B C) by (conclude lemma_equalanglestransitive).
(* Goal: False *)
assert (CongA B C D A C B) by (conclude lemma_equalanglestransitive).
(* Goal: False *)
assert (~ Col A C B).
(* Goal: False *)
(* Goal: not (@Col Ax0 A C B) *)
{
(* Goal: not (@Col Ax0 A C B) *)
intro.
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: not (@Lt Ax0 A C A B) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (CongA A C B B C A) by (conclude lemma_ABCequalsCBA).
(* Goal: False *)
assert (CongA B C D B C A) by (conclude lemma_equalanglestransitive).
(* Goal: False *)
assert (CongA B C A B C D) by (conclude lemma_equalanglessymmetric).
(* Goal: False *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: False *)
assert (Out C B B) by (conclude lemma_ray4).
(* Goal: False *)
assert (Out C A A) by (conclude lemma_ray4).
(* Goal: False *)
assert (~ Col B C D).
(* Goal: False *)
(* Goal: not (@Col Ax0 B C D) *)
{
(* Goal: not (@Col Ax0 B C D) *)
intro.
(* Goal: False *)
assert (Col B D A) by (conclude_def Col ).
(* Goal: False *)
assert (Col D B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col D B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq D B) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col B A C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: not (@Lt Ax0 A C A B) *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (CongA B C D B C D) by (conclude lemma_equalanglesreflexive).
(* Goal: False *)
assert (LtA B C D B C A) by (conclude_def LtA ).
(* Goal: False *)
assert (LtA B C A B C A) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: False *)
assert (~ LtA B C A B C A) by (conclude lemma_angletrichotomy).
(* Goal: False *)
contradict.
(* BG Goal: not (@Lt Ax0 A C A B) *)
}
(* Goal: not (@Lt Ax0 A C A B) *)
close.
Qed.
End Euclid.
|
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Standard Proposition Elimination Names.
Require Export Zring.
Require Export Group_kernel.
Section Int_power.
Variable G : GROUP.
Set Strict Implicit.
Unset Implicit Arguments.
Definition group_square (x : G) : G := sgroup_law G x x.
Set Implicit Arguments.
Unset Strict Implicit.
End Int_power.
Section Zup1.
Variable G : GROUP.
Variable r : G.
Fixpoint nat_to_group (n : nat) : G :=
match n with
| O => monoid_unit G
| S n' => sgroup_law G (nat_to_group n') r
end.
Definition pos_abs : forall x : Z, (x > 0)%Z -> positive.
Proof.
(* Goal: forall (x : Z) (_ : Z.gt x Z0), positive *)
intros x; try assumption.
(* Goal: forall _ : Z.gt x Z0, positive *)
case x.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), positive *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), positive *)
(* Goal: forall _ : Z.gt Z0 Z0, positive *)
intros H'; red in H'.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), positive *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), positive *)
(* Goal: positive *)
simpl in H'.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), positive *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), positive *)
(* Goal: positive *)
inversion H'.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), positive *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), positive *)
intros p H'.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), positive *)
(* Goal: positive *)
exact p.
(* Goal: forall (p : positive) (_ : Z.gt (Zneg p) Z0), positive *)
intros p H'; red in H'.
(* Goal: positive *)
simpl in H'.
(* Goal: positive *)
inversion H'.
Qed.
Lemma pos_abs_ok : forall (x : Z) (px : (x > 0)%Z), x = Zpos (pos_abs px).
Proof.
(* Goal: forall (x : Z) (px : Z.gt x Z0), @eq Z x (Zpos (@pos_abs x px)) *)
intros x; try assumption.
(* Goal: forall px : Z.gt x Z0, @eq Z x (Zpos (@pos_abs x px)) *)
elim x.
(* Goal: forall (p : positive) (px : Z.gt (Zneg p) Z0), @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
(* Goal: forall (p : positive) (px : Z.gt (Zpos p) Z0), @eq Z (Zpos p) (Zpos (@pos_abs (Zpos p) px)) *)
(* Goal: forall px : Z.gt Z0 Z0, @eq Z Z0 (Zpos (@pos_abs Z0 px)) *)
intros px; red in px.
(* Goal: forall (p : positive) (px : Z.gt (Zneg p) Z0), @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
(* Goal: forall (p : positive) (px : Z.gt (Zpos p) Z0), @eq Z (Zpos p) (Zpos (@pos_abs (Zpos p) px)) *)
(* Goal: @eq Z Z0 (Zpos (@pos_abs Z0 px)) *)
simpl in px.
(* Goal: forall (p : positive) (px : Z.gt (Zneg p) Z0), @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
(* Goal: forall (p : positive) (px : Z.gt (Zpos p) Z0), @eq Z (Zpos p) (Zpos (@pos_abs (Zpos p) px)) *)
(* Goal: @eq Z Z0 (Zpos (@pos_abs Z0 px)) *)
inversion px.
(* Goal: forall (p : positive) (px : Z.gt (Zneg p) Z0), @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
(* Goal: forall (p : positive) (px : Z.gt (Zpos p) Z0), @eq Z (Zpos p) (Zpos (@pos_abs (Zpos p) px)) *)
simpl in |- *.
(* Goal: forall (p : positive) (px : Z.gt (Zneg p) Z0), @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
(* Goal: forall (p : positive) (_ : Z.gt (Zpos p) Z0), @eq Z (Zpos p) (Zpos p) *)
auto with *.
(* Goal: forall (p : positive) (px : Z.gt (Zneg p) Z0), @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
intros p px; red in px.
(* Goal: @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
simpl in px.
(* Goal: @eq Z (Zneg p) (Zpos (@pos_abs (Zneg p) px)) *)
inversion px.
Qed.
Lemma Zlt_reg_l : forall a b c : Z, (a < b)%Z -> (c + a < c + b)%Z.
Proof.
(* Goal: forall (a b c : Z) (_ : Z.lt a b), Z.lt (Z.add c a) (Z.add c b) *)
intros a b c; try assumption.
(* Goal: forall _ : Z.lt a b, Z.lt (Z.add c a) (Z.add c b) *)
unfold Zlt, not in |- *.
(* Goal: forall _ : @eq comparison (Z.compare a b) Lt, @eq comparison (Z.compare (Z.add c a) (Z.add c b)) Lt *)
intros H'; try assumption.
(* Goal: @eq comparison (Z.compare (Z.add c a) (Z.add c b)) Lt *)
rewrite <- H'.
(* Goal: @eq comparison (Z.compare (Z.add c a) (Z.add c b)) (Z.compare a b) *)
apply Zcompare_plus_compat; assumption.
Qed.
Lemma Zlemma1 : forall x : Z, (x < 0)%Z -> (- x > 0)%Z.
Proof.
(* Goal: forall (x : Z) (_ : Z.lt x Z0), Z.gt (Z.opp x) Z0 *)
intros x H'; try assumption.
(* Goal: Z.gt (Z.opp x) Z0 *)
apply Zlt_gt.
(* Goal: Z.lt Z0 (Z.opp x) *)
replace (- x)%Z with (- x + 0)%Z.
(* Goal: @eq Z (Z.add (Z.opp x) Z0) (Z.opp x) *)
(* Goal: Z.lt Z0 (Z.add (Z.opp x) Z0) *)
pattern 0%Z at 1 in |- *.
(* Goal: @eq Z (Z.add (Z.opp x) Z0) (Z.opp x) *)
(* Goal: (fun z : Z => Z.lt z (Z.add (Z.opp x) Z0)) Z0 *)
replace 0%Z with (- x + x)%Z.
(* Goal: @eq Z (Z.add (Z.opp x) Z0) (Z.opp x) *)
(* Goal: @eq Z (Z.add (Z.opp x) x) Z0 *)
(* Goal: Z.lt (Z.add (Z.opp x) x) (Z.add (Z.opp x) Z0) *)
apply Zlt_reg_l.
(* Goal: @eq Z (Z.add (Z.opp x) Z0) (Z.opp x) *)
(* Goal: @eq Z (Z.add (Z.opp x) x) Z0 *)
(* Goal: Z.lt x Z0 *)
auto with *.
(* Goal: @eq Z (Z.add (Z.opp x) Z0) (Z.opp x) *)
(* Goal: @eq Z (Z.add (Z.opp x) x) Z0 *)
apply Zplus_opp_l.
(* Goal: @eq Z (Z.add (Z.opp x) Z0) (Z.opp x) *)
apply Zplus_0_r.
Qed.
Comments "The powers of" r ".".
Definition Z_to_group_nat_fun : ZZ -> G.
Proof.
(* Goal: forall _ : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
intros x.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
case (Z_gt_le_dec x 0); intros z.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
exact (nat_to_group (nat_of_P (pos_abs z))).
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
case (Z_le_lt_eq_dec _ _ z); intros.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
cut (- x > 0)%Z.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.gt (Z.opp x) Z0 *)
(* Goal: forall _ : Z.gt (Z.opp x) Z0, Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
intros H'.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.gt (Z.opp x) Z0 *)
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
exact (group_inverse G (nat_to_group (nat_of_P (pos_abs H')))).
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.gt (Z.opp x) Z0 *)
apply Zlemma1.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.lt x Z0 *)
auto with *.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
exact (monoid_unit G).
Qed.
Lemma nat_to_group_com :
forall n : nat,
Equal (sgroup_law G (nat_to_group n) r) (sgroup_law G r (nat_to_group n)).
Proof.
(* Goal: forall n : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (nat_to_group n)) *)
simple induction n; simpl in |- *; auto with *.
(* Goal: forall (n : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (nat_to_group n))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) *)
apply Trans with r; auto with *.
(* Goal: forall (n : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (nat_to_group n))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
intros n0 H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r) r) (sgroup_law (monoid_sgroup (group_monoid G)) r (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (sgroup_law G r (nat_to_group n0)) r); auto with *.
Qed.
Hint Resolve nat_to_group_com: algebra.
Lemma nat_to_group_add :
forall n m : nat,
Equal (nat_to_group (n + m))
(sgroup_law G (nat_to_group n) (nat_to_group m)).
Proof.
(* Goal: forall n m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.add n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m)) *)
simple induction n; simpl in |- *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.add n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add n m)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (nat_to_group m)) *)
(* Goal: forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (nat_to_group m)) *)
auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.add n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add n m)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (nat_to_group m)) *)
intros n0 H' m; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add n0 m)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r) (nat_to_group m)) *)
apply Trans with (sgroup_law G (nat_to_group n0) (sgroup_law G r (nat_to_group m))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add n0 m)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) r (nat_to_group m))) *)
apply Trans with (sgroup_law G (nat_to_group n0) (sgroup_law G (nat_to_group m) r)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add n0 m)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) r)) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group n0) (nat_to_group m)) r); auto with *.
Qed.
Hint Resolve nat_to_group_add: algebra.
Lemma ax1 : ~ (0 > 0)%Z.
Proof.
(* Goal: not (Z.gt Z0 Z0) *)
red in |- *.
(* Goal: forall _ : Z.gt Z0 Z0, False *)
intros H'; try assumption.
(* Goal: False *)
red in H'.
(* Goal: False *)
simpl in H'.
(* Goal: False *)
inversion H'.
Qed.
Hint Resolve ax1: algebra.
Lemma ax2 : ~ (0 < 0)%Z.
Proof.
(* Goal: not (Z.lt Z0 Z0) *)
red in |- *.
(* Goal: forall _ : Z.lt Z0 Z0, False *)
intros H'; try assumption.
(* Goal: False *)
red in H'.
(* Goal: False *)
simpl in H'.
(* Goal: False *)
inversion H'.
Qed.
Hint Resolve ax2: algebra.
Lemma Zl1 : Equal (Z_to_group_nat_fun 0%Z) (monoid_unit G).
Proof.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun Z0) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
unfold Z_to_group_nat_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_gt_le_dec Z0 Z0 with | left z => nat_to_group (Pos.to_nat (@pos_abs Z0 z)) | right z => match Z_le_lt_eq_dec Z0 Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
case (Z_gt_le_dec 0 0).
(* Goal: forall l : Z.le Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec Z0 Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall g : Z.gt Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs Z0 g))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros z; try assumption.
(* Goal: forall l : Z.le Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec Z0 Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs Z0 z))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
absurd (0 > 0)%Z; auto with *.
(* Goal: forall l : Z.le Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec Z0 Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros z; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec Z0 Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
case (Z_le_lt_eq_dec 0 0 z).
(* Goal: forall _ : @eq Z Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall l : Z.lt Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 l))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
intros z0; try assumption.
(* Goal: forall _ : @eq Z Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp Z0) (@Zlemma1 Z0 z0))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
absurd (0 < 0)%Z; auto with *.
(* Goal: forall _ : @eq Z Z0 Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with *.
Qed.
Hint Resolve Zl1: algebra.
Lemma ax3 : forall p : positive, (Zpos p > 0)%Z.
Proof.
(* Goal: forall p : positive, Z.gt (Zpos p) Z0 *)
intros p; try assumption.
(* Goal: Z.gt (Zpos p) Z0 *)
red in |- *.
(* Goal: @eq comparison (Z.compare (Zpos p) Z0) Gt *)
simpl in |- *.
(* Goal: @eq comparison Gt Gt *)
auto with *.
Qed.
Hint Resolve ax3: algebra.
Lemma Zl2 :
forall p : positive,
Equal (Z_to_group_nat_fun (Zpos p))
(nat_to_group (nat_of_P (pos_abs (ax3 p)))).
Proof.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos p)) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos p)) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
unfold Z_to_group_nat_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_gt_le_dec (Zpos p) Z0 with | left z => nat_to_group (Pos.to_nat (@pos_abs (Zpos p) z)) | right z => match Z_le_lt_eq_dec (Zpos p) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zpos p)) (@Zlemma1 (Zpos p) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
case (Z_gt_le_dec (Zpos p) 0); intros z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (Zpos p) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zpos p)) (@Zlemma1 (Zpos p) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) z))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
simpl in |- *; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (Zpos p) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zpos p)) (@Zlemma1 (Zpos p) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
case (Z_le_lt_eq_dec (Zpos p) 0 z); intros.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zpos p)) (@Zlemma1 (Zpos p) l))))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
absurd (Zpos p < 0)%Z; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) *)
inversion e.
Qed.
Hint Resolve Zl2: algebra.
Lemma ax4 : forall p : positive, ~ (Zneg p > 0)%Z.
Proof.
(* Goal: forall p : positive, not (Z.gt (Zneg p) Z0) *)
intros p; red in |- *.
(* Goal: forall _ : Z.gt (Zneg p) Z0, False *)
intros H'; try assumption.
(* Goal: False *)
red in H'.
(* Goal: False *)
simpl in H'.
(* Goal: False *)
inversion H'.
Qed.
Hint Resolve ax4: algebra.
Lemma Zl3 :
forall p : positive,
Equal (Z_to_group_nat_fun (Zneg p))
(group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p))))).
Proof.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg p)) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg p)) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
unfold Z_to_group_nat_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_gt_le_dec (Zneg p) Z0 with | left z => nat_to_group (Pos.to_nat (@pos_abs (Zneg p) z)) | right z => match Z_le_lt_eq_dec (Zneg p) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zneg p)) (@Zlemma1 (Zneg p) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
case (Z_gt_le_dec (Zneg p) 0); intros z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (Zneg p) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zneg p)) (@Zlemma1 (Zneg p) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zneg p) z))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
absurd (Zneg p > 0)%Z; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (Zneg p) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zneg p)) (@Zlemma1 (Zneg p) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
case (Z_le_lt_eq_dec (Zneg p) 0 z); intros.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (Zneg p)) (@Zlemma1 (Zneg p) l))))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
simpl in |- *; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) *)
inversion e.
Qed.
Hint Resolve Zl3: algebra.
Lemma ax5 :
forall p q : positive,
(Zpos p > Zpos q)%Z -> (Zpos p + Zneg q)%Z = Zpos (p - q).
Proof.
(* Goal: forall (p q : positive) (_ : Z.gt (Zpos p) (Zpos q)), @eq Z (Z.add (Zpos p) (Zneg q)) (Zpos (Pos.sub p q)) *)
intros p q H'; red in H'.
(* Goal: @eq Z (Z.add (Zpos p) (Zneg q)) (Zpos (Pos.sub p q)) *)
simpl in H'.
(* Goal: @eq Z (Z.add (Zpos p) (Zneg q)) (Zpos (Pos.sub p q)) *)
simpl in |- *.
(* Goal: @eq Z (Z.pos_sub p q) (Zpos (Pos.sub p q)) *)
rewrite Z.pos_sub_spec.
(* Goal: @eq Z match Pos.compare p q with | Eq => Z0 | Lt => Zneg (Pos.sub q p) | Gt => Zpos (Pos.sub p q) end (Zpos (Pos.sub p q)) *)
rewrite H'.
(* Goal: @eq Z (Zpos (Pos.sub p q)) (Zpos (Pos.sub p q)) *)
auto with *.
Qed.
Lemma ax6 :
forall p q : positive,
(Zpos p < Zpos q)%Z -> (Zpos p + Zneg q)%Z = Zneg (q - p).
Proof.
(* Goal: forall (p q : positive) (_ : Z.lt (Zpos p) (Zpos q)), @eq Z (Z.add (Zpos p) (Zneg q)) (Zneg (Pos.sub q p)) *)
intros p q H'; red in H'.
(* Goal: @eq Z (Z.add (Zpos p) (Zneg q)) (Zneg (Pos.sub q p)) *)
simpl in H'.
(* Goal: @eq Z (Z.add (Zpos p) (Zneg q)) (Zneg (Pos.sub q p)) *)
simpl in |- *.
(* Goal: @eq Z (Z.pos_sub p q) (Zneg (Pos.sub q p)) *)
rewrite Z.pos_sub_spec.
(* Goal: @eq Z match Pos.compare p q with | Eq => Z0 | Lt => Zneg (Pos.sub q p) | Gt => Zpos (Pos.sub p q) end (Zneg (Pos.sub q p)) *)
rewrite H'.
(* Goal: @eq Z (Zneg (Pos.sub q p)) (Zneg (Pos.sub q p)) *)
auto with *.
Qed.
Lemma ax7 : forall p : positive, (Zpos p + Zneg p)%Z = 0%Z.
Proof.
(* Goal: forall p : positive, @eq Z (Z.add (Zpos p) (Zneg p)) Z0 *)
intros p; try assumption.
(* Goal: @eq Z (Z.add (Zpos p) (Zneg p)) Z0 *)
simpl in |- *.
(* Goal: @eq Z (Z.pos_sub p p) Z0 *)
rewrite Z.pos_sub_spec; unfold Pos.compare.
(* Goal: @eq Z match Pos.compare_cont Eq p p with | Eq => Z0 | Lt => Zneg (Pos.sub p p) | Gt => Zpos (Pos.sub p p) end Z0 *)
replace (Pcompare p p Datatypes.Eq) with Datatypes.Eq.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq p p) *)
(* Goal: @eq Z Z0 Z0 *)
auto with *.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq p p) *)
elim p.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq xH xH) *)
(* Goal: forall (p : positive) (_ : @eq comparison Eq (Pos.compare_cont Eq p p)), @eq comparison Eq (Pos.compare_cont Eq (xO p) (xO p)) *)
(* Goal: forall (p : positive) (_ : @eq comparison Eq (Pos.compare_cont Eq p p)), @eq comparison Eq (Pos.compare_cont Eq (xI p) (xI p)) *)
intros p0; simpl in |- *.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq xH xH) *)
(* Goal: forall (p : positive) (_ : @eq comparison Eq (Pos.compare_cont Eq p p)), @eq comparison Eq (Pos.compare_cont Eq (xO p) (xO p)) *)
(* Goal: forall _ : @eq comparison Eq (Pos.compare_cont Eq p0 p0), @eq comparison Eq (Pos.compare_cont Eq p0 p0) *)
auto with *.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq xH xH) *)
(* Goal: forall (p : positive) (_ : @eq comparison Eq (Pos.compare_cont Eq p p)), @eq comparison Eq (Pos.compare_cont Eq (xO p) (xO p)) *)
intros p0; simpl in |- *.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq xH xH) *)
(* Goal: forall _ : @eq comparison Eq (Pos.compare_cont Eq p0 p0), @eq comparison Eq (Pos.compare_cont Eq p0 p0) *)
auto with *.
(* Goal: @eq comparison Eq (Pos.compare_cont Eq xH xH) *)
simpl in |- *.
(* Goal: @eq comparison Eq Eq *)
auto with *.
Qed.
Hint Resolve ax7 ax6 ax5: algebra.
Lemma nat_to_group_com2 :
forall n m : nat,
Equal (sgroup_law G (nat_to_group n) (nat_to_group m))
(sgroup_law G (nat_to_group m) (nat_to_group n)).
Proof.
(* Goal: forall n m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group n)) *)
simple induction n; simpl in |- *; auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group n))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
(* Goal: forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) *)
intros m; try assumption.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group n))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) *)
apply Trans with (nat_to_group m); auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group n))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
intros n0 H' m; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (nat_to_group n0) (sgroup_law G r (nat_to_group m))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) r (nat_to_group m))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (nat_to_group n0) (sgroup_law G (nat_to_group m) r)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) r)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group n0) (nat_to_group m)) r); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (nat_to_group m)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group m) (nat_to_group n0)) r); auto with *.
Qed.
Hint Resolve nat_to_group_com2: algebra.
Lemma nat_to_group_minus :
forall n m : nat,
n > m ->
Equal (nat_to_group (n - m))
(sgroup_law G (nat_to_group n) (group_inverse G (nat_to_group m))).
Proof.
(* Goal: forall (n m : nat) (_ : gt n m), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (group_inverse G (nat_to_group m))) *)
intros n m H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (group_inverse G (nat_to_group m))) *)
replace n with (m + (n - m)).
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub (Init.Nat.add m (Init.Nat.sub n m)) m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add m (Init.Nat.sub n m))) (group_inverse G (nat_to_group m))) *)
rewrite minus_plus.
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.add m (Init.Nat.sub n m))) (group_inverse G (nat_to_group m))) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group m) (nat_to_group (n - m))) (group_inverse G (nat_to_group m))); auto with *.
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub n m)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group (Init.Nat.sub n m))) (group_inverse G (nat_to_group m))) *)
apply GROUP_reg_right with (nat_to_group m); auto with *.
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.sub n m)) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group (Init.Nat.sub n m))) (group_inverse G (nat_to_group m))) (nat_to_group m)) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group m) (nat_to_group (n - m))) (sgroup_law G (group_inverse G (nat_to_group m)) (nat_to_group m))); auto with *.
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.sub n m)) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group (Init.Nat.sub n m))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group m)) (nat_to_group m))) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group m) (nat_to_group (n - m))) (monoid_unit G)); auto with *.
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Init.Nat.sub n m)) (nat_to_group m)) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (nat_to_group (Init.Nat.sub n m))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) *)
apply Trans with (sgroup_law G (nat_to_group m) (nat_to_group (n - m))); auto with *.
(* Goal: @eq nat (Init.Nat.add m (Init.Nat.sub n m)) n *)
auto with *.
Qed.
Hint Resolve nat_to_group_minus: algebra.
Lemma ax8 :
forall p q : positive,
Pcompare p q Datatypes.Eq = Datatypes.Lt ->
Proof.
(* Goal: forall (p q : positive) (_ : @eq comparison (Pos.compare_cont Eq p q) Lt), @eq comparison (Pos.compare_cont Eq q p) Gt *)
intros p q H'; try assumption.
(* Goal: @eq comparison (Pos.compare_cont Eq q p) Gt *)
apply nat_of_P_gt_Gt_compare_complement_morphism.
(* Goal: gt (Pos.to_nat q) (Pos.to_nat p) *)
red in |- *.
(* Goal: lt (Pos.to_nat p) (Pos.to_nat q) *)
apply nat_of_P_lt_Lt_compare_morphism; auto with *.
Qed.
Hint Resolve ax8: algebra.
Lemma Zl4 :
forall p p0 : positive,
Equal (Z_to_group_nat_fun (Zpos p + Zneg p0)%Z)
(sgroup_law G (nat_to_group (nat_of_P p))
(group_inverse G (nat_to_group (nat_of_P p0)))).
Proof.
(* Goal: forall p p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
intros p p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
case (Z_gt_le_dec (Zpos p) (Zpos p0)); intros z.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
rewrite ax5; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos (Pos.sub p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply Trans with (nat_to_group (nat_of_P (pos_abs (ax3 (p - p0))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos (Pos.sub p p0)) (ax3 (Pos.sub p p0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (Pos.sub p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
rewrite nat_of_P_minus_morphism; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub (Pos.to_nat p) (Pos.to_nat p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply nat_to_group_minus.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: gt (Pos.to_nat p) (Pos.to_nat p0) *)
apply nat_of_P_gt_Gt_compare_morphism.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @eq comparison (Pos.compare_cont Eq p p0) Gt *)
auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
case (Z_le_lt_eq_dec _ _ z); intros.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
rewrite ax6; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg (Pos.sub p0 p))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply Trans with (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 (p0 - p)))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos (Pos.sub p0 p)) (ax3 (Pos.sub p0 p)))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (Pos.sub p0 p)))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
rewrite nat_of_P_minus_morphism; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Init.Nat.sub (Pos.to_nat p0) (Pos.to_nat p)))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply Trans with (group_inverse G (sgroup_law G (nat_to_group (nat_of_P p0)) (group_inverse G (nat_to_group (nat_of_P p))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Init.Nat.sub (Pos.to_nat p0) (Pos.to_nat p)))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p))))) *)
apply GROUP_comp.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.sub (Pos.to_nat p0) (Pos.to_nat p))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p)))) *)
apply nat_to_group_minus.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: gt (Pos.to_nat p0) (Pos.to_nat p) *)
apply nat_of_P_gt_Gt_compare_morphism.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Gt *)
auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p0)) (group_inverse G (nat_to_group (Pos.to_nat p))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply Trans with (sgroup_law G (group_inverse G (group_inverse G (nat_to_group (nat_of_P p)))) (group_inverse G (nat_to_group (nat_of_P p0)))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
injection e.
(* Goal: forall _ : @eq positive p p0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
intros H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
rewrite <- H'.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p) (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p)))) *)
rewrite ax7.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun Z0) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (group_inverse G (nat_to_group (Pos.to_nat p)))) *)
apply Trans with (monoid_unit G); auto with *.
Qed.
Hint Resolve Zl4: algebra.
Lemma nat_to_group_com3 :
forall n : nat,
Equal (sgroup_law G (nat_to_group n) (group_inverse G r))
(sgroup_law G (group_inverse G r) (nat_to_group n)).
Proof.
(* Goal: forall n : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (nat_to_group n)) *)
simple induction n; simpl in |- *; auto with *.
(* Goal: forall (n : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (nat_to_group n))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) *)
apply Trans with (group_inverse G r); auto with *.
(* Goal: forall (n : nat) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (nat_to_group n))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) *)
intros n0 H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r) (group_inverse G r)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (nat_to_group n0) (sgroup_law G r (group_inverse G r))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) r (group_inverse G r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (nat_to_group n0) (monoid_unit G)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (nat_to_group n0); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) *)
apply Trans with (sgroup_law G (group_inverse G r) (sgroup_law G r (nat_to_group n0))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) r (nat_to_group n0))) *)
apply Trans with (sgroup_law G (sgroup_law G (group_inverse G r) r) (nat_to_group n0)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group n0) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) r) (nat_to_group n0)) *)
apply Trans with (sgroup_law G (monoid_unit G) (nat_to_group n0)); auto with *.
Qed.
Hint Resolve nat_to_group_com3: algebra.
Lemma Zl5 : Equal (Z_to_group_nat_fun (ring_unit ZZ)) r.
Proof.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (ring_unit (cring_ring (idomain_ring ZZ)))) r *)
unfold Z_to_group_nat_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_gt_le_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 with | left z => nat_to_group (Pos.to_nat (@pos_abs (ring_unit (cring_ring (idomain_ring ZZ))) z)) | right z => match Z_le_lt_eq_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end r *)
case (Z_gt_le_dec (ring_unit ZZ) 0).
(* Goal: forall l : Z.le (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end r *)
(* Goal: forall g : Z.gt (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (ring_unit (cring_ring (idomain_ring ZZ))) g))) r *)
intros z; try assumption.
(* Goal: forall l : Z.le (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end r *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (ring_unit (cring_ring (idomain_ring ZZ))) z))) r *)
simpl in |- *.
(* Goal: forall l : Z.le (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end r *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) r *)
auto with *.
(* Goal: forall l : Z.le (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 l with | left l0 => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l0)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end r *)
intros z; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec (ring_unit (cring_ring (idomain_ring ZZ))) Z0 z with | left l => group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end r *)
case (Z_le_lt_eq_dec (ring_unit ZZ) 0 z).
(* Goal: forall _ : @eq Z (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r *)
(* Goal: forall l : Z.lt (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) l))))) r *)
intros z0; try assumption.
(* Goal: forall _ : @eq Z (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Z.opp (ring_unit (cring_ring (idomain_ring ZZ)))) (@Zlemma1 (ring_unit (cring_ring (idomain_ring ZZ))) z0))))) r *)
absurd (ring_unit ZZ < 0)%Z; auto with *.
(* Goal: forall _ : @eq Z (ring_unit (cring_ring (idomain_ring ZZ))) Z0, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r *)
intros H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r *)
inversion H'.
Qed.
Hint Resolve Zl5: algebra.
Lemma nat_to_group_com4 :
forall n m : nat,
Equal (sgroup_law G (nat_to_group m) (group_inverse G (nat_to_group n)))
(sgroup_law G (group_inverse G (nat_to_group n)) (nat_to_group m)).
Proof.
(* Goal: forall n m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n)) (nat_to_group m)) *)
simple induction n; simpl in |- *; auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n)) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) (nat_to_group m)) *)
(* Goal: forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (nat_to_group m)) *)
intros m; try assumption.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n)) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) (nat_to_group m)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (nat_to_group m)) *)
apply Trans with (sgroup_law G (nat_to_group m) (monoid_unit G)); auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n)) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) (nat_to_group m)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (nat_to_group m)) *)
apply Trans with (nat_to_group m); auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n)) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) (nat_to_group m)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (nat_to_group m)) *)
apply Trans with (sgroup_law G (monoid_unit G) (nat_to_group m)); auto with *.
(* Goal: forall (n : nat) (_ : forall m : nat, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n)) (nat_to_group m))) (m : nat), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n) r)) (nat_to_group m)) *)
intros n0 H' m; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) (nat_to_group m)) *)
apply Trans with (sgroup_law G (nat_to_group m) (sgroup_law G (group_inverse G r) (group_inverse G (nat_to_group n0)))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (group_inverse G (nat_to_group n0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) (nat_to_group m)) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group m) (group_inverse G r)) (group_inverse G (nat_to_group n0))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G r)) (group_inverse G (nat_to_group n0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) (nat_to_group m)) *)
apply Trans with (sgroup_law G (sgroup_law G (group_inverse G r) (nat_to_group m)) (group_inverse G (nat_to_group n0))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (nat_to_group m)) (group_inverse G (nat_to_group n0))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) (nat_to_group m)) *)
apply Trans with (sgroup_law G (group_inverse G r) (sgroup_law G (nat_to_group m) (group_inverse G (nat_to_group n0)))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group m) (group_inverse G (nat_to_group n0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) (nat_to_group m)) *)
apply Trans with (sgroup_law G (group_inverse G r) (sgroup_law G (group_inverse G (nat_to_group n0)) (nat_to_group m))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group n0)) (nat_to_group m))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group n0) r)) (nat_to_group m)) *)
apply Trans with (sgroup_law G (sgroup_law G (group_inverse G r) (group_inverse G (nat_to_group n0))) (nat_to_group m)); auto with *.
Qed.
Hint Resolve nat_to_group_com4: algebra.
Comments "The group morphism from the integers to an arbitrary group.".
Definition Z_to_group_nat : Hom (ZZ:GROUP) G.
Proof.
(* Goal: Carrier (@Hom GROUP (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))) : Ob GROUP) G) *)
apply (BUILD_HOM_GROUP (G:=ZZ:GROUP) (G':=G) (ff:=Z_to_group_nat_fun)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y)) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y)) *)
(* Goal: forall (x y : Z) (_ : @eq Z x y), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y) *)
intros x y H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y) *)
rewrite H'; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun x) (Z_to_group_nat_fun y)) *)
simple induction x; simple induction y; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zpos p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zpos p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun Z0)) *)
unfold sgroup_law at 1 in |- *; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zpos p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zpos p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun Z0) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun Z0)) *)
apply Trans with (sgroup_law G (Z_to_group_nat_fun 0%Z) (monoid_unit G)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zpos p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zpos p))) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zpos p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zpos p))) *)
rewrite Zplus_0_l.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos p)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zpos p))) *)
apply Trans with (sgroup_law G (monoid_unit G) (Z_to_group_nat_fun (Zpos p))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
intros p; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) Z0 (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
rewrite Zplus_0_l.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg p)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun Z0) (Z_to_group_nat_fun (Zneg p))) *)
apply Trans with (sgroup_law G (monoid_unit G) (Z_to_group_nat_fun (Zneg p))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
rewrite Zplus_0_r.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos p)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun Z0)) *)
apply Trans with (sgroup_law G (Z_to_group_nat_fun (Zpos p)) (monoid_unit G)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
unfold sgroup_law at 1 in |- *; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos (Pos.add p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
intros p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zpos (Pos.add p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
apply Trans with (nat_to_group (nat_of_P (pos_abs (ax3 (p + p0))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos (Pos.add p p0)) (ax3 (Pos.add p p0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zpos p0))) *)
apply Trans with (sgroup_law G (nat_to_group (nat_of_P (pos_abs (ax3 p)))) (nat_to_group (nat_of_P (pos_abs (ax3 p0))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos (Pos.add p p0)) (ax3 (Pos.add p p0))))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p)))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0))))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Pos.to_nat (Pos.add p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (nat_to_group (Pos.to_nat p0))) *)
rewrite nat_of_P_plus_morphism.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (nat_to_group (Init.Nat.add (Pos.to_nat p) (Pos.to_nat p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (nat_to_group (Pos.to_nat p0))) *)
auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
intros p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zpos p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zpos p)) (Z_to_group_nat_fun (Zneg p0))) *)
apply Trans with (sgroup_law G (nat_to_group (nat_of_P (pos_abs (ax3 p)))) (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p0)))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) Z0)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun Z0)) *)
apply Trans with (sgroup_law G (Z_to_group_nat_fun (Zneg p)) (monoid_unit G)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
intros p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zpos p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
rewrite Zplus_comm.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p0) (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zpos p0))) *)
apply Trans with (sgroup_law G (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p))))) (nat_to_group (nat_of_P (pos_abs (ax3 p0))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Z.add (Zpos p0) (Zneg p))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (nat_to_group (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0))))) *)
apply Trans with (sgroup_law G (nat_to_group (nat_of_P (pos_abs (ax3 p0)))) (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p)))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (sgroup_law (@Group_util.sg (Leibnitz_set Z) Z.add (fun (x x' y y' : Z) (H' : @eq Z x x') (H'0 : @eq Z y y') => @eq_ind_r Z y' (fun y0 : Z => @eq Z (Z.add x y0) (Z.add x' y')) (@eq_ind_r Z x' (fun x0 : Z => @eq Z (Z.add x0 y') (Z.add x' y')) (@eq_refl Z (Z.add x' y')) x H') y H'0) (fun x y z : Z => @Sym (Leibnitz_set Z) (Z.add x (Z.add y z)) (Z.add (Z.add x y) z) (@eq_ind_r Z (Z.add (Z.add x y) z) (fun z0 : Z => @eq Z z0 (Z.add (Z.add x y) z)) (@eq_refl Z (Z.add (Z.add x y) z)) (Z.add x (Z.add y z)) (Z.add_assoc x y z)))) (Zneg p) (Zneg p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
unfold sgroup_law at 1 in |- *; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg (Pos.add p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
simpl in |- *; auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall p0 : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg (Pos.add p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
intros p0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (Zneg (Pos.add p p0))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
apply Trans with (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 (p + p0)))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos (Pos.add p p0)) (ax3 (Pos.add p p0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_nat_fun (Zneg p)) (Z_to_group_nat_fun (Zneg p0))) *)
apply Trans with (sgroup_law G (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p))))) (group_inverse G (nat_to_group (nat_of_P (pos_abs (ax3 p0)))))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos (Pos.add p p0)) (ax3 (Pos.add p p0)))))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p) (ax3 p))))) (group_inverse G (nat_to_group (Pos.to_nat (@pos_abs (Zpos p0) (ax3 p0)))))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Pos.to_nat (Pos.add p p0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group (Pos.to_nat p))) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
rewrite nat_of_P_plus_morphism.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (nat_to_group (Init.Nat.add (Pos.to_nat p) (Pos.to_nat p0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group (Pos.to_nat p))) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply Trans with (group_inverse G (sgroup_law G (nat_to_group (nat_of_P p)) (nat_to_group (nat_of_P p0)))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (nat_to_group (Pos.to_nat p)) (nat_to_group (Pos.to_nat p0)))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G (nat_to_group (Pos.to_nat p))) (group_inverse G (nat_to_group (Pos.to_nat p0)))) *)
apply Trans with (group_inverse G (sgroup_law G (nat_to_group (nat_of_P p0)) (nat_to_group (nat_of_P p)))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_nat_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with *.
Qed.
End Zup1.
Hint Resolve nat_to_group_com nat_to_group_add nat_to_group_com2
nat_to_group_minus nat_to_group_com3 nat_to_group_com4: algebra.
Section Zup2.
Variable G : GROUP.
Section pos_def.
Variable r : G.
Fixpoint pos_to_group (p : positive) : G :=
match p with
| xH => r
| xO p' => group_square G (pos_to_group p')
| xI p' => sgroup_law G (group_square G (pos_to_group p')) r
end.
Lemma pos_nat_group :
forall p : positive, Equal (pos_to_group p) (nat_to_group r (nat_of_P p)).
Proof.
(* Goal: forall p : positive, @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p)) *)
simple induction p; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_square G (pos_to_group p)) (@nat_to_group G r (Pos.to_nat (xO p))) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_square G (pos_to_group p)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r (Pos.iter_op nat Init.Nat.add p (S (S O)))) r) *)
intros p0 H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_square G (pos_to_group p)) (@nat_to_group G r (Pos.to_nat (xO p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_square G (pos_to_group p0)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r (Pos.iter_op nat Init.Nat.add p0 (S (S O)))) r) *)
rewrite ZL6.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_square G (pos_to_group p)) (@nat_to_group G r (Pos.to_nat (xO p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_square G (pos_to_group p0)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r (Init.Nat.add (Pos.to_nat p0) (Pos.to_nat p0))) r) *)
unfold group_square in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_square G (pos_to_group p)) (@nat_to_group G r (Pos.to_nat (xO p))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (sgroup_law (monoid_sgroup (group_monoid G)) (pos_to_group p0) (pos_to_group p0)) r) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r (Init.Nat.add (Pos.to_nat p0) (Pos.to_nat p0))) r) *)
apply Trans with (sgroup_law G (sgroup_law G (nat_to_group r (nat_of_P p0)) (nat_to_group r (nat_of_P p0))) r); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_square G (pos_to_group p)) (@nat_to_group G r (Pos.to_nat (xO p))) *)
unfold group_square in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: forall (p : positive) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group p) (@nat_to_group G r (Pos.to_nat p))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (pos_to_group p) (pos_to_group p)) (@nat_to_group G r (Pos.to_nat (xO p))) *)
intros p0 H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (pos_to_group p0) (pos_to_group p0)) (@nat_to_group G r (Pos.to_nat (xO p0))) *)
unfold nat_of_P in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (pos_to_group p0) (pos_to_group p0)) (@nat_to_group G r (Pos.iter_op nat Init.Nat.add (xO p0) (S O))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (pos_to_group p0) (pos_to_group p0)) (@nat_to_group G r (Pos.iter_op nat Init.Nat.add p0 (S (S O)))) *)
rewrite ZL6.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (pos_to_group p0) (pos_to_group p0)) (@nat_to_group G r (Init.Nat.add (Pos.to_nat p0) (Pos.to_nat p0))) *)
apply Trans with (sgroup_law G (nat_to_group r (nat_of_P p0)) (nat_to_group r (nat_of_P p0))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) r (sgroup_law (monoid_sgroup (group_monoid G)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) r) *)
auto with *.
Qed.
End pos_def.
Hint Resolve pos_nat_group: algebra.
Variable r : G.
Definition Z_to_group_fun : ZZ -> G.
Proof.
(* Goal: forall _ : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
intros x.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
case (Z_gt_le_dec x 0); intros z.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
exact (pos_to_group r (pos_abs z)).
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
case (Z_le_lt_eq_dec _ _ z); intros.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
cut (- x > 0)%Z.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.gt (Z.opp x) Z0 *)
(* Goal: forall _ : Z.gt (Z.opp x) Z0, Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
intros H'.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.gt (Z.opp x) Z0 *)
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
exact (pos_to_group (group_inverse G r) (pos_abs H')).
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.gt (Z.opp x) Z0 *)
apply Zlemma1.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
(* Goal: Z.lt x Z0 *)
auto with *.
(* Goal: Carrier (sgroup_set (monoid_sgroup (group_monoid G))) *)
exact (monoid_unit G).
Qed.
Lemma nat_to_group_inverse :
forall (n : nat) (r : G),
Equal (group_inverse G (nat_to_group r n))
(nat_to_group (group_inverse G r) n).
Proof.
(* Goal: forall (n : nat) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@nat_to_group G r n)) (@nat_to_group G (group_inverse G r) n) *)
simple induction n; simpl in |- *; auto with *.
(* Goal: forall (n : nat) (_ : forall r : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (@nat_to_group G r n)) (@nat_to_group G (group_inverse G r) n)) (r : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r n) r)) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (group_inverse G r) n) (group_inverse G r)) *)
intros n0 H' r0; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G r0 n0) r0)) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (group_inverse G r0) n0) (group_inverse G r0)) *)
apply Trans with (sgroup_law G (group_inverse G r0) (group_inverse G (nat_to_group r0 n0))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G r0) (group_inverse G (@nat_to_group G r0 n0))) (sgroup_law (monoid_sgroup (group_monoid G)) (@nat_to_group G (group_inverse G r0) n0) (group_inverse G r0)) *)
apply Trans with (sgroup_law G (group_inverse G r0) (nat_to_group (group_inverse G r0) n0)); auto with *.
Qed.
Hint Resolve nat_to_group_inverse: algebra.
Lemma Z_to_group_fun_eq :
forall z : ZZ, Equal (Z_to_group_fun z) (Z_to_group_nat r z).
Proof.
(* Goal: forall z : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun z) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group_nat G r))) z) *)
intros z; simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun z) (@Z_to_group_nat_fun G r z) *)
unfold Z_to_group_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_gt_le_dec z Z0 with | left z0 => pos_to_group r (@pos_abs z z0) | right z0 => match Z_le_lt_eq_dec z Z0 z0 with | left l => pos_to_group (group_inverse G r) (@pos_abs (Z.opp z) (@Zlemma1 z l)) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end (@Z_to_group_nat_fun G r z) *)
unfold Z_to_group_nat_fun in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_gt_le_dec z Z0 with | left z0 => pos_to_group r (@pos_abs z z0) | right z0 => match Z_le_lt_eq_dec z Z0 z0 with | left l => pos_to_group (group_inverse G r) (@pos_abs (Z.opp z) (@Zlemma1 z l)) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end match Z_gt_le_dec z Z0 with | left z0 => @nat_to_group G r (Pos.to_nat (@pos_abs z z0)) | right z0 => match Z_le_lt_eq_dec z Z0 z0 with | left l => group_inverse G (@nat_to_group G r (Pos.to_nat (@pos_abs (Z.opp z) (@Zlemma1 z l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end end *)
case (Z_gt_le_dec z 0); intros z0.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec z Z0 z0 with | left l => pos_to_group (group_inverse G r) (@pos_abs (Z.opp z) (@Zlemma1 z l)) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end match Z_le_lt_eq_dec z Z0 z0 with | left l => group_inverse G (@nat_to_group G r (Pos.to_nat (@pos_abs (Z.opp z) (@Zlemma1 z l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group r (@pos_abs z z0)) (@nat_to_group G r (Pos.to_nat (@pos_abs z z0))) *)
auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) match Z_le_lt_eq_dec z Z0 z0 with | left l => pos_to_group (group_inverse G r) (@pos_abs (Z.opp z) (@Zlemma1 z l)) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end match Z_le_lt_eq_dec z Z0 z0 with | left l => group_inverse G (@nat_to_group G r (Pos.to_nat (@pos_abs (Z.opp z) (@Zlemma1 z l)))) | right e => @monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)) end *)
case (Z_le_lt_eq_dec z 0 z0); intros z1.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (pos_to_group (group_inverse G r) (@pos_abs (Z.opp z) (@Zlemma1 z z1))) (group_inverse G (@nat_to_group G r (Pos.to_nat (@pos_abs (Z.opp z) (@Zlemma1 z z1))))) *)
apply Trans with (nat_to_group (group_inverse G r) (nat_of_P (pos_abs (Zlemma1 z1)))); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
auto with *.
Qed.
Hint Resolve Z_to_group_fun_eq: algebra.
Definition Z_to_group : Hom (ZZ:GROUP) G.
Proof.
(* Goal: Carrier (@Hom GROUP (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))) : Ob GROUP) G) *)
apply (BUILD_HOM_GROUP (G:=ZZ:GROUP) (G':=G) (ff:=Z_to_group_fun)).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_fun x) (Z_to_group_fun y)) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun x) (Z_to_group_fun y) *)
intros x y H'; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_fun x) (Z_to_group_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun x) (Z_to_group_fun y) *)
apply Trans with (Z_to_group_nat r x); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_fun x) (Z_to_group_fun y)) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group_nat G r))) x) (Z_to_group_fun y) *)
apply Trans with (Z_to_group_nat r y); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))), @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_fun x) (Z_to_group_fun y)) *)
intros x y; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_fun x) (Z_to_group_fun y)) *)
apply Trans with (Z_to_group_nat r (sgroup_law ZZ x y)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group_nat G r))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) x y)) (sgroup_law (monoid_sgroup (group_monoid G)) (Z_to_group_fun x) (Z_to_group_fun y)) *)
apply Trans with (sgroup_law G (Z_to_group_nat r x) (Z_to_group_nat r y)); auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (Z_to_group_fun (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_on_def (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))) *)
apply Trans with (Z_to_group_nat r (monoid_unit ZZ)); auto with *.
Qed.
End Zup2.
Set Strict Implicit.
Unset Implicit Arguments.
Definition group_power (G : GROUP) (x : G) (n : ZZ) := Z_to_group x n.
Set Implicit Arguments.
Unset Strict Implicit.
Definition sgroup_powers (G : GROUP) (g : G) := coKer (Z_to_group g).
Lemma sgroup_powers_prop :
forall (G : GROUP) (g x : G),
in_part x (sgroup_powers g) -> exists n : ZZ, Equal x (group_power G g n).
Proof.
(* Goal: forall (G : Ob GROUP) (g x : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid G))) x (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@sgroup_powers G g))))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (fun n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x (group_power G g n)) *)
intros G g x H'; try assumption.
(* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (fun n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x (group_power G g n)) *)
elim H'.
(* Goal: forall (x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (_ : and (@in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) x0 (full (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))))) (@Equal (sgroup_set (monoid_sgroup (group_monoid G))) x (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) (sgroup_set (monoid_sgroup (group_monoid G))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))) (monoid_sgroup (group_monoid G)) (@monoid_sgroup_hom (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))) (group_monoid G) (@Z_to_group G g))) x0))), @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (fun n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x (group_power G g n)) *)
intros x0 H'0; try assumption.
(* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (fun n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x (group_power G g n)) *)
elim H'0; intros H'1 H'2; try exact H'2; clear H'0.
(* Goal: @ex (Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))) (fun n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ))))))) => @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x (group_power G g n)) *)
exists x0; try assumption.
Qed.
Lemma sgroup_powers_rev :
forall (G : GROUP) (g : G) (n : ZZ),
in_part (group_power G g n) (sgroup_powers g).
Proof.
(* Goal: forall (G : Ob GROUP) (g : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (n : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group (cring_ring (idomain_ring ZZ)))))))), @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g n) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@sgroup_powers G g)))) *)
intros G g n; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g n) (@subsgroup_part (monoid_sgroup (group_monoid G)) (@submonoid_subsgroup (group_monoid G) (@subgroup_submonoid G (@sgroup_powers G g)))) *)
simpl in |- *.
(* Goal: @ex Z (fun x : Z => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g n) (@Z_to_group_fun G g x))) *)
exists n; split; [ idtac | try assumption ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g n) (@Z_to_group_fun G g n) *)
(* Goal: True *)
auto with *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid G))) (group_power G g n) (@Z_to_group_fun G g n) *)
unfold group_power in |- *; auto with *.
Qed.
Hint Resolve sgroup_powers_prop sgroup_powers_rev: algebra.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Cartesian.
Comments "Some basic category theory.".
Section Category_def.
Section Category_def1.
Variable Ob : Type.
Variable Hom : Ob -> Ob -> Setoid.
Variable
Hom_comp : forall a b c : Ob, MAP (cart (Hom b c) (Hom a b)) (Hom a c).
Variable Hom_id : forall a : Ob, Hom a a.
Definition Hom_comp_assoc :=
forall (a b c d : Ob) (f : Hom a b) (g : Hom b c) (h : Hom c d),
Equal (Hom_comp a b d (couple (Hom_comp b c d (couple h g)) f))
(Hom_comp a c d (couple h (Hom_comp a b c (couple g f)))).
Definition Hom_comp_unit_l :=
forall (a b : Ob) (f : Hom a b),
Equal (Hom_comp a b b (couple (Hom_id b) f)) f.
Definition Hom_comp_unit_r :=
forall (a b : Ob) (f : Hom a b),
Equal (Hom_comp a a b (couple f (Hom_id a))) f.
End Category_def1.
Record category : Type :=
{Ob :> Type;
Hom : Ob -> Ob -> Setoid;
Hom_comp : forall a b c : Ob, MAP (cart (Hom b c) (Hom a b)) (Hom a c);
Hom_id : forall a : Ob, Hom a a;
Hom_comp_assoc_prf : Hom_comp_assoc Hom_comp;
Hom_comp_unit_l_prf : Hom_comp_unit_l Hom_comp Hom_id;
Hom_comp_unit_r_prf : Hom_comp_unit_r Hom_comp Hom_id}.
Section Category_comp.
Variable C : category.
Definition comp_hom (a b c : C) (g : Hom b c) (f : Hom a b) :=
Hom_comp a b c (couple g f).
Lemma comp_hom_compatible :
forall (a b c : C) (x x' : Hom b c) (y y' : Hom a b),
Equal x x' -> Equal y y' -> Equal (comp_hom x y) (comp_hom x' y').
Proof.
(* Goal: forall (a b c : Ob C) (x x' : Carrier (@Hom C b c)) (y y' : Carrier (@Hom C a b)) (_ : @Equal (@Hom C b c) x x') (_ : @Equal (@Hom C a b) y y'), @Equal (@Hom C a c) (@comp_hom a b c x y) (@comp_hom a b c x' y') *)
intros a b c x x' y y' H' H'0; try assumption.
(* Goal: @Equal (@Hom C a c) (@comp_hom a b c x y) (@comp_hom a b c x' y') *)
unfold comp_hom in |- *; auto with algebra.
Qed.
Lemma comp_hom_assoc :
forall (a b c d : C) (f : Hom a b) (g : Hom b c) (h : Hom c d),
Equal (comp_hom (comp_hom h g) f) (comp_hom h (comp_hom g f)).
Proof.
(* Goal: forall (a b c d : Ob C) (f : Carrier (@Hom C a b)) (g : Carrier (@Hom C b c)) (h : Carrier (@Hom C c d)), @Equal (@Hom C a d) (@comp_hom a b d (@comp_hom b c d h g) f) (@comp_hom a c d h (@comp_hom a b c g f)) *)
exact (Hom_comp_assoc_prf (c:=C)).
Qed.
Lemma comp_hom_unit_l :
forall (a b : C) (f : Hom a b), Equal (comp_hom (Hom_id b) f) f.
Proof.
(* Goal: forall (a b : Ob C) (f : Carrier (@Hom C a b)), @Equal (@Hom C a b) (@comp_hom a b b (@Hom_id C b) f) f *)
exact (Hom_comp_unit_l_prf (c:=C)).
Qed.
Lemma comp_hom_unit_r :
forall (a b : C) (f : Hom a b), Equal (comp_hom f (Hom_id a)) f.
Proof.
(* Goal: forall (a b : Ob C) (f : Carrier (@Hom C a b)), @Equal (@Hom C a b) (@comp_hom a a b f (@Hom_id C a)) f *)
exact (Hom_comp_unit_r_prf (c:=C)).
Qed.
End Category_comp.
Hint Resolve comp_hom_compatible comp_hom_assoc comp_hom_unit_l
comp_hom_unit_r: algebra.
Section Full_subcat_def.
Variable C : category.
Variable C' : Type.
Variable i : C' -> C.
Definition fsubcat_Hom (a b : C') := Hom (i a) (i b).
Definition fsubcat_Hom_comp :
forall a b c : C',
MAP (cart (fsubcat_Hom b c) (fsubcat_Hom a b)) (fsubcat_Hom a c).
Proof.
(* Goal: forall a b c : C', Carrier (MAP (cart (fsubcat_Hom b c) (fsubcat_Hom a b)) (fsubcat_Hom a c)) *)
intros a b c; try assumption.
(* Goal: Carrier (MAP (cart (fsubcat_Hom b c) (fsubcat_Hom a b)) (fsubcat_Hom a c)) *)
exact (Hom_comp (i a) (i b) (i c)).
Qed.
Definition fsubcat_Hom_id (a : C') := Hom_id (i a).
Definition full_subcat : category.
Proof.
(* Goal: category *)
apply (Build_category (Ob:=C') (Hom:=fsubcat_Hom) (Hom_comp:=fsubcat_Hom_comp) (Hom_id:=fsubcat_Hom_id)).
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Hom_comp_unit_l C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Hom_comp_assoc C' fsubcat_Hom fsubcat_Hom_comp *)
red in |- *.
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Hom_comp_unit_l C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: forall (a b c d : C') (f : Carrier (fsubcat_Hom a b)) (g : Carrier (fsubcat_Hom b c)) (h : Carrier (fsubcat_Hom c d)), @Equal (fsubcat_Hom a d) (@Ap (cart (fsubcat_Hom b d) (fsubcat_Hom a b)) (fsubcat_Hom a d) (fsubcat_Hom_comp a b d) (@couple (fsubcat_Hom b d) (fsubcat_Hom a b) (@Ap (cart (fsubcat_Hom c d) (fsubcat_Hom b c)) (fsubcat_Hom b d) (fsubcat_Hom_comp b c d) (@couple (fsubcat_Hom c d) (fsubcat_Hom b c) h g)) f)) (@Ap (cart (fsubcat_Hom c d) (fsubcat_Hom a c)) (fsubcat_Hom a d) (fsubcat_Hom_comp a c d) (@couple (fsubcat_Hom c d) (fsubcat_Hom a c) h (@Ap (cart (fsubcat_Hom b c) (fsubcat_Hom a b)) (fsubcat_Hom a c) (fsubcat_Hom_comp a b c) (@couple (fsubcat_Hom b c) (fsubcat_Hom a b) g f)))) *)
unfold fsubcat_Hom, fsubcat_Hom_comp in |- *; simpl in |- *.
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Hom_comp_unit_l C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: forall (a b c d : C') (f : Carrier (@Hom C (i a) (i b))) (g : Carrier (@Hom C (i b) (i c))) (h : Carrier (@Hom C (i c) (i d))), @Equal (@Hom C (i a) (i d)) (@Ap (cart (@Hom C (i b) (i d)) (@Hom C (i a) (i b))) (@Hom C (i a) (i d)) (@Hom_comp C (i a) (i b) (i d)) (@couple (@Hom C (i b) (i d)) (@Hom C (i a) (i b)) (@Ap (cart (@Hom C (i c) (i d)) (@Hom C (i b) (i c))) (@Hom C (i b) (i d)) (@Hom_comp C (i b) (i c) (i d)) (@couple (@Hom C (i c) (i d)) (@Hom C (i b) (i c)) h g)) f)) (@Ap (cart (@Hom C (i c) (i d)) (@Hom C (i a) (i c))) (@Hom C (i a) (i d)) (@Hom_comp C (i a) (i c) (i d)) (@couple (@Hom C (i c) (i d)) (@Hom C (i a) (i c)) h (@Ap (cart (@Hom C (i b) (i c)) (@Hom C (i a) (i b))) (@Hom C (i a) (i c)) (@Hom_comp C (i a) (i b) (i c)) (@couple (@Hom C (i b) (i c)) (@Hom C (i a) (i b)) g f)))) *)
intros a b c d f g h; try assumption.
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Hom_comp_unit_l C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Equal (@Hom C (i a) (i d)) (@Ap (cart (@Hom C (i b) (i d)) (@Hom C (i a) (i b))) (@Hom C (i a) (i d)) (@Hom_comp C (i a) (i b) (i d)) (@couple (@Hom C (i b) (i d)) (@Hom C (i a) (i b)) (@Ap (cart (@Hom C (i c) (i d)) (@Hom C (i b) (i c))) (@Hom C (i b) (i d)) (@Hom_comp C (i b) (i c) (i d)) (@couple (@Hom C (i c) (i d)) (@Hom C (i b) (i c)) h g)) f)) (@Ap (cart (@Hom C (i c) (i d)) (@Hom C (i a) (i c))) (@Hom C (i a) (i d)) (@Hom_comp C (i a) (i c) (i d)) (@couple (@Hom C (i c) (i d)) (@Hom C (i a) (i c)) h (@Ap (cart (@Hom C (i b) (i c)) (@Hom C (i a) (i b))) (@Hom C (i a) (i c)) (@Hom_comp C (i a) (i b) (i c)) (@couple (@Hom C (i b) (i c)) (@Hom C (i a) (i b)) g f)))) *)
apply (Hom_comp_assoc_prf (c:=C)).
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Hom_comp_unit_l C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
red in |- *.
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: forall (a b : C') (f : Carrier (fsubcat_Hom a b)), @Equal (fsubcat_Hom a b) (@Ap (cart (fsubcat_Hom b b) (fsubcat_Hom a b)) (fsubcat_Hom a b) (fsubcat_Hom_comp a b b) (@couple (fsubcat_Hom b b) (fsubcat_Hom a b) (fsubcat_Hom_id b) f)) f *)
unfold fsubcat_Hom, fsubcat_Hom_comp, fsubcat_Hom_id in |- *; simpl in |- *.
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: forall (a b : C') (f : Carrier (@Hom C (i a) (i b))), @Equal (@Hom C (i a) (i b)) (@Ap (cart (@Hom C (i b) (i b)) (@Hom C (i a) (i b))) (@Hom C (i a) (i b)) (@Hom_comp C (i a) (i b) (i b)) (@couple (@Hom C (i b) (i b)) (@Hom C (i a) (i b)) (@Hom_id C (i b)) f)) f *)
intros a b f; try assumption.
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
(* Goal: @Equal (@Hom C (i a) (i b)) (@Ap (cart (@Hom C (i b) (i b)) (@Hom C (i a) (i b))) (@Hom C (i a) (i b)) (@Hom_comp C (i a) (i b) (i b)) (@couple (@Hom C (i b) (i b)) (@Hom C (i a) (i b)) (@Hom_id C (i b)) f)) f *)
apply (Hom_comp_unit_l_prf (c:=C)).
(* Goal: @Hom_comp_unit_r C' fsubcat_Hom fsubcat_Hom_comp fsubcat_Hom_id *)
red in |- *.
(* Goal: forall (a b : C') (f : Carrier (fsubcat_Hom a b)), @Equal (fsubcat_Hom a b) (@Ap (cart (fsubcat_Hom a b) (fsubcat_Hom a a)) (fsubcat_Hom a b) (fsubcat_Hom_comp a a b) (@couple (fsubcat_Hom a b) (fsubcat_Hom a a) f (fsubcat_Hom_id a))) f *)
unfold fsubcat_Hom, fsubcat_Hom_comp, fsubcat_Hom_id in |- *; simpl in |- *.
(* Goal: forall (a b : C') (f : Carrier (@Hom C (i a) (i b))), @Equal (@Hom C (i a) (i b)) (@Ap (cart (@Hom C (i a) (i b)) (@Hom C (i a) (i a))) (@Hom C (i a) (i b)) (@Hom_comp C (i a) (i a) (i b)) (@couple (@Hom C (i a) (i b)) (@Hom C (i a) (i a)) f (@Hom_id C (i a)))) f *)
intros a b f; try assumption.
(* Goal: @Equal (@Hom C (i a) (i b)) (@Ap (cart (@Hom C (i a) (i b)) (@Hom C (i a) (i a))) (@Hom C (i a) (i b)) (@Hom_comp C (i a) (i a) (i b)) (@couple (@Hom C (i a) (i b)) (@Hom C (i a) (i a)) f (@Hom_id C (i a)))) f *)
apply (Hom_comp_unit_r_prf (c:=C)).
Qed.
End Full_subcat_def.
End Category_def.
Hint Resolve comp_hom_compatible comp_hom_assoc comp_hom_unit_l
comp_hom_unit_r: algebra. |
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat.
From mathcomp
Require Import div seq fintype tuple finset.
From mathcomp
Require Import fingroup action gseries.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope.
Section PrimitiveDef.
Variables (aT : finGroupType) (sT : finType).
Variables (A : {set aT}) (S : {set sT}) (to : {action aT &-> sT}).
Definition imprimitivity_system Q :=
[&& partition Q S, [acts A, on Q | to^*] & 1 < #|Q| < #|S|].
Definition primitive :=
[transitive A, on S | to] && ~~ [exists Q, imprimitivity_system Q].
End PrimitiveDef.
Arguments imprimitivity_system {aT sT} A%g S%g to%act Q%g.
Arguments primitive {aT sT} A%g S%g to%act.
Notation "[ 'primitive' A , 'on' S | to ]" := (primitive A S to)
(at level 0, format "[ 'primitive' A , 'on' S | to ]") : form_scope.
Section Primitive.
Variables (aT : finGroupType) (sT : finType).
Variables (G : {group aT}) (to : {action aT &-> sT}) (S : {set sT}).
Lemma trans_prim_astab x :
x \in S -> [transitive G, on S | to] ->
[primitive G, on S | to] = maximal_eq 'C_G[x | to] G.
Lemma prim_trans_norm (H : {group aT}) :
[primitive G, on S | to] -> H <| G ->
H \subset 'C_G(S | to) \/ [transitive H, on S | to].
Proof.
(* Goal: forall (_ : is_true (@primitive aT sT (@gval aT G) S to)) (_ : is_true (@normal aT (@gval aT H) (@gval aT G))), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to)))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
move=> primG /andP[sHG nHG]; rewrite subsetI sHG.
(* Goal: or (is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to)))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
have [trG _] := andP primG; have [x Sx defS] := imsetP trG.
(* Goal: or (is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to)))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
move: primG; rewrite (trans_prim_astab Sx) // => /maximal_eqP[_].
(* Goal: forall _ : forall (H : @group_of aT (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT (@setI_group aT G (@astab_group aT (@setT_group aT (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT to (@set1 sT x)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))))), or (@eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@gval aT H) (@gval aT (@setI_group aT G (@astab_group aT (@setT_group aT (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT to (@set1 sT x))))) (@eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))))) (@gval aT H) (@gval aT G)), or (is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to)))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
case/(_ ('C_G[x | to] <*> H)%G) => /= [||cxH|]; first exact: joing_subl.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
-
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) *)
by rewrite join_subG subsetIl.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
-
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
have{cxH} cxH: H \subset 'C_G[x | to] by rewrite -cxH joing_subr.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
rewrite subsetI sHG /= in cxH; left; apply/subsetP=> a Ha.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) a (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to)))) *)
apply/astabP=> y Sy; have [b Gb ->] := atransP2 trG Sx Sy.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: @eq (Finite.sort sT) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort sT) to (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort sT) to x b) a) (@act aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (Finite.sort sT) to x b) *)
rewrite actCJV [to x (a ^ _)](astab1P _) ?(subsetP cxH) //.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (@conjg aT a (@invg (FinGroup.base aT) b)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H)))) *)
by rewrite -mem_conjg (normsP nHG).
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@joing aT (@setI (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@set1 sT x) to)) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
rewrite norm_joinEl 1?subIset ?nHG //.
(* Goal: forall _ : @eq (@set_of (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) (@mulg (group_set_of_baseGroupType (FinGroup.base aT)) (@gval aT (@setI_group aT G (@astab_group aT (@setT_group aT (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT to (@set1 sT x)))) (@gval aT H)) (@gval aT G), or (is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT H))) (@mem (FinGroup.arg_sort (FinGroup.base aT)) (predPredType (FinGroup.arg_sort (FinGroup.base aT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@astab aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT S to))))) (is_true (@atrans aT (@setTfor (FinGroup.arg_finType (FinGroup.base aT)) (Phant (FinGroup.arg_sort (FinGroup.base aT)))) sT (@gval aT H) S to)) *)
by move/(subgroup_transitiveP Sx sHG trG); right.
Qed.
End Primitive.
Section NactionDef.
Variables (gT : finGroupType) (sT : finType).
Variables (to : {action gT &-> sT}) (n : nat).
Definition n_act (t : n.-tuple sT) a := [tuple of map (to^~ a) t].
Fact n_act_is_action : is_action setT n_act.
Proof.
(* Goal: @is_action gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_of n (Finite.sort sT)) n_act *)
by apply: is_total_action => [t|t a b]; apply: eq_from_tnth => i; rewrite !tnth_map ?act1 ?actM.
Qed.
Canonical n_act_action := Action n_act_is_action.
End NactionDef.
Notation "to * n" := (n_act_action to n) : action_scope.
Section NTransitive.
Variables (gT : finGroupType) (sT : finType).
Variables (n : nat) (A : {set gT}) (S : {set sT}) (to : {action gT &-> sT}).
Definition dtuple_on := [set t : n.-tuple sT | uniq t & t \subset S].
Definition ntransitive := [transitive A, on dtuple_on | to * n].
Lemma dtuple_onP t :
reflect (injective (tnth t) /\ forall i, tnth t i \in S) (t \in dtuple_on).
Proof.
(* Goal: Bool.reflect (and (@injective (Finite.sort sT) (ordinal n) (@tnth n (Finite.sort sT) t)) (forall i : ordinal n, is_true (@in_mem (Finite.sort sT) (@tnth n (Finite.sort sT) t i) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))))) (@in_mem (tuple_of n (Finite.sort sT)) t (@mem (Finite.sort (tuple_finType n sT)) (predPredType (Finite.sort (tuple_finType n sT))) (@SetDef.pred_of_set (tuple_finType n sT) dtuple_on))) *)
rewrite inE subset_all -map_tnth_enum.
(* Goal: Bool.reflect (and (@injective (Finite.sort sT) (ordinal n) (@tnth n (Finite.sort sT) t)) (forall i : ordinal n, is_true (@in_mem (Finite.sort sT) (@tnth n (Finite.sort sT) t i) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))))) (andb (@uniq (Finite.eqType sT) (@map (ordinal n) (Finite.sort sT) (@tnth n (Finite.sort sT) t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))))) (@all (Finite.sort sT) (@pred_of_simpl (Finite.sort sT) (@pred_of_mem_pred (Finite.sort sT) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S)))) (@map (ordinal n) (Finite.sort sT) (@tnth n (Finite.sort sT) t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))))) *)
case: (uniq _) / (injectiveP (tnth t)) => f_inj; last by right; case.
(* Goal: Bool.reflect (and (@injective (Finite.sort sT) (ordinal n) (@tnth n (Finite.sort sT) t)) (forall i : ordinal n, is_true (@in_mem (Finite.sort sT) (@tnth n (Finite.sort sT) t i) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))))) (andb true (@all (Finite.sort sT) (@pred_of_simpl (Finite.sort sT) (@pred_of_mem_pred (Finite.sort sT) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S)))) (@map (ordinal n) (Finite.sort sT) (@tnth n (Finite.sort sT) t) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))))) *)
rewrite -[all _ _]negbK -has_predC has_map has_predC negbK /=.
(* Goal: Bool.reflect (and (@injective (Finite.sort sT) (ordinal n) (@tnth n (Finite.sort sT) t)) (forall i : ordinal n, is_true (@in_mem (Finite.sort sT) (@tnth n (Finite.sort sT) t i) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))))) (@all (ordinal n) (fun x : ordinal n => @in_mem (Finite.sort sT) (@tnth n (Finite.sort sT) t x) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))) (@enum_mem (ordinal_finType n) (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n)))))) *)
by apply: (iffP allP) => [Sf|[]//]; split=> // i; rewrite Sf ?mem_enum.
Qed.
Lemma n_act_dtuple t a :
a \in 'N(S | to) -> t \in dtuple_on -> n_act to t a \in dtuple_on.
End NTransitive.
Arguments dtuple_on {sT} n%N S%g.
Arguments ntransitive {gT sT} n%N A%g S%g to%act.
Arguments n_act {gT sT} to {n} t a.
Notation "n .-dtuple ( S )" := (dtuple_on n S)
(at level 8, format "n .-dtuple ( S )") : set_scope.
Notation "[ 'transitive' ^ n A , 'on' S | to ]" := (ntransitive n A S to)
(at level 0, n at level 8,
format "[ 'transitive' ^ n A , 'on' S | to ]") : form_scope.
Section NTransitveProp.
Variables (gT : finGroupType) (sT : finType).
Variables (to : {action gT &-> sT}) (G : {group gT}) (S : {set sT}).
Lemma card_uniq_tuple n (t : n.-tuple sT) : uniq t -> #|t| = n.
Proof.
(* Goal: forall _ : is_true (@uniq (Finite.eqType sT) (@tval n (Finite.sort sT) t)), @eq nat (@card sT (@mem (Equality.sort (Finite.eqType sT)) (tuple_predType n (Finite.eqType sT)) t)) n *)
by move/card_uniqP->; apply: size_tuple.
Qed.
Lemma n_act0 (t : 0.-tuple sT) a : n_act to t a = [tuple].
Proof.
(* Goal: @eq (tuple_of O (Finite.sort sT)) (@n_act gT sT to O t a) (@tuple O (Finite.sort sT) (nil_tuple (Finite.sort sT)) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval O (Finite.sort sT) (nil_tuple (Finite.sort sT)))) O) => @Tuple O (Finite.sort sT) (@nil (Finite.sort sT)) sP)) *)
exact: tuple0.
Qed.
Lemma dtuple_on_add n x (t : n.-tuple sT) :
Proof.
(* Goal: @eq bool (@in_mem (tuple_of (Datatypes.S n) (Finite.sort sT)) (@tuple (Datatypes.S n) (Finite.sort sT) (@cons_tuple n (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S n) (Finite.sort sT) (@cons_tuple n (Finite.sort sT) x t))) (Datatypes.S n)) => @Tuple (Datatypes.S n) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval n (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S n) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S n) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S n) sT) (@dtuple_on sT (Datatypes.S n) S)))) (andb (@in_mem (Finite.sort sT) x (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))) (andb (negb (@in_mem (Finite.sort sT) x (@mem (Equality.sort (Finite.eqType sT)) (tuple_predType n (Finite.eqType sT)) t))) (@in_mem (tuple_of n (Finite.sort sT)) t (@mem (Finite.sort (tuple_finType n sT)) (predPredType (Finite.sort (tuple_finType n sT))) (@SetDef.pred_of_set (tuple_finType n sT) (@dtuple_on sT n S)))))) *)
by rewrite !inE memtE !subset_all -!andbA; do !bool_congr.
Qed.
Lemma dtuple_on_add_D1 n x (t : n.-tuple sT) :
Lemma dtuple_on_subset n (S1 S2 : {set sT}) t :
S1 \subset S2 -> t \in n.-dtuple(S1) -> t \in n.-dtuple(S2).
Proof.
(* Goal: forall (_ : is_true (@subset sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S1)) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S2)))) (_ : is_true (@in_mem (Finite.sort (tuple_finType n sT)) t (@mem (Finite.sort (tuple_finType n sT)) (predPredType (Finite.sort (tuple_finType n sT))) (@SetDef.pred_of_set (tuple_finType n sT) (@dtuple_on sT n S1))))), is_true (@in_mem (Finite.sort (tuple_finType n sT)) t (@mem (Finite.sort (tuple_finType n sT)) (predPredType (Finite.sort (tuple_finType n sT))) (@SetDef.pred_of_set (tuple_finType n sT) (@dtuple_on sT n S2)))) *)
by move=> sS12; rewrite !inE => /andP[-> /subset_trans]; apply.
Qed.
Lemma n_act_add n x (t : n.-tuple sT) a :
Proof.
(* Goal: @eq (tuple_of (Datatypes.S n) (Finite.sort sT)) (@n_act gT sT to (Datatypes.S n) (@tuple (Datatypes.S n) (Finite.sort sT) (@cons_tuple n (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S n) (Finite.sort sT) (@cons_tuple n (Finite.sort sT) x t))) (Datatypes.S n)) => @Tuple (Datatypes.S n) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval n (Finite.sort sT) t)) sP)) a) (@tuple (Datatypes.S n) (Finite.sort sT) (@cons_tuple n (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to x a) (@n_act gT sT to n t a)) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S n) (Finite.sort sT) (@cons_tuple n (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to x a) (@n_act gT sT to n t a)))) (Datatypes.S n)) => @Tuple (Datatypes.S n) (Finite.sort sT) (@cons (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to x a) (@tval n (Finite.sort sT) (@n_act gT sT to n t a))) sP)) *)
exact: val_inj.
Qed.
Lemma ntransitive0 : [transitive^0 G, on S | to].
Proof.
(* Goal: is_true (@ntransitive gT sT O (@gval gT G) S to) *)
have dt0: [tuple] \in 0.-dtuple(S) by rewrite inE memtE subset_all.
(* Goal: is_true (@ntransitive gT sT O (@gval gT G) S to) *)
apply/imsetP; exists [tuple of Nil sT] => //.
(* Goal: @eq (Finite.sort (set_of_finType (tuple_finType O sT))) (@dtuple_on sT O S) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType O sT) (@n_act_action gT sT to O) (@gval gT G) (@tuple O (Finite.sort sT) (nil_tuple (Finite.sort sT)) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval O (Finite.sort sT) (nil_tuple (Finite.sort sT)))) O) => @Tuple O (Finite.sort sT) (@nil (Finite.sort sT)) sP))) *)
by apply/setP=> x; rewrite [x]tuple0 orbit_refl.
Qed.
Lemma ntransitive_weak k m :
k <= m -> [transitive^m G, on S | to] -> [transitive^k G, on S | to].
Proof.
(* Goal: forall (_ : is_true (leq k m)) (_ : is_true (@ntransitive gT sT m (@gval gT G) S to)), is_true (@ntransitive gT sT k (@gval gT G) S to) *)
move/subnKC <-; rewrite addnC; elim: {m}(m - k) => // m IHm.
(* Goal: forall _ : is_true (@ntransitive gT sT (addn (Datatypes.S m) k) (@gval gT G) S to), is_true (@ntransitive gT sT k (@gval gT G) S to) *)
rewrite addSn => tr_m1; apply: IHm; move: {m k}(m + k) tr_m1 => m tr_m1.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
have ext_t t: t \in dtuple_on m S -> exists x, [tuple of x :: t] \in m.+1.-dtuple(S).
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (tuple_finType m sT)) t (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S)))), @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
-
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: forall _ : is_true (@in_mem (Finite.sort (tuple_finType m sT)) t (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S)))), @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
move=> dt.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
have [sSt | /subsetPn[x Sx ntx]] := boolP (S \subset t); last first.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
(* Goal: @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
by exists x; rewrite dtuple_on_add andbA /= Sx ntx.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
case/imsetP: tr_m1 dt => t1; rewrite !inE => /andP[Ut1 St1] _ /andP[Ut _].
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
have /subset_leq_card := subset_trans St1 sSt.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
(* Goal: forall _ : is_true (leq (@card sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@mem_seq (Finite.eqType sT) (@tval (Datatypes.S m) (Equality.sort (Finite.eqType sT)) t1)))) (@card sT (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@mem_seq (Finite.eqType sT) (@tval m (Equality.sort (Finite.eqType sT)) t))))), @ex (Finite.sort sT) (fun x : Finite.sort sT => is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S))))) *)
by rewrite !card_uniq_tuple // ltnn.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
case/imsetP: (tr_m1); case/tupleP=> [x t]; rewrite dtuple_on_add.
(* Goal: forall (_ : is_true (andb (@in_mem (Finite.sort sT) x (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))) (andb (negb (@in_mem (Finite.sort sT) x (@mem (Equality.sort (Finite.eqType sT)) (tuple_predType m (Finite.eqType sT)) t))) (@in_mem (tuple_of m (Finite.sort sT)) t (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S))))))) (_ : @eq (Finite.sort (set_of_finType (tuple_finType (Datatypes.S m) sT))) (@dtuple_on sT (Datatypes.S m) S) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType (Datatypes.S m) sT) (@n_act_action gT sT to (Datatypes.S m)) (@gval gT G) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)))), is_true (@ntransitive gT sT m (@gval gT G) S to) *)
case/and3P=> Sx ntx dt; set xt := [tuple of _] => tr_xt.
(* Goal: is_true (@ntransitive gT sT m (@gval gT G) S to) *)
apply/imsetP; exists t => //.
(* Goal: @eq (Finite.sort (set_of_finType (tuple_finType m sT))) (@dtuple_on sT m S) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType m sT) (@n_act_action gT sT to m) (@gval gT G) t) *)
apply/setP=> u; apply/idP/imsetP=> [du | [a Ga ->{u}]].
(* Goal: is_true (@in_mem (Finite.sort (tuple_finType m sT)) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t a) (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S)))) *)
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (Finite.sort (tuple_finType m sT)) u (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t x)) *)
case: (ext_t u du) => y; rewrite tr_xt.
(* Goal: is_true (@in_mem (Finite.sort (tuple_finType m sT)) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t a) (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S)))) *)
(* Goal: forall _ : is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) y u) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) y u))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) y (@tval m (Finite.sort sT) u)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType (Datatypes.S m) sT) (@n_act_action gT sT to (Datatypes.S m)) (@gval gT G) xt)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (Finite.sort (tuple_finType m sT)) u (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t x)) *)
by case/imsetP=> a Ga [_ def_u]; exists a => //; apply: val_inj.
(* Goal: is_true (@in_mem (Finite.sort (tuple_finType m sT)) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t a) (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S)))) *)
have: n_act to xt a \in dtuple_on _ S by rewrite tr_xt mem_imset.
(* Goal: forall _ : is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@n_act gT sT to (Datatypes.S m) xt a) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S)))), is_true (@in_mem (Finite.sort (tuple_finType m sT)) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t a) (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S)))) *)
by rewrite n_act_add dtuple_on_add; case/and3P.
Qed.
Lemma ntransitive1 m :
0 < m -> [transitive^m G, on S | to] -> [transitive G, on S | to].
Proof.
(* Goal: forall (_ : is_true (leq (Datatypes.S O) m)) (_ : is_true (@ntransitive gT sT m (@gval gT G) S to)), is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@gval gT G) S to) *)
have trdom1 x: ([tuple x] \in 1.-dtuple(S)) = (x \in S).
(* Goal: forall (_ : is_true (leq (Datatypes.S O) m)) (_ : is_true (@ntransitive gT sT m (@gval gT G) S to)), is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@gval gT G) S to) *)
(* Goal: @eq bool (@in_mem (tuple_of (Datatypes.S O) (Finite.sort sT)) (@tuple (Datatypes.S O) (Finite.sort sT) (@cons_tuple O (Finite.sort sT) x (nil_tuple (Finite.sort sT))) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S O) (Finite.sort sT) (@cons_tuple O (Finite.sort sT) x (nil_tuple (Finite.sort sT))))) (Datatypes.S O)) => @Tuple (Datatypes.S O) (Finite.sort sT) (@cons (Finite.sort sT) x (@nil (Finite.sort sT))) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S O) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S O) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S O) sT) (@dtuple_on sT (Datatypes.S O) S)))) (@in_mem (Finite.sort sT) x (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))) *)
by rewrite dtuple_on_add !inE memtE subset_all andbT.
(* Goal: forall (_ : is_true (leq (Datatypes.S O) m)) (_ : is_true (@ntransitive gT sT m (@gval gT G) S to)), is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@gval gT G) S to) *)
move=> m_gt0 /(ntransitive_weak m_gt0) {m m_gt0}.
(* Goal: forall _ : is_true (@ntransitive gT sT (Datatypes.S O) (@gval gT G) S to), is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@gval gT G) S to) *)
case/imsetP; case/tupleP=> x t0; rewrite {t0}(tuple0 t0) trdom1 => Sx trx.
(* Goal: is_true (@atrans gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@gval gT G) S to) *)
apply/imsetP; exists x => //; apply/setP=> y; rewrite -trdom1 trx.
(* Goal: @eq bool (@in_mem (tuple_of (Datatypes.S O) (Finite.sort sT)) (@tuple (Datatypes.S O) (Finite.sort sT) (@cons_tuple O (Finite.sort sT) y (nil_tuple (Finite.sort sT))) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S O) (Finite.sort sT) (@cons_tuple O (Finite.sort sT) y (nil_tuple (Finite.sort sT))))) (Datatypes.S O)) => @Tuple (Datatypes.S O) (Finite.sort sT) (@cons (Finite.sort sT) y (@nil (Finite.sort sT))) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S O) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S O) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S O) sT) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType (Datatypes.S O) sT) (@n_act_action gT sT to (Datatypes.S O)) (@gval gT G) (@tuple (Datatypes.S O) (Finite.sort sT) (@cons_tuple O (Finite.sort sT) x (@tuple O (Finite.sort sT) (nil_tuple (Finite.sort sT)) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval O (Finite.sort sT) (nil_tuple (Finite.sort sT)))) O) => @Tuple O (Finite.sort sT) (@nil (Finite.sort sT)) sP))) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S O) (Finite.sort sT) (@cons_tuple O (Finite.sort sT) x (@tuple O (Finite.sort sT) (nil_tuple (Finite.sort sT)) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval O (Finite.sort sT) (nil_tuple (Finite.sort sT)))) O) => @Tuple O (Finite.sort sT) (@nil (Finite.sort sT)) sP))))) (Datatypes.S O)) => @Tuple (Datatypes.S O) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval O (Finite.sort sT) (@tuple O (Finite.sort sT) (nil_tuple (Finite.sort sT)) (fun sP0 : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval O (Finite.sort sT) (nil_tuple (Finite.sort sT)))) O) => @Tuple O (Finite.sort sT) (@nil (Finite.sort sT)) sP0)))) sP)))))) (@in_mem (Finite.sort sT) y (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT to (@gval gT G) x)))) *)
by apply/imsetP/imsetP=> [[a ? [->]]|[a ? ->]]; exists a => //; apply: val_inj.
Qed.
Lemma ntransitive_primitive m :
1 < m -> [transitive^m G, on S | to] -> [primitive G, on S | to].
End NTransitveProp.
Section NTransitveProp1.
Variables (gT : finGroupType) (sT : finType).
Variables (to : {action gT &-> sT}) (G : {group gT}) (S : {set sT}).
Theorem stab_ntransitive m x :
0 < m -> x \in S -> [transitive^m.+1 G, on S | to] ->
Proof.
(* Goal: forall (_ : is_true (leq (Datatypes.S O) m)) (_ : is_true (@in_mem (Finite.sort sT) x (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S)))) (_ : is_true (@ntransitive gT sT (Datatypes.S m) (@gval gT G) S to)), is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
move=> m_gt0 Sx Gtr; have sSxS: S :\ x \subset S by rewrite subsetDl.
(* Goal: is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
case: (imsetP Gtr); case/tupleP=> x1 t1; rewrite dtuple_on_add.
(* Goal: forall (_ : is_true (andb (@in_mem (Finite.sort sT) x1 (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S))) (andb (negb (@in_mem (Finite.sort sT) x1 (@mem (Equality.sort (Finite.eqType sT)) (tuple_predType m (Finite.eqType sT)) t1))) (@in_mem (tuple_of m (Finite.sort sT)) t1 (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m S))))))) (_ : @eq (Finite.sort (set_of_finType (tuple_finType (Datatypes.S m) sT))) (@dtuple_on sT (Datatypes.S m) S) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType (Datatypes.S m) sT) (@n_act_action gT sT to (Datatypes.S m)) (@gval gT G) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x1 t1) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x1 t1))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x1 (@tval m (Finite.sort sT) t1)) sP)))), is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
case/and3P=> Sx1 nt1x1 dt1 trt1; have Gtr1 := ntransitive1 (ltn0Sn _) Gtr.
(* Goal: is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
case: (atransP2 Gtr1 Sx1 Sx) => // a Ga x1ax.
(* Goal: is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
pose t := n_act to t1 a.
(* Goal: is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
have dxt: [tuple of x :: t] \in m.+1.-dtuple(S).
(* Goal: is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
(* Goal: is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S)))) *)
by rewrite trt1 x1ax; apply/imsetP; exists a => //; apply: val_inj.
(* Goal: is_true (@ntransitive gT sT m (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) (@setD sT S (@set1 sT x)) to) *)
apply/imsetP; exists t; first by rewrite dtuple_on_add_D1 Sx in dxt.
(* Goal: @eq (Finite.sort (set_of_finType (tuple_finType m sT))) (@dtuple_on sT m (@setD sT S (@set1 sT x))) (@orbit gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (tuple_finType m sT) (@n_act_action gT sT to m) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)) t) *)
apply/setP=> t2; apply/idP/imsetP => [dt2|[b]].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (_ : @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t b)), is_true (@in_mem (Finite.sort (tuple_finType m sT)) t2 (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m (@setD sT S (@set1 sT x)))))) *)
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x0 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t x)) *)
have: [tuple of x :: t2] \in dtuple_on _ S by rewrite dtuple_on_add_D1 Sx.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (_ : @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t b)), is_true (@in_mem (Finite.sort (tuple_finType m sT)) t2 (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m (@setD sT S (@set1 sT x)))))) *)
(* Goal: forall _ : is_true (@in_mem (tuple_of (Datatypes.S m) (Finite.sort sT)) (@tuple (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t2) (fun sP : is_true (@eq_op nat_eqType (@size (Finite.sort sT) (@tval (Datatypes.S m) (Finite.sort sT) (@cons_tuple m (Finite.sort sT) x t2))) (Datatypes.S m)) => @Tuple (Datatypes.S m) (Finite.sort sT) (@cons (Finite.sort sT) x (@tval m (Finite.sort sT) t2)) sP)) (@mem (Finite.sort (tuple_finType (Datatypes.S m) sT)) (predPredType (Finite.sort (tuple_finType (Datatypes.S m) sT))) (@SetDef.pred_of_set (tuple_finType (Datatypes.S m) sT) (@dtuple_on sT (Datatypes.S m) S)))), @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x1 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x1 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t x)) *)
case/(atransP2 Gtr dxt)=> b Gb [xbx tbt2].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (_ : @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t b)), is_true (@in_mem (Finite.sort (tuple_finType m sT)) t2 (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m (@setD sT S (@set1 sT x)))))) *)
(* Goal: @ex2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (fun x0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x0 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t x)) *)
by exists b; [rewrite inE Gb; apply/astab1P | apply: val_inj].
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@astab gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@set1 sT x) to)))))) (_ : @eq (Finite.sort (tuple_finType m sT)) t2 (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t b)), is_true (@in_mem (Finite.sort (tuple_finType m sT)) t2 (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m (@setD sT S (@set1 sT x)))))) *)
case/setIP=> Gb /astab1P xbx ->{t2}.
(* Goal: is_true (@in_mem (Finite.sort (tuple_finType m sT)) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (tuple_finType m sT)) (@n_act_action gT sT to m) t b) (@mem (Finite.sort (tuple_finType m sT)) (predPredType (Finite.sort (tuple_finType m sT))) (@SetDef.pred_of_set (tuple_finType m sT) (@dtuple_on sT m (@setD sT S (@set1 sT x)))))) *)
rewrite n_act_dtuple //; last by rewrite dtuple_on_add_D1 Sx in dxt.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) b (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@astabs gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) sT (@setD sT S (@set1 sT x)) to)))) *)
apply/astabsP=> y; rewrite !inE -{1}xbx (inj_eq (act_inj _ _)).
(* Goal: @eq bool (andb (negb (@eq_op (Finite.eqType sT) y x)) (@in_mem (Finite.sort sT) (@act gT (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (Finite.sort sT) to y b) (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S)))) (andb (negb (@eq_op (Finite.eqType sT) y x)) (@in_mem (Finite.sort sT) y (@mem (Finite.sort sT) (predPredType (Finite.sort sT)) (@SetDef.pred_of_set sT S)))) *)
by rewrite (actsP (atrans_acts Gtr1)).
Qed.
Theorem stab_ntransitiveI m x :
x \in S -> [transitive G, on S | to] ->
[transitive^m 'C_G[x | to], on S :\ x | to] ->
[transitive^m.+1 G, on S | to].
End NTransitveProp1.
|
Require Import Bool Arith List.
Require Import BellantoniCook.Lib BellantoniCook.Bitstring BellantoniCook.MultiPoly BellantoniCook.Cobham BellantoniCook.CobhamLib BellantoniCook.CobhamUnary BellantoniCook.BC BellantoniCook.BCLib BellantoniCook.BCUnary.
Definition BC_dummies (n n0 s s0 : nat)(e : BC) : BC :=
comp (n+n0) (s+s0) e (map (proj (n+n0) 0) (seq n n0))
(map (proj (n+n0) (s+s0)) (seq (n+n0+s) s0)).
Lemma dummies_inf : forall e n n0 s s0,
arities e = ok_arities n0 s0 ->
arities (BC_dummies n n0 s s0 e) = ok_arities (n + n0) (s + s0).
Proof.
(* Goal: forall (e : BC) (n n0 s s0 : nat) (_ : @eq Arities (arities e) (ok_arities n0 s0)), @eq Arities (arities (BC_dummies n n0 s s0 e)) (ok_arities (Init.Nat.add n n0) (Init.Nat.add s s0)) *)
destruct n0 as [ | n0]; simpl.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities O s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn O) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) end (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
intros s s0 H.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn O) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) end (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
rewrite H; simpl.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (if andb (andb (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0))) then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
rewrite map_length, seq_length, <- beq_nat_refl; simpl.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (if @forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)) then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
case_eq (forallb (fun se : BC => aeq (arities se) (ok_arities (n + 0) (s + s0))) (map (proj (n + 0) (s + s0)) (seq (n + 0 + s) s0))); intro H0; trivial.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
rewrite forallb_forall_conv in H0.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
destruct H0 as (e' & H1 & H2).
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
rewrite in_map_iff in H1.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
destruct H1 as (i & H3 & H4).
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
rewrite in_seq_iff in H4.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
rewrite <- H3 in H2.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: @eq Arities (error_comp (ok_arities O s0) (@nil Arities) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n O) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n O) s) s0)))) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0)) *)
contradict H2; simpl.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: not (@eq bool (aeq (if match Init.Nat.add (Init.Nat.add n O) (Init.Nat.add s s0) with | O => false | S m' => Nat.leb i m' end then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_proj (Init.Nat.add n O) (Init.Nat.add s s0) i) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) false) *)
case_eq (n + 0 + (s + s0)).
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n O) (Init.Nat.add s s0)) (S n0)), not (@eq bool (aeq (if Nat.leb i n0 then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_proj (Init.Nat.add n O) (Init.Nat.add s s0) i) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) false) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n O) (Init.Nat.add s s0)) O, not (@eq bool (aeq (error_proj (Init.Nat.add n O) (Init.Nat.add s s0) i) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) false) *)
omega.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: forall (n0 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n O) (Init.Nat.add s s0)) (S n0)), not (@eq bool (aeq (if Nat.leb i n0 then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_proj (Init.Nat.add n O) (Init.Nat.add s s0) i) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) false) *)
intros n0 H5.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: not (@eq bool (aeq (if Nat.leb i n0 then ok_arities (Init.Nat.add n O) (Init.Nat.add s s0) else error_proj (Init.Nat.add n O) (Init.Nat.add s s0) i) (ok_arities (Init.Nat.add n O) (Init.Nat.add s s0))) false) *)
case_eq (leb i n0); intro H6; simpl.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: not (@eq bool false false) *)
(* Goal: not (@eq bool (andb (Nat.eqb (Init.Nat.add n O) (Init.Nat.add n O)) (Nat.eqb (Init.Nat.add s s0) (Init.Nat.add s s0))) false) *)
do 2 rewrite <- beq_nat_refl.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: not (@eq bool false false) *)
(* Goal: not (@eq bool (andb true true) false) *)
simpl; congruence.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
(* Goal: not (@eq bool false false) *)
rewrite leb_iff_conv in H6; omega.
(* Goal: forall (s s0 : nat) (_ : @eq Arities (arities e) (ok_arities (S n0) s0)), @eq Arities match arities e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | error_proj n1 n2 n3 => error_comp (error_proj n1 n2 n3) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (Nat.eqb hs (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0) else error_comp (ok_arities hn hs) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) (seq (Init.Nat.add (Init.Nat.add n (S n0)) s) s0))) end (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s s0)) *)
intros s [ | s0] H; simpl; rewrite H; simpl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite map_length, seq_length, <- beq_nat_refl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (andb true true) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
simpl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
case_eq (n + S n0 + 0).
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) O, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
intro H0.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
contradict H0.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: not (@eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) O) *)
omega.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
intros n1 H0.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
case_eq (leb n n1); intro H1.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb (andb (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
simpl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb (Init.Nat.add n (S n0)) (Init.Nat.add n (S n0))) true) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite <- beq_nat_refl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb (andb (andb true true) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
simpl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite leb_iff in H1.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
case_eq (forallb (fun ne : BC => aeq (arities ne) (ok_arities (n + S n0) 0)) (map (proj (n + S n0) 0) (seq (S n) n0))); intro H2.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb true true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
trivial.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite forallb_forall_conv in H2.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
destruct H2 as (e' & H3 & H4).
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite in_map_iff in H3.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
destruct H3 as (i & H5 & H6).
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite in_seq_iff in H6.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite <- H5 in H4.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
contradict H4.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: not (@eq bool (aeq (arities (proj (Init.Nat.add n (S n0)) O i)) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
simpl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: not (@eq bool (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb i m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
case_eq (n + S n0 + 0).
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), not (@eq bool (aeq (if Nat.leb i n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) O, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
congruence.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), not (@eq bool (aeq (if Nat.leb i n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
intros n2 H7.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: not (@eq bool (aeq (if Nat.leb i n2 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
case_eq (leb i n2).
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) true, not (@eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
intros _.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: not (@eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
simpl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: not (@eq bool (andb (Nat.eqb (Init.Nat.add n (S n0)) (Init.Nat.add n (S n0))) true) false) *)
rewrite <- beq_nat_refl.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: not (@eq bool (andb true true) false) *)
simpl; congruence.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
intro H8.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
rewrite leb_iff_conv in H8.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
(* Goal: not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
omega.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
rewrite leb_iff_conv in H1.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O) else error_comp (ok_arities (S n0) O) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@nil Arities)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s O)) *)
contradict H1.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (lt n1 n) *)
omega.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (Nat.eqb s0 (@length BC (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
do 2 rewrite map_length, seq_length, <- beq_nat_refl.
(* Goal: @eq Arities (if andb (andb (andb true true) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
simpl.
(* Goal: @eq Arities (if andb (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb n m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (n + S n0 + 0).
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) O, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H0.
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H0.
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) O) *)
omega.
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intros n1 H0.
(* Goal: @eq Arities (if andb (andb (aeq (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (if Nat.leb n n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (leb n n1).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb n n1) true, @eq Arities (if andb (andb (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H1.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite leb_iff in H1.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (aeq (ok_arities (n + S n0) 0) (ok_arities (n + S n0) 0)).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) true, @eq Arities (if andb (andb true (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H2.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (forallb (fun ne : BC => aeq (arities ne) (ok_arities (n + S n0) 0)) (map (proj (n + S n0) 0) (seq (S n) n0))).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) true, @eq Arities (if andb (andb true true) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H3.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true true) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
simpl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (n + S n0 + (s + S s0)).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (S n1)), @eq Arities (if andb (aeq (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) O, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H4.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (S n1)), @eq Arities (if andb (aeq (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H4.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (S n1)), @eq Arities (if andb (aeq (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) O) *)
omega.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (S n1)), @eq Arities (if andb (aeq (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intros n2 H4.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (aeq (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (leb (n + S n0 + s) n2).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) true, @eq Arities (if andb (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H5.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (aeq (ok_arities (n + S n0) (s + S s0)) (ok_arities (n + S n0) (s + S s0))).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) true, @eq Arities (if andb true (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H6.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
case_eq (forallb (fun se : BC => aeq (arities se) (ok_arities (n + S n0) (s + S s0))) (map (proj (n + S n0) (s + S s0)) (seq (S (n + S n0 + s)) s0))).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) false, @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) true, @eq Arities (if andb true true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H7.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) false, @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true true then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
simpl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) false, @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
trivial.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) false, @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H7.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite forallb_forall_conv in H7.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
destruct H7 as (e' & H8 & H9).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite in_map_iff in H8.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
destruct H8 as (i & H10 & H11).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite in_seq_iff in H11.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite <- H10 in H9.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb true false then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H9.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (arities (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
simpl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb i m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
case_eq (n + S n0 + (s + S s0)).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (S n1)), not (@eq bool (aeq (if Nat.leb i n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) O, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
congruence.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (S n1)), not (@eq bool (aeq (if Nat.leb i n1 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
intros n3 H12.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (if Nat.leb i n3 then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
case_eq (leb i n3).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb i n3) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
(* Goal: forall _ : @eq bool (Nat.leb i n3) true, not (@eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
congruence.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb i n3) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
intro H13.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
rewrite leb_iff_conv in H13.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) i) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
omega.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false, @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H6.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb false (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H6.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) false) *)
simpl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (andb (Nat.eqb (Init.Nat.add n (S n0)) (Init.Nat.add n (S n0))) (Nat.eqb (Init.Nat.add s (S s0)) (Init.Nat.add s (S s0)))) false) *)
do 2 rewrite <- beq_nat_refl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (andb true true) false) *)
simpl; congruence.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) n2) false, @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H5.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite leb_iff_conv in H5.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (aeq (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H5.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (lt n2 (Init.Nat.add (Init.Nat.add n (S n0)) s)) *)
omega.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0))) false, @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H3.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite forallb_forall_conv in H3.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
destruct H3 as (e' & H4 & H5).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite in_map_iff in H4.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
destruct H4 as (i & H6 & H7).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite in_seq_iff in H7.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite <- H6 in H5.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb true false) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H5.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (arities (proj (Init.Nat.add n (S n0)) O i)) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
simpl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) O with | O => false | S m' => Nat.leb i m' end then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
case_eq (n + S n0 + 0).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), not (@eq bool (aeq (if Nat.leb i n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: forall _ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) O, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
congruence.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall (n1 : nat) (_ : @eq nat (Init.Nat.add (Init.Nat.add n (S n0)) O) (S n1)), not (@eq bool (aeq (if Nat.leb i n1 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
intros n2 H8.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (if Nat.leb i n2 then ok_arities (Init.Nat.add n (S n0)) O else error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
case_eq (leb i n2).
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) true, not (@eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
congruence.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (Nat.leb i n2) false, not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
intro H9.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
rewrite leb_iff_conv in H9.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (error_proj (Init.Nat.add n (S n0)) O i) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
omega.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: forall _ : @eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false, @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H2.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: @eq Arities (if andb (andb false (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (ok_arities (Init.Nat.add n (S n0)) O) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H2.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (aeq (ok_arities (Init.Nat.add n (S n0)) O) (ok_arities (Init.Nat.add n (S n0)) O)) false) *)
simpl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (andb (Nat.eqb (Init.Nat.add n (S n0)) (Init.Nat.add n (S n0))) true) false) *)
rewrite <- beq_nat_refl.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
(* Goal: not (@eq bool (andb true true) false) *)
simpl; congruence.
(* Goal: forall _ : @eq bool (Nat.leb n n1) false, @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
intro H1.
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
rewrite leb_iff_conv in H1.
(* Goal: @eq Arities (if andb (andb (aeq (error_proj (Init.Nat.add n (S n0)) O n) (ok_arities (Init.Nat.add n (S n0)) O)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities (Init.Nat.add n (S n0)) O)) (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (andb (aeq (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)))) (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0)))) then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_comp (ok_arities (S n0) (S s0)) (@cons Arities (error_proj (Init.Nat.add n (S n0)) O n) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) O) (seq (S n) n0)))) (@cons Arities (if match Init.Nat.add (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) with | O => false | S m' => Nat.leb (Init.Nat.add (Init.Nat.add n (S n0)) s) m' end then ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) else error_proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0)) (Init.Nat.add (Init.Nat.add n (S n0)) s)) (@map BC Arities arities (@map nat BC (proj (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) (seq (S (Init.Nat.add (Init.Nat.add n (S n0)) s)) s0))))) (ok_arities (Init.Nat.add n (S n0)) (Init.Nat.add s (S s0))) *)
contradict H1.
(* Goal: not (lt n1 n) *)
omega.
Qed.
Lemma BC_dummies_correct : forall e n n0 s s0 nl sl,
length nl = n + n0 ->
length sl = s + s0 ->
sem (BC_dummies n n0 s s0 e) nl sl = sem e (skipn n nl) (skipn s sl).
Opaque BC_dummies.
Fixpoint rec_simulation sl (e : Cobham) : pol :=
match e with
| Zero => pcst sl 0
| Proj i n => pcst sl 0
| Succ b => pcst sl 0
| Smash => (pplus (pplus (pproj sl 1) (pproj sl 1))
(pplus (pcst sl 16) (pplus (pproj sl 0) (pcst sl 2))))
| Rec g h0 h1 j =>
let bf := poly_Cobham j in
let ph := pplus (rec_simulation (S sl) h0) (rec_simulation (S sl) h1) in
let pg := rec_simulation (sl - 1) g in
pplus (pcomp ph (pproj sl 0 :: bf :: (map (pproj sl) (seq 1 (sl - 1)))))
(pplus (pshift pg) (pplus (pproj sl 0) (pcst sl 2)))
| Comp n h l =>
pplus (pcst sl 0)
(pplus (pcomp (rec_simulation (length l) h)
(map poly_Cobham l)) (pplusl (map (rec_simulation sl) l)))
end.
Lemma rec_simulation_arity : forall (e : Cobham) n,
arity e = ok_arity n ->
parity (rec_simulation n e) = n.
Proof.
(* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), @eq nat (@fst nat (list mon) (rec_simulation n e)) n *)
apply Cobham_ind_inf; simpl; intros; trivial.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (Init.Nat.max match Init.Nat.max (@fst nat (list mon) (poly_Cobham j)) (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) (Init.Nat.sub n O))))) with | O => S n | S m' => S (Init.Nat.max n m') end (S (Init.Nat.max (@fst nat (list mon) (rec_simulation (Init.Nat.sub n O) g)) (Init.Nat.max n n)))) (S n) *)
erewrite parity_poly_Cobham; eauto.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (Init.Nat.max match Init.Nat.max (S n) (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) (Init.Nat.sub n O))))) with | O => S n | S m' => S (Init.Nat.max n m') end (S (Init.Nat.max (@fst nat (list mon) (rec_simulation (Init.Nat.sub n O) g)) (Init.Nat.max n n)))) (S n) *)
rewrite <- minus_n_O, H3.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (Init.Nat.max match Init.Nat.max (S n) (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) n)))) with | O => S n | S m' => S (Init.Nat.max n m') end (S (Init.Nat.max n (Init.Nat.max n n)))) (S n) *)
repeat rewrite Nat.max_idempotent.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (Init.Nat.max match Init.Nat.max (S n) (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) n)))) with | O => S n | S m' => S (Init.Nat.max n m') end (S n)) (S n) *)
rewrite max_r; trivial.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: le match Init.Nat.max (S n) (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) n)))) with | O => S n | S m' => S (Init.Nat.max n m') end (S n) *)
rewrite max_l; trivial.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) n)))) (S n) *)
(* Goal: le (S (Init.Nat.max n n)) (S n) *)
rewrite max_l; trivial.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map nat pol (pproj (S n)) (seq (S O) n)))) (S n) *)
apply maxl_map; intros.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (@fst nat (list mon) x) (S n) *)
apply in_map_iff in H7.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (@fst nat (list mon) x) (S n) *)
destruct H7 as (? & ? & ?); subst x.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
(* Goal: @eq nat (@fst nat (list mon) (pproj (S n) x0)) (S n) *)
rewrite parity_pproj; trivial.
(* Goal: @eq nat (Init.Nat.max n (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))))) n *)
rewrite max_l; trivial.
(* Goal: le (Init.Nat.max (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl)))) n *)
apply Nat.max_lub.
(* Goal: le (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))) n *)
(* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol poly_Cobham rl))) n *)
apply maxl_map.
(* Goal: le (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))) n *)
(* Goal: forall (x : prod nat (list mon)) (_ : @In (prod nat (list mon)) x (@map Cobham pol poly_Cobham rl)), @eq nat (@fst nat (list mon) x) n *)
intros.
(* Goal: le (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))) n *)
(* Goal: @eq nat (@fst nat (list mon) x) n *)
apply in_map_iff in H3.
(* Goal: le (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))) n *)
(* Goal: @eq nat (@fst nat (list mon) x) n *)
destruct H3 as (? & ? & ?); subst.
(* Goal: le (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))) n *)
(* Goal: @eq nat (@fst nat (list mon) (poly_Cobham x0)) n *)
eapply parity_poly_Cobham; auto.
(* Goal: le (@fst nat (list mon) (pplusl (@map Cobham pol (rec_simulation n) rl))) n *)
rewrite parity_pplusl.
(* Goal: le (maxl (@map (prod nat (list mon)) nat (@fst nat (list mon)) (@map Cobham pol (rec_simulation n) rl))) n *)
apply maxl_map.
(* Goal: forall (x : prod nat (list mon)) (_ : @In (prod nat (list mon)) x (@map Cobham pol (rec_simulation n) rl)), @eq nat (@fst nat (list mon) x) n *)
intros.
(* Goal: @eq nat (@fst nat (list mon) x) n *)
apply in_map_iff in H3.
(* Goal: @eq nat (@fst nat (list mon) x) n *)
destruct H3 as (? & ? & ?); subst.
(* Goal: @eq nat (@fst nat (list mon) (rec_simulation n x0)) n *)
auto.
Qed.
Lemma pWF_rec_simulation : forall (e : Cobham) n,
arity e = ok_arity n ->
pWF (rec_simulation n e).
Proof.
(* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), pWF (rec_simulation n e) *)
apply Cobham_ind_inf; simpl; intros; trivial; try pWF.
(* Goal: pWF x *)
(* Goal: pWF x *)
(* Goal: pWF (rec_simulation (Init.Nat.sub n O) g) *)
(* Goal: pWF x *)
simpl in H7; decompose [or] H7; subst; pWF.
(* Goal: pWF x *)
(* Goal: pWF x *)
(* Goal: pWF (rec_simulation (Init.Nat.sub n O) g) *)
(* Goal: pWF x *)
(* Goal: pWF (poly_Cobham j) *)
eapply pWF_poly_Cobham; eauto.
(* Goal: pWF x *)
(* Goal: pWF x *)
(* Goal: pWF (rec_simulation (Init.Nat.sub n O) g) *)
(* Goal: pWF x *)
apply in_map_iff in H9.
(* Goal: pWF x *)
(* Goal: pWF x *)
(* Goal: pWF (rec_simulation (Init.Nat.sub n O) g) *)
(* Goal: pWF x *)
destruct H9 as (? & ? & ?); subst; pWF.
(* Goal: pWF x *)
(* Goal: pWF x *)
(* Goal: pWF (rec_simulation (Init.Nat.sub n O) g) *)
(* Goal: lt x0 (S n) *)
apply in_seq_iff in H9; omega.
(* Goal: pWF x *)
(* Goal: pWF x *)
(* Goal: pWF (rec_simulation (Init.Nat.sub n O) g) *)
rewrite <- minus_n_O; trivial.
(* Goal: pWF x *)
(* Goal: pWF x *)
apply in_map_iff in H3.
(* Goal: pWF x *)
(* Goal: pWF x *)
destruct H3 as (? & ? & ?); subst; pWF.
(* Goal: pWF x *)
(* Goal: pWF (poly_Cobham x0) *)
eapply pWF_poly_Cobham; simpl; auto.
(* Goal: pWF x *)
apply in_map_iff in H3.
(* Goal: pWF x *)
destruct H3 as (? & ? & ?); subst.
(* Goal: pWF (rec_simulation n x0) *)
eapply H2; trivial.
Qed.
Section PredicativeNotationRecursion.
Variable sl : nat.
Hypothesis sl_not_zero : sl <> 0.
Definition comp2n h ln ls := comp 2 0 h ln ls.
Definition comp2s h ln ls := comp 2 sl h ln ls.
Definition comp2Ss h ln ls := comp 2 (S sl) h ln ls.
Definition comp2SSs h ln ls := comp 2 (S (S sl)) h ln ls.
Definition proj2n i := proj 2 0 i.
Definition proj2s i := proj 2 sl i.
Definition proj2Ss i := proj 2 (S sl) i.
Definition proj2SSs i := proj 2 (S (S sl)) i.
Definition f'_cond := comp2Ss Y_e
[comp2n (succ true) nil [proj2n 0];
proj2n 1]
[proj2Ss 3].
Lemma f'_cond_inf : arities f'_cond = ok_arities 2 (S sl).
Proof.
(* Goal: @eq Arities (arities f'_cond) (ok_arities (S (S O)) (S sl)) *)
simpl.
(* Goal: @eq Arities match arities Y_e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities)) | error_proj n n0 n1 => error_comp (error_proj n n0 n1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (S O))) (Nat.eqb hs (S O))) true) (andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities)) end (ok_arities (S (S O)) (S sl)) *)
destruct sl.
(* Goal: @eq Arities match arities Y_e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (S O))) (Nat.eqb hs (S O))) true) (andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) end (ok_arities (S (S O)) (S (S n))) *)
(* Goal: @eq Arities match arities Y_e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities)) | error_proj n n0 n1 => error_comp (error_proj n n0 n1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (S O))) (Nat.eqb hs (S O))) true) (andb (aeq (error_proj (S (S O)) (S O) (S (S (S O)))) (ok_arities (S (S O)) (S O))) true) then ok_arities (S (S O)) (S O) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities)) end (ok_arities (S (S O)) (S O)) *)
elim sl_not_zero; trivial.
(* Goal: @eq Arities match arities Y_e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (S O))) (Nat.eqb hs (S O))) true) (andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) end (ok_arities (S (S O)) (S (S n))) *)
simpl; repeat (rewrite <- beq_nat_refl; simpl).
(* Goal: @eq Arities match arities Y_e with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (S O))) (Nat.eqb hs (S O))) true) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities)) end (ok_arities (S (S O)) (S (S n))) *)
trivial.
Qed.
Opaque f'_cond.
Variables g : BC.
Hypothesis g_inf : arities g = ok_arities 1 (sl - 1).
Definition f'_nil := BC_dummies 1 1 2 (sl - 1) g.
Lemma f'_nil_inf : arities f'_nil = ok_arities 2 (S sl).
Proof.
(* Goal: @eq Arities (arities f'_nil) (ok_arities (S (S O)) (S sl)) *)
unfold f'_nil.
(* Goal: @eq Arities (arities (BC_dummies (S O) (S O) (S (S O)) (Init.Nat.sub sl (S O)) g)) (ok_arities (S (S O)) (S sl)) *)
erewrite dummies_inf; eauto.
(* Goal: @eq Arities (ok_arities (Init.Nat.add (S O) (S O)) (Init.Nat.add (S (S O)) (Init.Nat.sub sl (S O)))) (ok_arities (S (S O)) (S sl)) *)
simpl.
(* Goal: @eq Arities (ok_arities (S (S O)) (S (S (Init.Nat.sub sl (S O))))) (ok_arities (S (S O)) (S sl)) *)
destruct sl.
(* Goal: @eq Arities (ok_arities (S (S O)) (S (S (Init.Nat.sub (S n) (S O))))) (ok_arities (S (S O)) (S (S n))) *)
(* Goal: @eq Arities (ok_arities (S (S O)) (S (S (Init.Nat.sub O (S O))))) (ok_arities (S (S O)) (S O)) *)
elim sl_not_zero; trivial.
(* Goal: @eq Arities (ok_arities (S (S O)) (S (S (Init.Nat.sub (S n) (S O))))) (ok_arities (S (S O)) (S (S n))) *)
simpl.
(* Goal: @eq Arities (ok_arities (S (S O)) (S (S (Init.Nat.sub n O)))) (ok_arities (S (S O)) (S (S n))) *)
f_equal.
(* Goal: @eq nat (S (S (Init.Nat.sub n O))) (S (S n)) *)
omega.
Qed.
Opaque f'_nil.
Variable h0 h1 : BC.
Hypothesis h0_inf : arities h0 = ok_arities 1 (S sl).
Hypothesis h1_inf : arities h1 = ok_arities 1 (S sl).
Definition f'_then :=
comp2Ss h1 [proj2n 1]
([comp2Ss Y_e [proj2n 0; proj2n 1] [proj2Ss 3];
proj2Ss 2 ] ++ (map (proj 2 (S sl)) (seq 4 (sl - 1)))).
Transparent P_e Y_e.
Lemma f'_then_inf : arities f'_then = ok_arities 2 (S sl).
Proof.
(* Goal: @eq Arities (arities f'_then) (ok_arities (S (S O)) (S sl)) *)
simpl.
(* Goal: @eq Arities match arities h1 with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) | error_proj n n0 n1 => error_comp (error_proj n n0 n1) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (S (S (@length BC (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))))) true) (andb (aeq (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S sl))) (andb (Nat.eqb sl sl) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S sl))) (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) end (ok_arities (S (S O)) (S sl)) *)
rewrite h1_inf; simpl.
(* Goal: @eq Arities (if andb (andb (Nat.eqb sl (S (@length BC (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) true) (andb (aeq (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S sl))) (andb (Nat.eqb sl sl) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S sl))) (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S O) (S sl)) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O)))))))) (ok_arities (S (S O)) (S sl)) *)
rewrite map_length, seq_length.
(* Goal: @eq Arities (if andb (andb (Nat.eqb sl (S (Init.Nat.sub sl (S O)))) true) (andb (aeq (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S sl))) (andb (Nat.eqb sl sl) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S sl))) (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S O) (S sl)) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O)))))))) (ok_arities (S (S O)) (S sl)) *)
destruct sl.
(* Goal: @eq Arities (if andb (andb (Nat.eqb (S n) (S (Init.Nat.sub (S n) (S O)))) true) (andb (aeq (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb (S n) (S n)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O))))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O)))))))) (ok_arities (S (S O)) (S (S n))) *)
(* Goal: @eq Arities (if andb (andb (Nat.eqb O (S (Init.Nat.sub O (S O)))) true) (andb (aeq (if andb (aeq (error_proj (S (S O)) (S O) (S (S (S O)))) (ok_arities (S (S O)) (S O))) true then ok_arities (S (S O)) (S O) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S O))) (andb (Nat.eqb O O) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S O))) (@map nat BC (proj (S (S O)) (S O)) (seq (S (S (S (S O)))) (Init.Nat.sub O (S O))))))) then ok_arities (S (S O)) (S O) else error_comp (ok_arities (S O) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (error_proj (S (S O)) (S O) (S (S (S O)))) (ok_arities (S (S O)) (S O))) true then ok_arities (S (S O)) (S O) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S O)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S O)) (seq (S (S (S (S O)))) (Init.Nat.sub O (S O)))))))) (ok_arities (S (S O)) (S O)) *)
elim sl_not_zero; trivial.
(* Goal: @eq Arities (if andb (andb (Nat.eqb (S n) (S (Init.Nat.sub (S n) (S O)))) true) (andb (aeq (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb (S n) (S n)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O))))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O)))))))) (ok_arities (S (S O)) (S (S n))) *)
simpl.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n (Init.Nat.sub n O)) true) (andb (aeq (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb n n) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub n O)))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub n O))))))) (ok_arities (S (S O)) (S (S n))) *)
rewrite <- minus_n_O.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n n) true) (andb (aeq (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb n n) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)))))) (ok_arities (S (S O)) (S (S n))) *)
repeat (rewrite <- beq_nat_refl; simpl).
(* Goal: @eq Arities (if @forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)))))) (ok_arities (S (S O)) (S (S n))) *)
case_eq ( forallb (fun se : BC => aeq (arities se) (ok_arities 2 (S (S n)))) (map (proj 2 (S (S n))) (seq 4 n))); intros; simpl; trivial.
(* Goal: @eq Arities (error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)))))) (ok_arities (S (S O)) (S (S n))) *)
elimtype False.
(* Goal: False *)
apply eq_true_false_abs in H; trivial.
(* Goal: @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n))) true *)
eapply forallb_forall; intros.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S (S O)) (S (S n)))) true *)
apply in_map_iff in H0.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S (S O)) (S (S n)))) true *)
destruct H0 as (? & ? & ?).
(* Goal: @eq bool (aeq (arities x) (ok_arities (S (S O)) (S (S n)))) true *)
subst.
(* Goal: @eq bool (aeq (arities (proj (S (S O)) (S (S n)) x0)) (ok_arities (S (S O)) (S (S n)))) true *)
simpl.
(* Goal: @eq bool (aeq (if Nat.leb x0 (S (S (S n))) then ok_arities (S (S O)) (S (S n)) else error_proj (S (S O)) (S (S n)) x0) (ok_arities (S (S O)) (S (S n)))) true *)
apply in_seq_iff in H1.
(* Goal: @eq bool (aeq (if Nat.leb x0 (S (S (S n))) then ok_arities (S (S O)) (S (S n)) else error_proj (S (S O)) (S (S n)) x0) (ok_arities (S (S O)) (S (S n)))) true *)
rewrite leb_correct; simpl.
(* Goal: le x0 (S (S (S n))) *)
(* Goal: @eq bool (Nat.eqb n n) true *)
rewrite <- beq_nat_refl; trivial.
(* Goal: le x0 (S (S (S n))) *)
omega.
Qed.
Opaque f'_then.
Definition f'_else :=
comp2Ss h0 [proj2n 1]
([comp2Ss Y_e [proj2n 0; proj2n 1] [proj2Ss 3];
proj2Ss 2 ] ++ (map (proj 2 (S sl)) (seq 4 (sl - 1)))).
Lemma f'_else_inf : arities f'_else = ok_arities 2 (S sl).
Proof.
(* Goal: @eq Arities (arities f'_else) (ok_arities (S (S O)) (S sl)) *)
simpl.
(* Goal: @eq Arities match arities h0 with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) | error_proj n n0 n1 => error_comp (error_proj n n0 n1) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (S (S (@length BC (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))))) true) (andb (aeq (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S sl))) (andb (Nat.eqb sl sl) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S sl))) (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) end (ok_arities (S (S O)) (S sl)) *)
rewrite h0_inf; simpl.
(* Goal: @eq Arities (if andb (andb (Nat.eqb sl (S (@length BC (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) true) (andb (aeq (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S sl))) (andb (Nat.eqb sl sl) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S sl))) (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S O) (S sl)) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O)))))))) (ok_arities (S (S O)) (S sl)) *)
rewrite map_length, seq_length.
(* Goal: @eq Arities (if andb (andb (Nat.eqb sl (S (Init.Nat.sub sl (S O)))) true) (andb (aeq (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S sl))) (andb (Nat.eqb sl sl) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S sl))) (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O))))))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S O) (S sl)) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (ok_arities (S (S O)) (S sl))) true then ok_arities (S (S O)) (S sl) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (if match sl with | O => false | S m' => true end then ok_arities (S (S O)) (S sl) else error_proj (S (S O)) (S sl) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S sl)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S sl)) (seq (S (S (S (S O)))) (Init.Nat.sub sl (S O)))))))) (ok_arities (S (S O)) (S sl)) *)
destruct sl.
(* Goal: @eq Arities (if andb (andb (Nat.eqb (S n) (S (Init.Nat.sub (S n) (S O)))) true) (andb (aeq (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb (S n) (S n)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O))))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O)))))))) (ok_arities (S (S O)) (S (S n))) *)
(* Goal: @eq Arities (if andb (andb (Nat.eqb O (S (Init.Nat.sub O (S O)))) true) (andb (aeq (if andb (aeq (error_proj (S (S O)) (S O) (S (S (S O)))) (ok_arities (S (S O)) (S O))) true then ok_arities (S (S O)) (S O) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities))) (ok_arities (S (S O)) (S O))) (andb (Nat.eqb O O) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S O))) (@map nat BC (proj (S (S O)) (S O)) (seq (S (S (S (S O)))) (Init.Nat.sub O (S O))))))) then ok_arities (S (S O)) (S O) else error_comp (ok_arities (S O) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (error_proj (S (S O)) (S O) (S (S (S O)))) (ok_arities (S (S O)) (S O))) true then ok_arities (S (S O)) (S O) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (error_proj (S (S O)) (S O) (S (S (S O)))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S O)) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S O)) (seq (S (S (S (S O)))) (Init.Nat.sub O (S O)))))))) (ok_arities (S (S O)) (S O)) *)
elim sl_not_zero; trivial.
(* Goal: @eq Arities (if andb (andb (Nat.eqb (S n) (S (Init.Nat.sub (S n) (S O)))) true) (andb (aeq (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb (S n) (S n)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O))))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (aeq (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub (S n) (S O)))))))) (ok_arities (S (S O)) (S (S n))) *)
simpl.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n (Init.Nat.sub n O)) true) (andb (aeq (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb n n) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub n O)))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) (Init.Nat.sub n O))))))) (ok_arities (S (S O)) (S (S n))) *)
rewrite <- minus_n_O.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n n) true) (andb (aeq (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (ok_arities (S (S O)) (S (S n)))) (andb (Nat.eqb n n) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n))))) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S (S O)) (S O)) (@cons Arities (ok_arities (S (S O)) O) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@nil Arities))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)))))) (ok_arities (S (S O)) (S (S n))) *)
repeat (rewrite <- beq_nat_refl; simpl).
(* Goal: @eq Arities (if @forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)) then ok_arities (S (S O)) (S (S n)) else error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)))))) (ok_arities (S (S O)) (S (S n))) *)
case_eq ( forallb (fun se : BC => aeq (arities se) (ok_arities 2 (S (S n)))) (map (proj 2 (S (S n))) (seq 4 n))); intros; simpl; trivial.
(* Goal: @eq Arities (error_comp (ok_arities (S O) (S (S n))) (@cons Arities (ok_arities (S (S O)) O) (@nil Arities)) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@cons Arities (ok_arities (S (S O)) (S (S n))) (@map BC Arities arities (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n)))))) (ok_arities (S (S O)) (S (S n))) *)
elimtype False.
(* Goal: False *)
apply eq_true_false_abs in H; trivial.
(* Goal: @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S (S O)) (S (S n)))) (@map nat BC (proj (S (S O)) (S (S n))) (seq (S (S (S (S O)))) n))) true *)
eapply forallb_forall; intros.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S (S O)) (S (S n)))) true *)
apply in_map_iff in H0.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S (S O)) (S (S n)))) true *)
destruct H0 as (? & ? & ?).
(* Goal: @eq bool (aeq (arities x) (ok_arities (S (S O)) (S (S n)))) true *)
subst.
(* Goal: @eq bool (aeq (arities (proj (S (S O)) (S (S n)) x0)) (ok_arities (S (S O)) (S (S n)))) true *)
simpl.
(* Goal: @eq bool (aeq (if Nat.leb x0 (S (S (S n))) then ok_arities (S (S O)) (S (S n)) else error_proj (S (S O)) (S (S n)) x0) (ok_arities (S (S O)) (S (S n)))) true *)
apply in_seq_iff in H1.
(* Goal: @eq bool (aeq (if Nat.leb x0 (S (S (S n))) then ok_arities (S (S O)) (S (S n)) else error_proj (S (S O)) (S (S n)) x0) (ok_arities (S (S O)) (S (S n)))) true *)
rewrite leb_correct; simpl.
(* Goal: le x0 (S (S (S n))) *)
(* Goal: @eq bool (Nat.eqb n n) true *)
rewrite <- beq_nat_refl; trivial.
(* Goal: le x0 (S (S (S n))) *)
omega.
Qed.
Opaque f'_else.
Definition f' : BC :=
rec2 (BC_dummies 0 1 1 (sl - 1) g)
(comp2Ss cond nil [f'_cond; f'_nil; f'_then; f'_else] ).
Lemma cond_simpl: forall (n s : nat) (fn fc ft ff : BC) (l1 l2 : list bs),
sem (comp n s cond nil [fc; fn; ft; ff]) l1 l2 =
match sem fc l1 l2 with
| nil => sem fn l1 l2
| true :: _ => sem ft l1 l2
| false :: _ => sem ff l1 l2
end.
Proof.
(* Goal: forall (n s : nat) (fn fc ft ff : BC) (l1 l2 : list (list bool)), @eq (list bool) (sem (comp n s cond (@nil BC) (@cons BC fc (@cons BC fn (@cons BC ft (@cons BC ff (@nil BC)))))) l1 l2) match sem fc l1 l2 with | nil => sem fn l1 l2 | cons (true as b) l => sem ft l1 l2 | cons (false as b) l => sem ff l1 l2 end *)
intros; simpl; auto.
Qed.
Lemma f'_inf : arities f' = ok_arities 2 sl.
Proof.
(* Goal: @eq Arities (arities f') (ok_arities (S (S O)) sl) *)
simpl.
(* Goal: @eq Arities match arities (BC_dummies O (S O) (S O) (Init.Nat.sub sl (S O)) g) with | error_rec a a0 a1 => error_rec (error_rec a a0 a1) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_comp a l l0 => error_rec (error_comp a l l0) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (error_proj n n0 n1) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | ok_arities gn gs => match (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities gn gs) (error_rec a a0 a1) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities gn gs) (error_comp a l l0) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities gn gs) (error_proj n n0 n1) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities gn gs) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities gn gs) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities gn gs) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S m' => Nat.eqb gn m' end (Nat.eqb h0n h1n)) match h0s with | O => false | S m' => Nat.eqb gs m' end) (Nat.eqb h0s h1s) then ok_arities h0n gs else error_rec (ok_arities gn gs) (ok_arities h0n h0s) (ok_arities h1n h1s) end end end (ok_arities (S (S O)) sl) *)
rewrite dummies_inf; trivial.
(* Goal: @eq Arities match (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_rec a a0 a1) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_comp a l l0) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_proj n n0 n1) (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (aeq (arities f'_cond) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (arities f'_cond) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S m' => Nat.eqb (Init.Nat.add O (S O)) m' end (Nat.eqb h0n h1n)) match h0s with | O => false | S m' => Nat.eqb (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) m' end) (Nat.eqb h0s h1s) then ok_arities h0n (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) else error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (ok_arities h1n h1s) end end (ok_arities (S (S O)) sl) *)
rewrite f'_cond_inf.
(* Goal: @eq Arities match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_rec a a0 a1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_comp a l l0) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_proj n n0 n1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_nil) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_nil) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S m' => Nat.eqb (Init.Nat.add O (S O)) m' end (Nat.eqb h0n h1n)) match h0s with | O => false | S m' => Nat.eqb (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) m' end) (Nat.eqb h0s h1s) then ok_arities h0n (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) else error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (ok_arities h1n h1s) end end (ok_arities (S (S O)) sl) *)
rewrite f'_nil_inf.
(* Goal: @eq Arities match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_rec a a0 a1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_comp a l l0) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_proj n n0 n1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_then) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_then) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S m' => Nat.eqb (Init.Nat.add O (S O)) m' end (Nat.eqb h0n h1n)) match h0s with | O => false | S m' => Nat.eqb (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) m' end) (Nat.eqb h0s h1s) then ok_arities h0n (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) else error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (ok_arities h1n h1s) end end (ok_arities (S (S O)) sl) *)
rewrite f'_then_inf.
(* Goal: @eq Arities match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_rec a a0 a1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_comp a l l0) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_else) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_proj n n0 n1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_else) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (arities f'_else) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (arities f'_else) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S m' => Nat.eqb (Init.Nat.add O (S O)) m' end (Nat.eqb h0n h1n)) match h0s with | O => false | S m' => Nat.eqb (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) m' end) (Nat.eqb h0s h1s) then ok_arities h0n (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) else error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (ok_arities h1n h1s) end end (ok_arities (S (S O)) sl) *)
rewrite f'_else_inf.
(* Goal: @eq Arities match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_rec a a0 a1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_comp a l l0) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (error_proj n n0 n1) (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (andb (aeq (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S m' => Nat.eqb (Init.Nat.add O (S O)) m' end (Nat.eqb h0n h1n)) match h0s with | O => false | S m' => Nat.eqb (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) m' end) (Nat.eqb h0s h1s) then ok_arities h0n (Init.Nat.add (S O) (Init.Nat.sub sl (S O))) else error_rec (ok_arities (Init.Nat.add O (S O)) (Init.Nat.add (S O) (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (ok_arities h1n h1s) end end (ok_arities (S (S O)) sl) *)
simpl.
(* Goal: @eq Arities match (if andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (error_rec a a0 a1) (if andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) | error_comp a l l0 => error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (error_comp a l l0) (if andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) | error_proj n n0 n1 => error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (error_proj n n0 n1) (if andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) | ok_arities h0n h0s => match (if andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) (andb (Nat.eqb sl sl) true))) then ok_arities (S (S O)) (S sl) else error_comp (ok_arities O (S (S (S (S O))))) (@nil Arities) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@cons Arities (ok_arities (S (S O)) (S sl)) (@nil Arities)))))) with | error_rec a a0 a1 => error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_rec a a0 a1) | error_comp a l l0 => error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_comp a l l0) | error_proj n n0 n1 => error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (error_proj n n0 n1) | ok_arities h1n h1s => if andb (andb (andb match h0n with | O => false | S (O as m') => false | S (S (O as m'0) as m') => true | S (S (S n as m'0) as m') => false end (Nat.eqb h0n h1n)) match h0s with | O => false | S (O as m') => false | S (S m'0 as m') => Nat.eqb (Init.Nat.sub sl (S O)) m'0 end) (Nat.eqb h0s h1s) then ok_arities h0n (S (Init.Nat.sub sl (S O))) else error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (ok_arities h0n h0s) (ok_arities h1n h1s) end end (ok_arities (S (S O)) sl) *)
repeat (rewrite <- beq_nat_refl; simpl).
(* Goal: @eq Arities (if andb match sl with | O => false | S m' => Nat.eqb (Init.Nat.sub sl (S O)) m' end true then ok_arities (S (S O)) (S (Init.Nat.sub sl (S O))) else error_rec (ok_arities (S O) (S (Init.Nat.sub sl (S O)))) (ok_arities (S (S O)) (S sl)) (ok_arities (S (S O)) (S sl))) (ok_arities (S (S O)) sl) *)
destruct sl.
(* Goal: @eq Arities (if andb (Nat.eqb (Init.Nat.sub (S n) (S O)) n) true then ok_arities (S (S O)) (S (Init.Nat.sub (S n) (S O))) else error_rec (ok_arities (S O) (S (Init.Nat.sub (S n) (S O)))) (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) (ok_arities (S (S O)) (S n)) *)
(* Goal: @eq Arities (if andb false true then ok_arities (S (S O)) (S (Init.Nat.sub O (S O))) else error_rec (ok_arities (S O) (S (Init.Nat.sub O (S O)))) (ok_arities (S (S O)) (S O)) (ok_arities (S (S O)) (S O))) (ok_arities (S (S O)) O) *)
elim sl_not_zero; trivial.
(* Goal: @eq Arities (if andb (Nat.eqb (Init.Nat.sub (S n) (S O)) n) true then ok_arities (S (S O)) (S (Init.Nat.sub (S n) (S O))) else error_rec (ok_arities (S O) (S (Init.Nat.sub (S n) (S O)))) (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) (ok_arities (S (S O)) (S n)) *)
simpl.
(* Goal: @eq Arities (if andb (Nat.eqb (Init.Nat.sub n O) n) true then ok_arities (S (S O)) (S (Init.Nat.sub n O)) else error_rec (ok_arities (S O) (S (Init.Nat.sub n O))) (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) (ok_arities (S (S O)) (S n)) *)
rewrite <- minus_n_O.
(* Goal: @eq Arities (if andb (Nat.eqb n n) true then ok_arities (S (S O)) (S n) else error_rec (ok_arities (S O) (S n)) (ok_arities (S (S O)) (S (S n))) (ok_arities (S (S O)) (S (S n)))) (ok_arities (S (S O)) (S n)) *)
rewrite <- beq_nat_refl; simpl.
(* Goal: @eq Arities (ok_arities (S (S O)) (S n)) (ok_arities (S (S O)) (S n)) *)
trivial.
Qed.
Definition f : BC :=
comp 1 sl f' [proj 1 0 0; proj 1 0 0]
(map (proj 1 sl) (seq 1 sl)).
Opaque f'.
Lemma f_inf : arities f = ok_arities 1 sl.
Proof.
(* Goal: @eq Arities (arities f) (ok_arities (S O) sl) *)
simpl.
(* Goal: @eq Arities match arities f' with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl))) | error_proj n n0 n1 => error_comp (error_proj n n0 n1) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S (S O))) (Nat.eqb hs (@length BC (@map nat BC (proj (S O) sl) (seq (S O) sl))))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) sl)) (@map nat BC (proj (S O) sl) (seq (S O) sl))) then ok_arities (S O) sl else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl))) end (ok_arities (S O) sl) *)
rewrite f'_inf.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb (S (S O)) (S (S O))) (Nat.eqb sl (@length BC (@map nat BC (proj (S O) sl) (seq (S O) sl))))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) sl)) (@map nat BC (proj (S O) sl) (seq (S O) sl))) then ok_arities (S O) sl else error_comp (ok_arities (S (S O)) sl) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl)))) (ok_arities (S O) sl) *)
rewrite map_length, seq_length.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb (S (S O)) (S (S O))) (Nat.eqb sl sl)) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) sl)) (@map nat BC (proj (S O) sl) (seq (S O) sl))) then ok_arities (S O) sl else error_comp (ok_arities (S (S O)) sl) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl)))) (ok_arities (S O) sl) *)
repeat (rewrite <- beq_nat_refl; simpl).
(* Goal: @eq Arities (if @forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) sl)) (@map nat BC (proj (S O) sl) (seq (S O) sl)) then ok_arities (S O) sl else error_comp (ok_arities (S (S O)) sl) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl)))) (ok_arities (S O) sl) *)
case_eq (forallb (fun se : BC => aeq (arities se) (ok_arities 1 sl)) (map (proj 1 sl) (seq 1 sl))); intros.
(* Goal: @eq Arities (error_comp (ok_arities (S (S O)) sl) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl)))) (ok_arities (S O) sl) *)
(* Goal: @eq Arities (ok_arities (S O) sl) (ok_arities (S O) sl) *)
trivial.
(* Goal: @eq Arities (error_comp (ok_arities (S (S O)) sl) (@cons Arities (ok_arities (S O) O) (@cons Arities (ok_arities (S O) O) (@nil Arities))) (@map BC Arities arities (@map nat BC (proj (S O) sl) (seq (S O) sl)))) (ok_arities (S O) sl) *)
elimtype False.
(* Goal: False *)
apply eq_true_false_abs in H; trivial.
(* Goal: @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) sl)) (@map nat BC (proj (S O) sl) (seq (S O) sl))) true *)
eapply forallb_forall; intros.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S O) sl)) true *)
apply in_map_iff in H0.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S O) sl)) true *)
destruct H0 as (? & ? & ?).
(* Goal: @eq bool (aeq (arities x) (ok_arities (S O) sl)) true *)
subst.
(* Goal: @eq bool (aeq (arities (proj (S O) sl x0)) (ok_arities (S O) sl)) true *)
simpl.
(* Goal: @eq bool (aeq (if Nat.leb x0 sl then ok_arities (S O) sl else error_proj (S O) sl x0) (ok_arities (S O) sl)) true *)
apply in_seq_iff in H1.
(* Goal: @eq bool (aeq (if Nat.leb x0 sl then ok_arities (S O) sl else error_proj (S O) sl x0) (ok_arities (S O) sl)) true *)
rewrite leb_correct; simpl.
(* Goal: le x0 sl *)
(* Goal: @eq bool (Nat.eqb sl sl) true *)
rewrite <- beq_nat_refl; trivial.
(* Goal: le x0 sl *)
omega.
Qed.
Variables g' h0' h1' cj : Cobham.
Hypothesis g'_inf : arity g' = ok_arity (sl - 1).
Hypothesis h0'_inf : arity h0' = ok_arity (S sl).
Hypothesis h1'_inf : arity h1' = ok_arity (S sl).
Hypothesis cj'_inf : arity cj = ok_arity sl.
Hypothesis g_correct : forall w xl,
length xl = (sl - 1) ->
peval (rec_simulation (sl - 1) g') (map (@length _) xl) <= length w ->
Sem g' xl = sem g [w] xl.
Hypothesis h0_correct : forall w xl,
length xl = (S sl) ->
peval (rec_simulation (S sl) h0') (map (@length _) xl) <= length w ->
Sem h0' xl = sem h0 [w] xl.
Hypothesis h1_correct : forall w xl,
length xl = (S sl) ->
peval (rec_simulation (S sl) h1') (map (@length _) xl) <= length w ->
Sem h1' xl = sem h1 [w] xl.
Transparent f'_then f'_else f'_cond f' .
Lemma f_correct : forall (w y u : bs) xl,
peval
(pcomp (pplus (rec_simulation (S sl) h0') (rec_simulation (S sl) h1'))
(pproj (length (y :: xl)) 0
:: poly_Cobham (Rec g' h0' h1' cj)
:: map (pproj (length (y :: xl)))
(seq 1 (length (y :: xl) - 1))))
(map (@length _) (y :: xl)) +
(peval (pshift (rec_simulation (sl - 1) g')) (map (@length _) (y :: xl)) +
(nth 0 (map (@length _) (y :: xl)) 0 + 2)) <= length w ->
rec_bounded (Rec g' h0' h1' cj) ->
S (length xl) = sl ->
length u <= length w ->
length w - length u <= length y ->
Sem (Rec g' h0' h1' cj) (Y u w y :: xl) =
sem f' [u; w] (y :: xl).
Opaque f'.
Lemma f'_eq_f w xl :
length xl = sl ->
sem f' [w;w] xl = sem f [w] xl.
Proof.
(* Goal: forall _ : @eq nat (@length (list bool) xl) sl, @eq (list bool) (sem f' (@cons (list bool) w (@cons (list bool) w (@nil (list bool)))) xl) (sem f (@cons (list bool) w (@nil (list bool))) xl) *)
simpl; intros.
(* Goal: @eq (list bool) (sem f' (@cons (list bool) w (@cons (list bool) w (@nil (list bool)))) xl) (sem f' (@cons (list bool) w (@cons (list bool) w (@nil (list bool)))) (@map BC (list bool) (fun se : BC => sem se (@cons (list bool) w (@nil (list bool))) xl) (@map nat BC (proj (S O) sl) (seq (S O) sl)))) *)
f_equal.
(* Goal: @eq (list (list bool)) xl (@map BC (list bool) (fun se : BC => sem se (@cons (list bool) w (@nil (list bool))) xl) (@map nat BC (proj (S O) sl) (seq (S O) sl))) *)
rewrite map_map.
(* Goal: @eq (list (list bool)) xl (@map nat (list bool) (fun x : nat => sem (proj (S O) sl x) (@cons (list bool) w (@nil (list bool))) xl) (seq (S O) sl)) *)
rewrite <- H; clear H.
(* Goal: @eq (list (list bool)) xl (@map nat (list bool) (fun x : nat => sem (proj (S O) (@length (list bool) xl) x) (@cons (list bool) w (@nil (list bool))) xl) (seq (S O) (@length (list bool) xl))) *)
induction xl; simpl; trivial.
(* Goal: @eq (list (list bool)) (@cons (list bool) a xl) (@cons (list bool) a (@map nat (list bool) (fun x : nat => if Nat.leb x O then match x with | O => w | S (O as m) => @nil bool | S (S m0 as m) => @nil bool end else match Init.Nat.sub x (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) (seq (S (S O)) (@length (list bool) xl)))) *)
f_equal.
(* Goal: @eq (list (list bool)) xl (@map nat (list bool) (fun x : nat => if Nat.leb x O then match x with | O => w | S (O as m) => @nil bool | S (S m0 as m) => @nil bool end else match Init.Nat.sub x (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) (seq (S (S O)) (@length (list bool) xl))) *)
rewrite IHxl at 1.
(* Goal: @eq (list (list bool)) (@map nat (list bool) (fun x : nat => sem (proj (S O) (@length (list bool) xl) x) (@cons (list bool) w (@nil (list bool))) xl) (seq (S O) (@length (list bool) xl))) (@map nat (list bool) (fun x : nat => if Nat.leb x O then match x with | O => w | S (O as m) => @nil bool | S (S m0 as m) => @nil bool end else match Init.Nat.sub x (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) (seq (S (S O)) (@length (list bool) xl))) *)
rewrite <- seq_shift with (start := 1).
(* Goal: @eq (list (list bool)) (@map nat (list bool) (fun x : nat => sem (proj (S O) (@length (list bool) xl) x) (@cons (list bool) w (@nil (list bool))) xl) (seq (S O) (@length (list bool) xl))) (@map nat (list bool) (fun x : nat => if Nat.leb x O then match x with | O => w | S (O as m) => @nil bool | S (S m0 as m) => @nil bool end else match Init.Nat.sub x (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) (@map nat nat S (seq (S O) (@length (list bool) xl)))) *)
rewrite map_map.
(* Goal: @eq (list (list bool)) (@map nat (list bool) (fun x : nat => sem (proj (S O) (@length (list bool) xl) x) (@cons (list bool) w (@nil (list bool))) xl) (seq (S O) (@length (list bool) xl))) (@map nat (list bool) (fun x : nat => if Nat.leb (S x) O then match x with | O => @nil bool | S m => @nil bool end else match Init.Nat.sub (S x) (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) (seq (S O) (@length (list bool) xl))) *)
apply map_ext2.
(* Goal: forall (a0 : nat) (_ : @In nat a0 (seq (S O) (@length (list bool) xl))), @eq (list bool) (sem (proj (S O) (@length (list bool) xl) a0) (@cons (list bool) w (@nil (list bool))) xl) (if Nat.leb (S a0) O then match a0 with | O => @nil bool | S m => @nil bool end else match Init.Nat.sub (S a0) (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) *)
intros.
(* Goal: @eq (list bool) (sem (proj (S O) (@length (list bool) xl) a0) (@cons (list bool) w (@nil (list bool))) xl) (if Nat.leb (S a0) O then match a0 with | O => @nil bool | S m => @nil bool end else match Init.Nat.sub (S a0) (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) *)
apply in_seq_iff in H.
(* Goal: @eq (list bool) (sem (proj (S O) (@length (list bool) xl) a0) (@cons (list bool) w (@nil (list bool))) xl) (if Nat.leb (S a0) O then match a0 with | O => @nil bool | S m => @nil bool end else match Init.Nat.sub (S a0) (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end) *)
rewrite leb_correct_conv;[ | omega].
(* Goal: @eq (list bool) (sem (proj (S O) (@length (list bool) xl) a0) (@cons (list bool) w (@nil (list bool))) xl) match Init.Nat.sub (S a0) (S O) with | O => a | S m => @nth (list bool) m xl (@nil bool) end *)
simpl.
(* Goal: @eq (list bool) (if Nat.leb a0 O then match a0 with | O => w | S (O as m) => @nil bool | S (S m0 as m) => @nil bool end else @nth (list bool) (Init.Nat.sub a0 (S O)) xl (@nil bool)) match Init.Nat.sub a0 O with | O => a | S m => @nth (list bool) m xl (@nil bool) end *)
destruct a0; simpl.
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub a0 O) xl (@nil bool)) (@nth (list bool) a0 xl (@nil bool)) *)
(* Goal: @eq (list bool) w a *)
elimtype False; omega.
(* Goal: @eq (list bool) (@nth (list bool) (Init.Nat.sub a0 O) xl (@nil bool)) (@nth (list bool) a0 xl (@nil bool)) *)
f_equal; omega.
Qed.
End PredicativeNotationRecursion.
Definition f_smash' :=
f 2 (proj 1 1 1)
(comp 1 3 (succ false) nil [proj 1 3 2])
(comp 1 3 (succ false) nil [proj 1 3 2]).
Lemma f_smash_inf : arities f_smash' = ok_arities 1 2.
Proof.
(* Goal: @eq Arities (arities f_smash') (ok_arities (S O) (S (S O))) *)
unfold f_smash'.
(* Goal: @eq Arities (arities (f (S (S O)) (proj (S O) (S O) (S O)) (comp (S O) (S (S (S O))) (succ false) (@nil BC) (@cons BC (proj (S O) (S (S (S O))) (S (S O))) (@nil BC))) (comp (S O) (S (S (S O))) (succ false) (@nil BC) (@cons BC (proj (S O) (S (S (S O))) (S (S O))) (@nil BC))))) (ok_arities (S O) (S (S O))) *)
erewrite f_inf; trivial.
(* Goal: not (@eq nat (S (S O)) O) *)
omega.
Qed.
Opaque f_smash'.
Fixpoint Cobham_to_BC' sl (e : Cobham) : BC :=
match e with
| Zero => comp 1 sl zero nil nil
| Proj n i => proj 1 sl (S i)
| Succ b => comp 1 sl (succ b) nil [proj 1 sl 1]
| Smash => f sl (one_e 1 1)
(BC_dummies 0 1 1 2 (comp 1 2 f_smash' [proj 1 0 0] [proj 1 2 2; proj 1 2 1]))
(BC_dummies 0 1 1 2 (comp 1 2 f_smash' [proj 1 0 0] [proj 1 2 2; proj 1 2 1]))
| Rec g' h0' h1' _ =>
let g := Cobham_to_BC' (sl - 1) g' in
let h0 := Cobham_to_BC' (S sl) h0' in
let h1 := Cobham_to_BC' (S sl) h1' in
f sl g h0 h1
| Comp n h l => comp 1 sl (Cobham_to_BC' (length l) h)
[proj 1 0 0] (map (Cobham_to_BC' sl) l)
end.
Opaque f.
Lemma Cobham_to_BC'_inf : forall e sl,
arity e = ok_arity sl ->
arities (Cobham_to_BC' sl e) = ok_arities 1 sl.
Proof.
(* Goal: forall (e : Cobham) (sl : nat) (_ : @eq Arity (arity e) (ok_arity sl)), @eq Arities (arities (Cobham_to_BC' sl e)) (ok_arities (S O) sl) *)
apply Cobham_ind_inf; simpl; intros; trivial.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (f (S n) (Cobham_to_BC' (Init.Nat.sub n O) g) (Cobham_to_BC' (S (S n)) h0) (Cobham_to_BC' (S (S n)) h1))) (ok_arities (S O) (S n)) *)
(* Goal: @eq Arities (if match n with | O => false | S m' => Nat.leb i m' end then ok_arities (S O) n else error_proj (S O) n (S i)) (ok_arities (S O) n) *)
destruct n.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (f (S n) (Cobham_to_BC' (Init.Nat.sub n O) g) (Cobham_to_BC' (S (S n)) h0) (Cobham_to_BC' (S (S n)) h1))) (ok_arities (S O) (S n)) *)
(* Goal: @eq Arities (if Nat.leb i n then ok_arities (S O) (S n) else error_proj (S O) (S n) (S i)) (ok_arities (S O) (S n)) *)
(* Goal: @eq Arities (error_proj (S O) O (S i)) (ok_arities (S O) O) *)
contradict H; omega.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (f (S n) (Cobham_to_BC' (Init.Nat.sub n O) g) (Cobham_to_BC' (S (S n)) h0) (Cobham_to_BC' (S (S n)) h1))) (ok_arities (S O) (S n)) *)
(* Goal: @eq Arities (if Nat.leb i n then ok_arities (S O) (S n) else error_proj (S O) (S n) (S i)) (ok_arities (S O) (S n)) *)
case_eq (leb i n); intros; trivial.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (f (S n) (Cobham_to_BC' (Init.Nat.sub n O) g) (Cobham_to_BC' (S (S n)) h0) (Cobham_to_BC' (S (S n)) h1))) (ok_arities (S O) (S n)) *)
(* Goal: @eq Arities (error_proj (S O) (S n) (S i)) (ok_arities (S O) (S n)) *)
rewrite leb_iff_conv in H0.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (f (S n) (Cobham_to_BC' (Init.Nat.sub n O) g) (Cobham_to_BC' (S (S n)) h0) (Cobham_to_BC' (S (S n)) h1))) (ok_arities (S O) (S n)) *)
(* Goal: @eq Arities (error_proj (S O) (S n) (S i)) (ok_arities (S O) (S n)) *)
contradict H; omega.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (f (S n) (Cobham_to_BC' (Init.Nat.sub n O) g) (Cobham_to_BC' (S (S n)) h0) (Cobham_to_BC' (S (S n)) h1))) (ok_arities (S O) (S n)) *)
erewrite f_inf; trivial; eauto.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
(* Goal: @eq Arities (arities (Cobham_to_BC' (Init.Nat.sub n O) g)) (ok_arities (S O) (Init.Nat.sub (S n) (S O))) *)
simpl; rewrite <- minus_n_O; trivial.
(* Goal: @eq Arities match arities (Cobham_to_BC' (@length Cobham rl) h) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities hn hs) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl)) end (ok_arities (S O) n) *)
rewrite H1.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb (S O) (S O)) (Nat.eqb (@length Cobham rl) (@length BC (@map Cobham BC (Cobham_to_BC' n) rl)))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities (S O) (@length Cobham rl)) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl))) (ok_arities (S O) n) *)
rewrite map_length.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb (S O) (S O)) (Nat.eqb (@length Cobham rl) (@length Cobham rl))) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) then ok_arities (S O) n else error_comp (ok_arities (S O) (@length Cobham rl)) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl))) (ok_arities (S O) n) *)
repeat (rewrite <- beq_nat_refl; simpl).
(* Goal: @eq Arities (if @forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl) then ok_arities (S O) n else error_comp (ok_arities (S O) (@length Cobham rl)) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl))) (ok_arities (S O) n) *)
case_eq (forallb (fun se : BC => aeq (arities se) (ok_arities 1 n)) (map (Cobham_to_BC' n) rl)); intros; trivial.
(* Goal: @eq Arities (error_comp (ok_arities (S O) (@length Cobham rl)) (@cons Arities (ok_arities (S O) O) (@nil Arities)) (@map BC Arities arities (@map Cobham BC (Cobham_to_BC' n) rl))) (ok_arities (S O) n) *)
elimtype False.
(* Goal: False *)
apply eq_true_false_abs in H3; trivial.
(* Goal: @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities (S O) n)) (@map Cobham BC (Cobham_to_BC' n) rl)) true *)
eapply forallb_forall; intros.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S O) n)) true *)
apply in_map_iff in H4.
(* Goal: @eq bool (aeq (arities x) (ok_arities (S O) n)) true *)
destruct H4 as (? & ? & ?); subst.
(* Goal: @eq bool (aeq (arities (Cobham_to_BC' n x0)) (ok_arities (S O) n)) true *)
rewrite H2; simpl; trivial.
(* Goal: @eq bool (Nat.eqb n n) true *)
rewrite <- beq_nat_refl; auto.
Qed.
Opaque f'.
Definition smash'_e : BC :=
rec2 (proj 0 1 0) (comp 1 2 (succ false) nil [proj 1 2 1]).
Lemma smash'_correct x y :
sem smash'_e [x] [y] = smash' x y.
Proof.
(* Goal: @eq (list bool) (sem smash'_e (@cons (list bool) x (@nil (list bool))) (@cons (list bool) y (@nil (list bool)))) (smash' x y) *)
induction x; simpl in *; intros; trivial.
(* Goal: @eq (list bool) (if a then @cons bool false (sem_rec (fun _ vsl : list (list bool) => @nth (list bool) O vsl (@nil bool)) (fun _ vsl : list (list bool) => @cons bool false (@nth (list bool) O vsl (@nil bool))) (fun _ vsl : list (list bool) => @cons bool false (@nth (list bool) O vsl (@nil bool))) x (@nil (list bool)) (@cons (list bool) y (@nil (list bool)))) else @cons bool false (sem_rec (fun _ vsl : list (list bool) => @nth (list bool) O vsl (@nil bool)) (fun _ vsl : list (list bool) => @cons bool false (@nth (list bool) O vsl (@nil bool))) (fun _ vsl : list (list bool) => @cons bool false (@nth (list bool) O vsl (@nil bool))) x (@nil (list bool)) (@cons (list bool) y (@nil (list bool))))) (@cons bool false (smash' x y)) *)
case a; rewrite IHx; clear IHx; trivial.
Qed.
Opaque smash'_e.
Definition smash_e : BC :=
rec2 (comp 1 0 (succ true) nil [zero_e 1 0])
(comp 2 1 smash'_e [proj 2 0 1] [proj 2 1 2]).
Lemma smash_correct x y :
sem smash_e [x;y] nil = smash_bs x y.
Proof.
(* Goal: @eq (list bool) (sem smash_e (@cons (list bool) x (@cons (list bool) y (@nil (list bool)))) (@nil (list bool))) (smash_bs x y) *)
induction x; simpl in *; intros; trivial.
(* Goal: @eq (list bool) (if a then sem smash'_e (@cons (list bool) y (@nil (list bool))) (@cons (list bool) (sem_rec (fun _ _ : list (list bool) => @cons bool true (@nil bool)) (fun vnl vsl : list (list bool) => sem smash'_e (@cons (list bool) (@nth (list bool) (S O) vnl (@nil bool)) (@nil (list bool))) (@cons (list bool) (@nth (list bool) O vsl (@nil bool)) (@nil (list bool)))) (fun vnl vsl : list (list bool) => sem smash'_e (@cons (list bool) (@nth (list bool) (S O) vnl (@nil bool)) (@nil (list bool))) (@cons (list bool) (@nth (list bool) O vsl (@nil bool)) (@nil (list bool)))) x (@cons (list bool) y (@nil (list bool))) (@nil (list bool))) (@nil (list bool))) else sem smash'_e (@cons (list bool) y (@nil (list bool))) (@cons (list bool) (sem_rec (fun _ _ : list (list bool) => @cons bool true (@nil bool)) (fun vnl vsl : list (list bool) => sem smash'_e (@cons (list bool) (@nth (list bool) (S O) vnl (@nil bool)) (@nil (list bool))) (@cons (list bool) (@nth (list bool) O vsl (@nil bool)) (@nil (list bool)))) (fun vnl vsl : list (list bool) => sem smash'_e (@cons (list bool) (@nth (list bool) (S O) vnl (@nil bool)) (@nil (list bool))) (@cons (list bool) (@nth (list bool) O vsl (@nil bool)) (@nil (list bool)))) x (@cons (list bool) y (@nil (list bool))) (@nil (list bool))) (@nil (list bool)))) (smash' y (smash_bs x y)) *)
case a; rewrite IHx; clear IHx; apply smash'_correct.
Qed.
Transparent f.
Opaque Mult_e.
Opaque Plus_e.
Opaque App_e.
Lemma rec_simulation_correct : forall (e : Cobham) n,
arity e = ok_arity n ->
forall xl w,
rec_bounded e ->
length xl = n ->
peval (rec_simulation n e) (map (@length _) xl) <= length w ->
Sem e xl = sem (Cobham_to_BC' n e) [w] xl.
Definition concat := smash'_e.
Definition poly_BC_pow (ar:nat)(xn:pow) : BC :=
multl_e ar (repeat (snd xn) (proj ar 0 (fst xn))).
Lemma poly_BC_pow_arities :
forall ar xn, pWF_pow ar xn -> arities (poly_BC_pow ar xn) = ok_arities ar 0.
Proof.
(* Goal: forall (ar : nat) (xn : pow) (_ : pWF_pow ar xn), @eq Arities (arities (poly_BC_pow ar xn)) (ok_arities ar O) *)
unfold poly_BC_pow.
(* Goal: forall (ar : nat) (xn : pow) (_ : pWF_pow ar xn), @eq Arities (arities (multl_e ar (@repeat BC (@snd nat nat xn) (proj ar O (@fst nat nat xn))))) (ok_arities ar O) *)
intros ar [x n] Hwf.
(* Goal: @eq Arities (arities (multl_e ar (@repeat BC (@snd nat nat (@pair nat nat x n)) (proj ar O (@fst nat nat (@pair nat nat x n)))))) (ok_arities ar O) *)
simpl.
(* Goal: @eq Arities (arities (multl_e ar (@repeat BC n (proj ar O x)))) (ok_arities ar O) *)
induction n as [ | n IH].
(* Goal: @eq Arities (arities (multl_e ar (@repeat BC (S n) (proj ar O x)))) (ok_arities ar O) *)
(* Goal: @eq Arities (arities (multl_e ar (@repeat BC O (proj ar O x)))) (ok_arities ar O) *)
trivial.
(* Goal: @eq Arities (arities (multl_e ar (@repeat BC (S n) (proj ar O x)))) (ok_arities ar O) *)
apply multl_arities.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@repeat BC (S n) (proj ar O x)) *)
rewrite <- forall_andl.
(* Goal: forall (x0 : BC) (_ : @In BC x0 (@repeat BC (S n) (proj ar O x))), @eq Arities (arities x0) (ok_arities ar O) *)
intros e H.
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
apply in_repeat_eq in H.
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
subst e.
(* Goal: @eq Arities (arities (proj ar O x)) (ok_arities ar O) *)
rewrite proj_arities.
(* Goal: lt x (Init.Nat.add ar O) *)
(* Goal: @eq Arities (ok_arities ar O) (ok_arities ar O) *)
trivial.
(* Goal: lt x (Init.Nat.add ar O) *)
auto with arith.
Qed.
Lemma poly_BC_pow_correct :
forall ar xn nl, pWF_pow ar xn ->
length (sem (poly_BC_pow ar xn) nl nil) = peval_pow xn (map (@length _) nl).
Opaque poly_BC_pow.
Definition poly_BC_mon (ar:nat)(m:mon) : BC :=
multl_e ar (nat2BC ar 0 (fst m) :: map (poly_BC_pow ar) (snd m)).
Lemma poly_BC_mon_arities :
forall ar xn, pWF_mon ar xn -> arities (poly_BC_mon ar xn) = ok_arities ar 0.
Proof.
(* Goal: forall (ar : nat) (xn : mon) (_ : pWF_mon ar xn), @eq Arities (arities (poly_BC_mon ar xn)) (ok_arities ar O) *)
unfold poly_BC_mon, pWF_mon.
(* Goal: forall (ar : nat) (xn : mon) (_ : @andl pow (pWF_pow ar) (@snd nat (list pow) xn)), @eq Arities (arities (multl_e ar (@cons BC (nat2BC ar O (@fst nat (list pow) xn)) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) xn))))) (ok_arities ar O) *)
intros ar [x n] Hwf.
(* Goal: @eq Arities (arities (multl_e ar (@cons BC (nat2BC ar O (@fst nat (list pow) (@pair nat (list pow) x n))) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) (@pair nat (list pow) x n)))))) (ok_arities ar O) *)
rewrite multl_arities.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@cons BC (nat2BC ar O (@fst nat (list pow) (@pair nat (list pow) x n))) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) (@pair nat (list pow) x n)))) *)
(* Goal: @eq Arities (ok_arities ar O) (ok_arities ar O) *)
trivial.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@cons BC (nat2BC ar O (@fst nat (list pow) (@pair nat (list pow) x n))) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) (@pair nat (list pow) x n)))) *)
simpl in *.
(* Goal: and (@eq Arities (arities (nat2BC ar O x)) (ok_arities ar O)) (@andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@map pow BC (poly_BC_pow ar) n)) *)
split.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@map pow BC (poly_BC_pow ar) n) *)
(* Goal: @eq Arities (arities (nat2BC ar O x)) (ok_arities ar O) *)
apply nat2BC_arities.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@map pow BC (poly_BC_pow ar) n) *)
rewrite <- forall_andl in *.
(* Goal: forall (x : BC) (_ : @In BC x (@map pow BC (poly_BC_pow ar) n)), @eq Arities (arities x) (ok_arities ar O) *)
intros e He.
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
rewrite in_map_iff in He.
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
destruct He as [xn [H1 H2] ].
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
subst e.
(* Goal: @eq Arities (arities (poly_BC_pow ar xn)) (ok_arities ar O) *)
apply poly_BC_pow_arities.
(* Goal: pWF_pow ar xn *)
apply Hwf.
(* Goal: @In pow xn n *)
exact H2.
Qed.
Lemma poly_BC_mon_correct :
forall ar m nl, pWF_mon ar m ->
length (sem (poly_BC_mon ar m) nl nil) = peval_mon m (map (@length _) nl).
Proof.
(* Goal: forall (ar : nat) (m : mon) (nl : list (list bool)) (_ : pWF_mon ar m), @eq nat (@length bool (sem (poly_BC_mon ar m) nl (@nil (list bool)))) (peval_mon m (@map (list bool) nat (@length bool) nl)) *)
unfold poly_BC_mon, peval_mon, pWF_mon.
(* Goal: forall (ar : nat) (m : mon) (nl : list (list bool)) (_ : @andl pow (pWF_pow ar) (@snd nat (list pow) m)), @eq nat (@length bool (sem (multl_e ar (@cons BC (nat2BC ar O (@fst nat (list pow) m)) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) m)))) nl (@nil (list bool)))) (Init.Nat.mul (@fst nat (list pow) m) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) (@snd nat (list pow) m)))) *)
intros ar [ar' xnl] nl H.
(* Goal: @eq nat (@length bool (sem (multl_e ar (@cons BC (nat2BC ar O (@fst nat (list pow) (@pair nat (list pow) ar' xnl))) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) (@pair nat (list pow) ar' xnl))))) nl (@nil (list bool)))) (Init.Nat.mul (@fst nat (list pow) (@pair nat (list pow) ar' xnl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) (@snd nat (list pow) (@pair nat (list pow) ar' xnl))))) *)
rewrite multl_correct.
(* Goal: @eq nat (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@cons BC (nat2BC ar O (@fst nat (list pow) (@pair nat (list pow) ar' xnl))) (@map pow BC (poly_BC_pow ar) (@snd nat (list pow) (@pair nat (list pow) ar' xnl)))))) (Init.Nat.mul (@fst nat (list pow) (@pair nat (list pow) ar' xnl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) (@snd nat (list pow) (@pair nat (list pow) ar' xnl))))) *)
simpl in *.
(* Goal: @eq nat (Init.Nat.mul (@length bool (sem (nat2BC ar O ar') nl (@nil (list bool)))) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl)))) (Init.Nat.mul ar' (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl))) *)
induction xnl as [ | xn xnl IH ]; simpl.
(* Goal: @eq nat (Init.Nat.mul (@length bool (sem (nat2BC ar O ar') nl (@nil (list bool)))) (Init.Nat.mul (@length bool (sem (poly_BC_pow ar xn) nl (@nil (list bool)))) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
(* Goal: @eq nat (Init.Nat.mul (@length bool (sem (nat2BC ar O ar') nl (@nil (list bool)))) (S O)) (Init.Nat.mul ar' (S O)) *)
rewrite nat2BC_correct.
(* Goal: @eq nat (Init.Nat.mul (@length bool (sem (nat2BC ar O ar') nl (@nil (list bool)))) (Init.Nat.mul (@length bool (sem (poly_BC_pow ar xn) nl (@nil (list bool)))) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
(* Goal: @eq nat (Init.Nat.mul ar' (S O)) (Init.Nat.mul ar' (S O)) *)
trivial.
(* Goal: @eq nat (Init.Nat.mul (@length bool (sem (nat2BC ar O ar') nl (@nil (list bool)))) (Init.Nat.mul (@length bool (sem (poly_BC_pow ar xn) nl (@nil (list bool)))) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
simpl in H.
(* Goal: @eq nat (Init.Nat.mul (@length bool (sem (nat2BC ar O ar') nl (@nil (list bool)))) (Init.Nat.mul (@length bool (sem (poly_BC_pow ar xn) nl (@nil (list bool)))) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
rewrite nat2BC_correct, poly_BC_pow_correct.
(* Goal: pWF_pow ar xn *)
(* Goal: @eq nat (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
rewrite nat2BC_correct in IH.
(* Goal: pWF_pow ar xn *)
(* Goal: @eq nat (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
rewrite (mult_comm (peval_pow _ _)).
(* Goal: pWF_pow ar xn *)
(* Goal: @eq nat (Init.Nat.mul ar' (Nat.mul (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl))) (peval_pow xn (@map (list bool) nat (@length bool) nl)))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
rewrite mult_assoc.
(* Goal: pWF_pow ar xn *)
(* Goal: @eq nat (Nat.mul (Nat.mul ar' (multl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map pow BC (poly_BC_pow ar) xnl)))) (peval_pow xn (@map (list bool) nat (@length bool) nl))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
rewrite IH.
(* Goal: pWF_pow ar xn *)
(* Goal: @andl pow (pWF_pow ar) xnl *)
(* Goal: @eq nat (Nat.mul (Init.Nat.mul ar' (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl))) (peval_pow xn (@map (list bool) nat (@length bool) nl))) (Init.Nat.mul ar' (Init.Nat.mul (peval_pow xn (@map (list bool) nat (@length bool) nl)) (multl (@map pow nat (fun x : pow => peval_pow x (@map (list bool) nat (@length bool) nl)) xnl)))) *)
ring.
(* Goal: pWF_pow ar xn *)
(* Goal: @andl pow (pWF_pow ar) xnl *)
tauto.
(* Goal: pWF_pow ar xn *)
tauto.
Qed.
Definition poly_BC (p : pol) : BC :=
plusl_e (fst p) (map (poly_BC_mon (fst p)) (snd p)).
Lemma poly_BC_arities :
forall p, pWF p -> arities (poly_BC p) = ok_arities (parity p) 0.
Proof.
(* Goal: forall (p : pol) (_ : pWF p), @eq Arities (arities (poly_BC p)) (ok_arities (@fst nat (list mon) p) O) *)
unfold poly_BC, pWF, pWF'.
(* Goal: forall (p : pol) (_ : @andl mon (pWF_mon (@fst nat (list mon) p)) (@snd nat (list mon) p)), @eq Arities (arities (plusl_e (@fst nat (list mon) p) (@map mon BC (poly_BC_mon (@fst nat (list mon) p)) (@snd nat (list mon) p)))) (ok_arities (@fst nat (list mon) p) O) *)
intros [ar ml] Hwf.
(* Goal: @eq Arities (arities (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar ml)) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar ml))) (@snd nat (list mon) (@pair nat (list mon) ar ml))))) (ok_arities (@fst nat (list mon) (@pair nat (list mon) ar ml)) O) *)
simpl in *.
(* Goal: @eq Arities (arities (plusl_e ar (@map mon BC (poly_BC_mon ar) ml))) (ok_arities ar O) *)
rewrite plusl_arities.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@map mon BC (poly_BC_mon ar) ml) *)
(* Goal: @eq Arities (ok_arities ar O) (ok_arities ar O) *)
trivial.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@map mon BC (poly_BC_mon ar) ml) *)
rewrite <- forall_andl in Hwf.
(* Goal: @andl BC (fun e : BC => @eq Arities (arities e) (ok_arities ar O)) (@map mon BC (poly_BC_mon ar) ml) *)
rewrite <- forall_andl.
(* Goal: forall (x : BC) (_ : @In BC x (@map mon BC (poly_BC_mon ar) ml)), @eq Arities (arities x) (ok_arities ar O) *)
intros e He.
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
rewrite in_map_iff in He.
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
destruct He as [m [H1 H2] ].
(* Goal: @eq Arities (arities e) (ok_arities ar O) *)
subst e.
(* Goal: @eq Arities (arities (poly_BC_mon ar m)) (ok_arities ar O) *)
apply poly_BC_mon_arities.
(* Goal: pWF_mon ar m *)
apply Hwf.
(* Goal: @In mon m ml *)
exact H2.
Qed.
Lemma poly_BC_correct :
forall p nl, pWF p ->
length (sem (poly_BC p) nl nil) = peval p (map (@length _) nl).
Proof.
(* Goal: forall (p : pol) (nl : list (list bool)) (_ : pWF p), @eq nat (@length bool (sem (poly_BC p) nl (@nil (list bool)))) (peval p (@map (list bool) nat (@length bool) nl)) *)
unfold poly_BC, pWF, pWF'.
(* Goal: forall (p : pol) (nl : list (list bool)) (_ : @andl mon (pWF_mon (@fst nat (list mon) p)) (@snd nat (list mon) p)), @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) p) (@map mon BC (poly_BC_mon (@fst nat (list mon) p)) (@snd nat (list mon) p))) nl (@nil (list bool)))) (peval p (@map (list bool) nat (@length bool) nl)) *)
intros [ar ml] nl Hwf.
(* Goal: @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar ml)) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar ml))) (@snd nat (list mon) (@pair nat (list mon) ar ml)))) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar ml) (@map (list bool) nat (@length bool) nl)) *)
induction ml as [ | m ml IH].
(* Goal: @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))))) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
(* Goal: @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar (@nil mon))) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@nil mon)))) (@snd nat (list mon) (@pair nat (list mon) ar (@nil mon))))) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar (@nil mon)) (@map (list bool) nat (@length bool) nl)) *)
trivial.
(* Goal: @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))))) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
generalize plusl_correct.
(* Goal: forall _ : forall (n : nat) (nl : list (list bool)) (el : list BC), @eq nat (@length bool (sem (plusl_e n el) nl (@nil (list bool)))) (plusl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) el)), @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))))) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
intros.
(* Goal: @eq nat (@length bool (sem (plusl_e (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))))) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
rewrite H in *.
(* Goal: @eq nat (plusl (@map BC nat (fun e : BC => @length bool (sem e nl (@nil (list bool)))) (@map mon BC (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml)))))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
rewrite map_map in *.
(* Goal: @eq nat (plusl (@map mon nat (fun x : mon => @length bool (sem (poly_BC_mon (@fst nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))) x) nl (@nil (list bool)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
simpl fst in *.
(* Goal: @eq nat (plusl (@map mon nat (fun x : mon => @length bool (sem (poly_BC_mon ar x) nl (@nil (list bool)))) (@snd nat (list mon) (@pair nat (list mon) ar (@cons mon m ml))))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
simpl snd in *.
(* Goal: @eq nat (plusl (@map mon nat (fun x : mon => @length bool (sem (poly_BC_mon ar x) nl (@nil (list bool)))) (@cons mon m ml))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
simpl in Hwf.
(* Goal: @eq nat (plusl (@map mon nat (fun x : mon => @length bool (sem (poly_BC_mon ar x) nl (@nil (list bool)))) (@cons mon m ml))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
rewrite map_cons, plusl_cons, IH.
(* Goal: @andl mon (pWF_mon ar) ml *)
(* Goal: @eq nat (Init.Nat.add (@length bool (sem (poly_BC_mon ar m) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar ml) (@map (list bool) nat (@length bool) nl))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
generalize poly_BC_mon_correct.
(* Goal: @andl mon (pWF_mon ar) ml *)
(* Goal: forall _ : forall (ar : nat) (m : mon) (nl : list (list bool)) (_ : pWF_mon ar m), @eq nat (@length bool (sem (poly_BC_mon ar m) nl (@nil (list bool)))) (peval_mon m (@map (list bool) nat (@length bool) nl)), @eq nat (Init.Nat.add (@length bool (sem (poly_BC_mon ar m) nl (@nil (list bool)))) (peval (@pair nat (list mon) ar ml) (@map (list bool) nat (@length bool) nl))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
intros; rewrite H0.
(* Goal: @andl mon (pWF_mon ar) ml *)
(* Goal: pWF_mon ar m *)
(* Goal: @eq nat (Init.Nat.add (peval_mon m (@map (list bool) nat (@length bool) nl)) (peval (@pair nat (list mon) ar ml) (@map (list bool) nat (@length bool) nl))) (peval (@pair nat (list mon) ar (@cons mon m ml)) (@map (list bool) nat (@length bool) nl)) *)
trivial.
(* Goal: @andl mon (pWF_mon ar) ml *)
(* Goal: pWF_mon ar m *)
tauto.
(* Goal: @andl mon (pWF_mon ar) ml *)
tauto.
Qed.
Definition Cobham_to_BC'' n e :=
comp n n (Cobham_to_BC' n e) [poly_BC (rec_simulation n e)]
(map (proj n n) (seq n n)).
Lemma Cobham_to_BC''_inf : forall e n,
arity e = ok_arity n ->
arities (Cobham_to_BC'' n e) = ok_arities n n.
Proof.
(* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), @eq Arities (arities (Cobham_to_BC'' n e)) (ok_arities n n) *)
intros; simpl.
(* Goal: @eq Arities match arities (Cobham_to_BC' n e) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n))) | error_comp a l l0 => error_comp (error_comp a l l0) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n))) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (S O)) (Nat.eqb hs (@length BC (@map nat BC (proj n n) (seq n n))))) (andb (aeq (arities (poly_BC (rec_simulation n e))) (ok_arities n O)) true)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities hn hs) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n))) end (ok_arities n n) *)
erewrite Cobham_to_BC'_inf; simpl; trivial.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n (@length BC (@map nat BC (proj n n) (seq n n)))) (andb (aeq (arities (poly_BC (rec_simulation n e))) (ok_arities n O)) true)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
rewrite map_length.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n (@length nat (seq n n))) (andb (aeq (arities (poly_BC (rec_simulation n e))) (ok_arities n O)) true)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
rewrite seq_length.
(* Goal: @eq Arities (if andb (andb (Nat.eqb n n) (andb (aeq (arities (poly_BC (rec_simulation n e))) (ok_arities n O)) true)) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
rewrite <- beq_nat_refl; simpl.
(* Goal: @eq Arities (if andb (andb (aeq (arities (poly_BC (rec_simulation n e))) (ok_arities n O)) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (arities (poly_BC (rec_simulation n e))) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
erewrite poly_BC_arities.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq Arities (if andb (andb (aeq (ok_arities (@fst nat (list mon) (rec_simulation n e)) O) (ok_arities n O)) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (ok_arities (@fst nat (list mon) (rec_simulation n e)) O) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
rewrite rec_simulation_arity; trivial.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq Arities (if andb (andb (aeq (ok_arities n O) (ok_arities n O)) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (ok_arities n O) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
simpl.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n n) true) true) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (ok_arities n O) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
rewrite <- beq_nat_refl; simpl.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq Arities (if @forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n)) then ok_arities n n else error_comp (ok_arities (S O) n) (@cons Arities (ok_arities n O) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
case_eq ( forallb (fun se : BC => aeq (arities se) (ok_arities n n)) (map (proj n n) (seq n n)) ); intros.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq Arities (error_comp (ok_arities (S O) n) (@cons Arities (ok_arities n O) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
(* Goal: @eq Arities (ok_arities n n) (ok_arities n n) *)
trivial.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq Arities (error_comp (ok_arities (S O) n) (@cons Arities (ok_arities n O) (@nil Arities)) (@map BC Arities arities (@map nat BC (proj n n) (seq n n)))) (ok_arities n n) *)
elimtype False; apply eq_true_false_abs with (2 := H0).
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n n)) (@map nat BC (proj n n) (seq n n))) true *)
rewrite forallb_forall; intros.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (arities x) (ok_arities n n)) true *)
apply in_map_iff in H1.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (arities x) (ok_arities n n)) true *)
destruct H1 as (? & ? & ?).
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (arities x) (ok_arities n n)) true *)
subst.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (arities (proj n n x0)) (ok_arities n n)) true *)
simpl; trivial.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (if match Init.Nat.add n n with | O => false | S m' => Nat.leb x0 m' end then ok_arities n n else error_proj n n x0) (ok_arities n n)) true *)
apply in_seq_iff in H2.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (if match Init.Nat.add n n with | O => false | S m' => Nat.leb x0 m' end then ok_arities n n else error_proj n n x0) (ok_arities n n)) true *)
case_eq (n + n); intros.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (if Nat.leb x0 n0 then ok_arities n n else error_proj n n x0) (ok_arities n n)) true *)
(* Goal: @eq bool (aeq (error_proj n n x0) (ok_arities n n)) true *)
elimtype False; omega.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: @eq bool (aeq (if Nat.leb x0 n0 then ok_arities n n else error_proj n n x0) (ok_arities n n)) true *)
rewrite leb_correct; simpl.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: le x0 n0 *)
(* Goal: @eq bool (andb (Nat.eqb n n) (Nat.eqb n n)) true *)
rewrite <- beq_nat_refl; simpl; trivial.
(* Goal: pWF (rec_simulation n e) *)
(* Goal: le x0 n0 *)
omega.
(* Goal: pWF (rec_simulation n e) *)
apply pWF_rec_simulation; trivial.
Qed.
Lemma seq_map : forall A len start (f : nat -> A),
map (fun x => f x) (seq start len) = map (fun x => f (x + start)) (seq 0 len).
Proof.
(* Goal: forall (A : Type) (len start : nat) (f : forall _ : nat, A), @eq (list A) (@map nat A (fun x : nat => f x) (seq start len)) (@map nat A (fun x : nat => f (Init.Nat.add x start)) (seq O len)) *)
induction len; simpl; intros.
(* Goal: @eq (list A) (@cons A (f0 start) (@map nat A (fun x : nat => f0 x) (seq (S start) len))) (@cons A (f0 start) (@map nat A (fun x : nat => f0 (Init.Nat.add x start)) (seq (S O) len))) *)
(* Goal: @eq (list A) (@nil A) (@nil A) *)
trivial.
(* Goal: @eq (list A) (@cons A (f0 start) (@map nat A (fun x : nat => f0 x) (seq (S start) len))) (@cons A (f0 start) (@map nat A (fun x : nat => f0 (Init.Nat.add x start)) (seq (S O) len))) *)
f_equal.
(* Goal: @eq (list A) (@map nat A (fun x : nat => f0 x) (seq (S start) len)) (@map nat A (fun x : nat => f0 (Init.Nat.add x start)) (seq (S O) len)) *)
repeat rewrite <- seq_shift.
(* Goal: @eq (list A) (@map nat A (fun x : nat => f0 x) (@map nat nat S (seq start len))) (@map nat A (fun x : nat => f0 (Init.Nat.add x start)) (@map nat nat S (seq O len))) *)
repeat rewrite map_map.
(* Goal: @eq (list A) (@map nat A (fun x : nat => f0 (S x)) (seq start len)) (@map nat A (fun x : nat => f0 (Init.Nat.add (S x) start)) (seq O len)) *)
apply IHlen.
Qed.
Lemma Cobham_to_BC''_correct : forall e xl n,
rec_bounded e ->
arity e = ok_arity n ->
length xl = n ->
Sem e xl = sem (Cobham_to_BC'' n e) xl xl.
Opaque Cobham_to_BC''.
Definition Cobham_to_BC n e :=
comp n 0 (Cobham_to_BC'' n e)
(map (proj n 0) (seq 0 n))
(map (proj n 0) (seq 0 n)).
Lemma Cobham_to_BC_inf : forall e n,
arity e = ok_arity n ->
arities (Cobham_to_BC n e) = ok_arities n 0.
Proof.
(* Goal: forall (e : Cobham) (n : nat) (_ : @eq Arity (arity e) (ok_arity n)), @eq Arities (arities (Cobham_to_BC n e)) (ok_arities n O) *)
intros; simpl.
(* Goal: @eq Arities match arities (Cobham_to_BC'' n e) with | error_rec a a0 a1 => error_comp (error_rec a a0 a1) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) | error_comp a l l0 => error_comp (error_comp a l l0) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) | error_proj n0 n1 n2 => error_comp (error_proj n0 n1 n2) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) | ok_arities hn hs => if andb (andb (andb (Nat.eqb hn (@length BC (@map nat BC (proj n O) (seq O n)))) (Nat.eqb hs (@length BC (@map nat BC (proj n O) (seq O n))))) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities n O)) (@map nat BC (proj n O) (seq O n)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) then ok_arities n O else error_comp (ok_arities hn hs) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) end (ok_arities n O) *)
erewrite Cobham_to_BC''_inf; simpl; trivial.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n (@length BC (@map nat BC (proj n O) (seq O n)))) (Nat.eqb n (@length BC (@map nat BC (proj n O) (seq O n))))) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities n O)) (@map nat BC (proj n O) (seq O n)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) then ok_arities n O else error_comp (ok_arities n n) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n)))) (ok_arities n O) *)
rewrite map_length.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n (@length nat (seq O n))) (Nat.eqb n (@length nat (seq O n)))) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities n O)) (@map nat BC (proj n O) (seq O n)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) then ok_arities n O else error_comp (ok_arities n n) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n)))) (ok_arities n O) *)
rewrite seq_length.
(* Goal: @eq Arities (if andb (andb (andb (Nat.eqb n n) (Nat.eqb n n)) (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities n O)) (@map nat BC (proj n O) (seq O n)))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) then ok_arities n O else error_comp (ok_arities n n) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n)))) (ok_arities n O) *)
rewrite <- beq_nat_refl; simpl.
(* Goal: @eq Arities (if andb (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) (@forallb BC (fun se : BC => aeq (arities se) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) then ok_arities n O else error_comp (ok_arities n n) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n)))) (ok_arities n O) *)
case_eq ( forallb (fun ne : BC => aeq (arities ne) (ok_arities n 0)) (map (proj n 0) (seq 0 n)) ); intros; simpl; trivial.
(* Goal: @eq Arities (error_comp (ok_arities n n) (@map BC Arities arities (@map nat BC (proj n O) (seq O n))) (@map BC Arities arities (@map nat BC (proj n O) (seq O n)))) (ok_arities n O) *)
elimtype False; apply eq_true_false_abs with (2 := H0).
(* Goal: @eq bool (@forallb BC (fun ne : BC => aeq (arities ne) (ok_arities n O)) (@map nat BC (proj n O) (seq O n))) true *)
rewrite forallb_forall; intros.
(* Goal: @eq bool (aeq (arities x) (ok_arities n O)) true *)
apply in_map_iff in H1.
(* Goal: @eq bool (aeq (arities x) (ok_arities n O)) true *)
destruct H1 as (? & ? & ?).
(* Goal: @eq bool (aeq (arities x) (ok_arities n O)) true *)
subst.
(* Goal: @eq bool (aeq (arities (proj n O x0)) (ok_arities n O)) true *)
simpl; trivial.
(* Goal: @eq bool (aeq (if match Init.Nat.add n O with | O => false | S m' => Nat.leb x0 m' end then ok_arities n O else error_proj n O x0) (ok_arities n O)) true *)
apply in_seq_iff in H2.
(* Goal: @eq bool (aeq (if match Init.Nat.add n O with | O => false | S m' => Nat.leb x0 m' end then ok_arities n O else error_proj n O x0) (ok_arities n O)) true *)
case_eq (n + 0); intros.
(* Goal: @eq bool (aeq (if Nat.leb x0 n0 then ok_arities n O else error_proj n O x0) (ok_arities n O)) true *)
(* Goal: @eq bool (aeq (error_proj n O x0) (ok_arities n O)) true *)
elimtype False; omega.
(* Goal: @eq bool (aeq (if Nat.leb x0 n0 then ok_arities n O else error_proj n O x0) (ok_arities n O)) true *)
rewrite leb_correct; simpl.
(* Goal: le x0 n0 *)
(* Goal: @eq bool (andb (Nat.eqb n n) true) true *)
rewrite <- beq_nat_refl; simpl; trivial.
(* Goal: le x0 n0 *)
omega.
Qed.
Lemma Cobham_to_BC_correct : forall e xl n,
rec_bounded e ->
arity e = ok_arity n ->
length xl = n ->
Sem e xl = sem (Cobham_to_BC n e) xl nil.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_inequalitysymmetric.
Section Euclid.
Context `{Ax1:euclidean_neutral}.
Lemma lemma_NCdistinct :
forall A B C,
nCol A B C ->
neq A B /\ neq B C /\ neq A C /\ neq B A /\ neq C B /\ neq C A.
Proof.
(* Goal: forall (A B C : @Point Ax1) (_ : @nCol Ax1 A B C), and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
intros.
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
assert (~ eq A B).
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
(* Goal: not (@eq Ax1 A B) *)
{
(* Goal: not (@eq Ax1 A B) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
}
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
assert (~ eq A C).
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
(* Goal: not (@eq Ax1 A C) *)
{
(* Goal: not (@eq Ax1 A C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
}
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
assert (neq C A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
assert (~ eq B C).
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
(* Goal: not (@eq Ax1 B C) *)
{
(* Goal: not (@eq Ax1 B C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
}
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@neq Ax1 A B) (and (@neq Ax1 B C) (and (@neq Ax1 A C) (and (@neq Ax1 B A) (and (@neq Ax1 C B) (@neq Ax1 C A))))) *)
close.
Qed.
End Euclid.
|
Set Implicit Arguments.
Require Export inductive_wqo.
Require Export tree.
Require Export list_embeding.
Section higman_aux.
Variable A : Set.
Variable leA : A -> A -> Prop.
Hypothesis eqA_dec : forall a a' : A, {a = a'} + {a <> a'}.
Hypothesis leA_dec : forall a a', {leA a a'} + {~ leA a a'}.
Hypothesis leA_trans : forall a a' a'', leA a a' -> leA a' a'' -> leA a a''.
Definition embeds : list A -> list A -> Prop := Embeds leA.
Definition sublist : list (list A) -> list (list A) -> Prop := Embeds (eq (A:= list A)).
Fixpoint firsts (l : list (list A)) : list A :=
match l with
| nil => nil
| w::ws => match w with
| nil => nil
| a::w' => a :: (firsts ws)
end
end.
Definition Tree := tree (list (list A) * (list A)).
Fact eq_Tree_dec : forall t t' : Tree, {t = t'} + {t <> t'}.
Proof.
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
assert (H : forall l l' : (list (list A) * (list A)), {l = l'} + {l <> l'}).
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
(* Goal: forall l l' : prod (list (list A)) (list A), sumbool (@eq (prod (list (list A)) (list A)) l l') (not (@eq (prod (list (list A)) (list A)) l l')) *)
intros l l'; destruct l as [vs l]; destruct l' as [vs' l'].
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l'))) *)
elim (list_eq_dec eqA_dec l l'); intro case_l.
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l'))) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l'))) *)
subst; elim (list_eq_dec (list_eq_dec eqA_dec) vs vs'); intro case_vs.
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l'))) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l') (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l') (@pair (list (list A)) (list A) vs' l'))) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l') (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l') (@pair (list (list A)) (list A) vs' l'))) *)
subst; left; trivial.
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l'))) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l') (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l') (@pair (list (list A)) (list A) vs' l'))) *)
right; intro HF; inversion HF; subst; apply case_vs; trivial.
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
(* Goal: sumbool (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l')) (not (@eq (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l) (@pair (list (list A)) (list A) vs' l'))) *)
right; intro HF; inversion HF; subst; apply case_l; trivial.
(* Goal: forall t t' : Tree, sumbool (@eq Tree t t') (not (@eq Tree t t')) *)
intros t t'; apply (eq_tree_dec H).
Qed.
Definition root_label (t : Tree) : option A :=
match (root t) with
| (l,r) => head r
end.
Fixpoint roots_labels (ts : list Tree) : option (list A) :=
match ts with
| nil => Some nil
| t :: ts' => match (root_label t) with
| None => None
| Some a => match (roots_labels ts') with
| Some ts'' => Some (a :: ts'')
| None => None
end
end
end.
Inductive is_insert_forest : list Tree -> list A -> A -> list Tree -> Prop :=
| is_if0 : forall w a, is_insert_forest nil w a nil
| is_if2 : forall vs a' ts f w a f' l,
is_insert_forest f w a f' ->
~(leA a' a) ->
is_insert_forest ((node (vs,a'::l) ts) :: f) w a ((node (vs,a'::l) ts) :: f')
| is_if4 : forall vs a' ts f w a t' l,
leA a' a ->
is_insert_tree (node (vs,a'::l) ts) w a t' ->
is_insert_forest ((node (vs,a'::l) ts):: f) w a (t' :: f)
with is_insert_tree : Tree -> list A -> A -> Tree -> Prop :=
| is_it1 : forall vs l ts w a rrts,
roots_labels ts = Some rrts ->
~ greater leA a rrts ->
is_insert_tree (node (vs,l) ts) w a (node (vs,l) ((node (w::vs, a::l) ts) :: ts))
| is_it2 : forall l ts w a rrts f',
roots_labels ts = Some rrts ->
greater leA a rrts ->
is_insert_forest ts w a f' ->
is_insert_tree (node l ts) w a (node l f').
Inductive is_forest : list (list A) -> list Tree -> Prop :=
| is_f0 : is_forest nil nil
| is_f1 : forall a w ws f f', is_forest ws f ->
greater leA a (bad_subsequence leA leA_dec (firsts ws)) ->
is_insert_forest f w a f' -> is_forest ((a::w)::ws) f'
| is_f2 : forall a w ws f, is_forest ws f ->
~ greater leA a (bad_subsequence leA leA_dec (firsts ws)) ->
is_forest ((a::w)::ws) ((node (w::ws, a::nil) f)::f).
Section through_is_insert.
Variable P : list (list A) -> Tree -> Prop.
Definition P_on_tree (ws : list (list A)) (t : Tree) : Prop := forall t', subtree t' t -> P ws t'.
Definition P_on_forest (ws : list (list A)) (f : list Tree) : Prop :=
forall t, tree_in_forest t f -> P ws t.
Fact P_on_node : forall a ts ws, P_on_tree ws (node a ts) ->
forall t, In t ts -> P_on_tree ws t.
Proof.
(* Goal: forall (a : prod (list (list A)) (list A)) (ts : list (tree (prod (list (list A)) (list A)))) (ws : list (list A)) (_ : P_on_tree ws (@node (prod (list (list A)) (list A)) a ts)) (t : tree (prod (list (list A)) (list A))) (_ : @In (tree (prod (list (list A)) (list A))) t ts), P_on_tree ws t *)
intros a ts ws Hats t Ht t' Ht'.
(* Goal: P ws t' *)
apply Hats.
(* Goal: @subtree (prod (list (list A)) (list A)) t' (@node (prod (list (list A)) (list A)) a ts) *)
constructor 2.
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t' ts *)
constructor 1 with t; trivial.
Qed.
Definition from_insert_forest (t : Tree) (a : A) : Prop :=
forall a' l vs ts, t = node (vs, a'::l) ts -> leA a' a.
Hypothesis P_added_node : forall ws w vs a l ts, from_insert_forest (node (vs,l) ts) a ->
P ws (node (vs,l) ts) ->
P ((a::w)::ws) (node (w::vs, a::l) ts).
Hypothesis P_added_node_base : forall ws w a f, P_on_forest ws f ->
P ((a::w)::ws) (node (w::ws,a::nil) f).
Hypothesis P_split : forall ws a t f, P ws (node a (t::f)) -> P ws t -> P ws (node a f).
Hypothesis P_merge : forall ws a t f, P ws (node a f) -> P ws t -> P ws (node a (t::f)).
Hypothesis P_add : forall w ws t, P ws t -> P (w::ws) t.
Lemma P_on_split : forall ws a t f, P_on_tree ws (node a (t::f)) -> P_on_tree ws t ->
P_on_tree ws (node a f).
Proof.
(* Goal: forall (ws : list (list A)) (a : prod (list (list A)) (list A)) (t : tree (prod (list (list A)) (list A))) (f : list (tree (prod (list (list A)) (list A)))) (_ : P_on_tree ws (@node (prod (list (list A)) (list A)) a (@cons (tree (prod (list (list A)) (list A))) t f))) (_ : P_on_tree ws t), P_on_tree ws (@node (prod (list (list A)) (list A)) a f) *)
intros ws a t f Hatf Ht t' Ht'.
(* Goal: P ws t' *)
inversion Ht'; subst.
(* Goal: P ws t' *)
(* Goal: P ws (@node (prod (list (list A)) (list A)) a f) *)
apply P_split with t.
(* Goal: P ws t' *)
(* Goal: P ws t *)
(* Goal: P ws (@node (prod (list (list A)) (list A)) a (@cons (tree (prod (list (list A)) (list A))) t f)) *)
apply (Hatf (node a (t::f))); constructor; trivial.
(* Goal: P ws t' *)
(* Goal: P ws t *)
apply (Ht t); constructor; trivial.
(* Goal: P ws t' *)
apply (Hatf t').
(* Goal: @subtree (prod (list (list A)) (list A)) t' (@node (prod (list (list A)) (list A)) a (@cons (tree (prod (list (list A)) (list A))) t f)) *)
constructor 2; inversion H1; subst.
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t' (@cons (tree (prod (list (list A)) (list A))) t f) *)
constructor 1 with t'0; try right; trivial.
Qed.
Lemma P_on_merge : forall ws a t f, P_on_tree ws (node a f) -> P_on_tree ws t ->
P_on_tree ws (node a (t::f)).
Proof.
(* Goal: forall (ws : list (list A)) (a : prod (list (list A)) (list A)) (t : Tree) (f : list (tree (prod (list (list A)) (list A)))) (_ : P_on_tree ws (@node (prod (list (list A)) (list A)) a f)) (_ : P_on_tree ws t), P_on_tree ws (@node (prod (list (list A)) (list A)) a (@cons Tree t f)) *)
intros ws a t f Haf Ht t' Ht'.
(* Goal: P ws t' *)
inversion Ht'; subst.
(* Goal: P ws t' *)
(* Goal: P ws (@node (prod (list (list A)) (list A)) a (@cons Tree t f)) *)
apply P_merge.
(* Goal: P ws t' *)
(* Goal: P ws t *)
(* Goal: P ws (@node (prod (list (list A)) (list A)) a f) *)
apply (Haf (node a f)); constructor; trivial.
(* Goal: P ws t' *)
(* Goal: P ws t *)
apply (Ht t); constructor; trivial.
(* Goal: P ws t' *)
inversion H1; subst.
(* Goal: P ws t' *)
elim H; clear H; intro H.
(* Goal: P ws t' *)
(* Goal: P ws t' *)
subst.
(* Goal: P ws t' *)
(* Goal: P ws t' *)
apply (Ht t'); trivial.
(* Goal: P ws t' *)
apply (Haf t'); constructor 2; trivial.
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t' f *)
constructor 1 with t'0; trivial.
Qed.
Lemma P_on_add : forall w ws t, P_on_tree ws t -> P_on_tree (w::ws) t.
Proof.
(* Goal: forall (w : list A) (ws : list (list A)) (t : Tree) (_ : P_on_tree ws t), P_on_tree (@cons (list A) w ws) t *)
intros w ws t Ht t' Ht'; inversion Ht'; subst.
(* Goal: P (@cons (list A) w ws) t' *)
(* Goal: P (@cons (list A) w ws) t *)
apply P_add; apply (Ht t); trivial.
(* Goal: P (@cons (list A) w ws) t' *)
apply P_add; apply (Ht t'); trivial.
Qed.
Lemma is_insert_tree_invariant : forall ws t w a t',
from_insert_forest t a ->
is_insert_tree t w a t' ->
P_on_tree ws t -> P_on_tree ((a::w)::ws) t'.
Lemma is_insert_forest_invariant : forall ws f w a f', is_insert_forest f w a f' ->
P_on_forest ws f -> P_on_forest ((a::w)::ws) f'.
Proof.
(* Goal: forall (ws : list (list A)) (f : list Tree) (w : list A) (a : A) (f' : list Tree) (_ : is_insert_forest f w a f') (_ : P_on_forest ws f), P_on_forest (@cons (list A) (@cons A a w) ws) f' *)
intros ws f w a f' H; induction H; intros Hf t'' Ht''.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
apply P_add; apply (Hf t''); trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
inversion Ht''; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
elim H1; clear H1; intro H1.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
apply P_add; apply (Hf t''); trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t'' (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) *)
constructor 1 with (node (vs, a' :: l) ts); try left; trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
assert (H' : P_on_forest ((a::w)::ws) f').
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P_on_forest (@cons (list A) (@cons A a w) ws) f' *)
apply IHis_insert_forest; intros t'0 Ht'0.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P ws t'0 *)
apply (Hf t'0).
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t'0 (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) *)
inversion Ht'0; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t'0 (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) *)
constructor 1 with t'1; try right; trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
apply (H' t''); constructor 1 with t'; trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
inversion Ht''; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
elim H1; clear H1; intro H1.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
assert (Hfrom : from_insert_forest (node (vs, a' :: l) ts) a).
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: from_insert_forest (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) a *)
intros a'' l' vs' ts' Heq.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: leA a'' a *)
inversion Heq; subst; trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
generalize t'' H2; fold P_on_tree; apply (is_insert_tree_invariant (ws:=ws) Hfrom H0).
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: P_on_tree ws (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) *)
intros t'1 Ht'1; apply (Hf t'1).
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t'1 (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) *)
constructor 1 with (node (vs, a' :: l) ts); try left; trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t'' *)
apply P_add.
(* Goal: P ws t'' *)
apply (Hf t'').
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t'' (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) *)
constructor 1 with t'0; try right; trivial.
Qed.
Lemma P_on_is_forest : forall f ws, is_forest ws f ->
P_on_forest ws f.
Proof.
(* Goal: forall (f : list Tree) (ws : list (list A)) (_ : is_forest ws f), P_on_forest ws f *)
intros f ws H; induction H; intros t Ht.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@nil (list A)) t *)
inversion Ht; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@nil (list A)) t *)
inversion H.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
apply (is_insert_forest_invariant (ws:=ws) H1); trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
inversion Ht; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
elim H1; clear H1; intro H1; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
inversion H2; subst.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) *)
apply P_added_node_base; trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
apply P_add.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: P ws t *)
apply IHis_forest.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t f *)
trivial.
(* Goal: P (@cons (list A) (@cons A a w) ws) t *)
apply P_add.
(* Goal: P ws t *)
apply IHis_forest.
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t f *)
constructor 1 with t'; trivial.
Qed.
End through_is_insert.
Definition no_nil (t : Tree) : Prop := forall vs l ts, t = node (vs,l) ts -> l <> nil.
Fact in_is_forest_no_nil : forall f ws, is_forest ws f ->
forall t, tree_in_forest t f -> no_nil t.
Proof.
(* Goal: forall (f : list Tree) (ws : list (list A)) (_ : is_forest ws f) (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
intros f ws Hf; assert (H : P_on_forest (fun (_ : list (list A)) => no_nil) ws f).
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: P_on_forest (fun _ : list (list A) => no_nil) ws f *)
apply P_on_is_forest; trivial; intros; intros ws' l' ts' H'; subst.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
inversion H'; subst; intro HF.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: False *)
inversion HF.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
inversion H'; subst; intro HF.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: False *)
inversion HF.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
inversion H'; subst.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
apply (H ws' l' (t::ts')); trivial.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
inversion H'; subst.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
(* Goal: not (@eq (list A) l' (@nil A)) *)
apply (H ws' l' f0); trivial.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
intros t Ht; apply (H t); trivial.
Qed.
Fact is_insert_tree_same_root : forall t t' w a,
is_insert_tree t w a t' -> root_label t = root_label t'.
Proof.
(* Goal: forall (t t' : Tree) (w : list A) (a : A) (_ : is_insert_tree t w a t'), @eq (option A) (root_label t) (root_label t') *)
intros t t' w a H; induction H; simpl; destruct l; simpl; trivial.
Qed.
Fact is_insert_forest_same_roots : forall f f' w a,
is_insert_forest f w a f' -> roots_labels f = roots_labels f'.
Fact roots_labels_exist : forall ts, (forall t, In t ts -> no_nil t) ->
exists rrts, roots_labels ts = Some rrts.
Fact insert_forest_aux_get : forall f a w,
(forall t, In t f -> no_nil t /\ exists t', is_insert_tree t w a t') ->
exists f', is_insert_forest f w a f'.
Proof.
(* Goal: forall (f : list Tree) (a : A) (w : list A) (_ : forall (t : Tree) (_ : @In Tree t f), and (no_nil t) (@ex Tree (fun t' : Tree => is_insert_tree t w a t'))), @ex (list Tree) (fun f' : list Tree => is_insert_forest f w a f') *)
intro f; induction f as [|t f IHf]; intros a w Hf.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@nil Tree) w a f') *)
exists (nil (A:=Tree)); constructor.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
assert (H: exists f' : list Tree, is_insert_forest f w a f').
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest f w a f') *)
apply IHf; intros t' Ht'; apply Hf; try right; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
clear IHf; destruct t as [l ts].
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) l ts) f) w a f') *)
destruct l as [ws bs]; destruct bs as [|b bs].
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) w a f') *)
assert (H' : In (node (ws, nil) ts) (node (ws, nil) ts :: f)).
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) w a f') *)
(* Goal: @In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) *)
left; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) w a f') *)
elim (Hf (node (ws, nil) ts) H'); intros HF dd; elim HF with ws (nil (A:=A)) ts; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim (leA_dec b a); intro case_b_a.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
assert (H' : In (node (ws, b::bs) ts) (node (ws, b::bs) ts :: f)).
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) *)
left; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim (Hf (node (ws, b::bs) ts) H'); intros H1 H2.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim H2; clear H2; intros t' Ht'.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
exists (t'::f); constructor 3; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim H; clear H; intros f' Hf'.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
exists ((node (ws, b :: bs) ts)::f'); constructor 2; trivial.
Qed.
Fact insert_tree_get : forall t w a,
(forall t', subtree t' t -> no_nil t') ->
exists t', is_insert_tree t w a t'.
Proof.
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (w : list A) (a : A) (_ : forall (t' : tree (prod (list (list A)) (list A))) (_ : @subtree (prod (list (list A)) (list A)) t' t), no_nil t'), @ex Tree (fun t' : Tree => is_insert_tree t w a t') *)
intro t; induction t as [l | l ts IHt]; intros w a Ht.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) l ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) l (@nil (tree (prod (list (list A)) (list A))))) w a t') *)
destruct l as [ws bs].
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) l ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws bs) (@nil (tree (prod (list (list A)) (list A))))) w a t') *)
exists (node (ws, bs) (node (w::ws, a::bs) nil :: nil)); constructor 1 with (nil (A := A)); trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) l ts) w a t') *)
(* Goal: not (@greater A leA a (@nil A)) *)
intro H; inversion H; subst.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) l ts) w a t') *)
destruct l as [ws bs].
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws bs) ts) w a t') *)
destruct bs as [|b bs].
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) w a t') *)
assert (Hnn : no_nil (node (ws, nil) ts)).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) w a t') *)
(* Goal: no_nil (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) *)
assert (Hd : subtree (node (ws,nil) ts) (node (ws,nil) ts)).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) w a t') *)
(* Goal: no_nil (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) *)
(* Goal: @subtree (prod (list (list A)) (list A)) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) *)
constructor 1; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) w a t') *)
(* Goal: no_nil (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) *)
apply (Ht (node (ws,nil) ts) Hd).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) w a t') *)
elim (Hnn ws nil ts); trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
assert (H' : forall t, In t ts -> no_nil t /\ exists t', is_insert_tree t w a t').
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @In (tree (prod (list (list A)) (list A))) t ts), and (no_nil t) (@ex Tree (fun t' : Tree => is_insert_tree t w a t')) *)
intros u Hu.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: and (no_nil u) (@ex Tree (fun t' : Tree => is_insert_tree u w a t')) *)
assert (H'' : subtree u (node (ws, b :: bs) ts)).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: and (no_nil u) (@ex Tree (fun t' : Tree => is_insert_tree u w a t')) *)
(* Goal: @subtree (prod (list (list A)) (list A)) u (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) *)
constructor 2; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: and (no_nil u) (@ex Tree (fun t' : Tree => is_insert_tree u w a t')) *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) u ts *)
constructor 1 with u; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: and (no_nil u) (@ex Tree (fun t' : Tree => is_insert_tree u w a t')) *)
(* Goal: @subtree (prod (list (list A)) (list A)) u u *)
constructor 1; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: and (no_nil u) (@ex Tree (fun t' : Tree => is_insert_tree u w a t')) *)
split.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree u w a t') *)
(* Goal: no_nil u *)
apply (Ht u H'').
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree u w a t') *)
apply IHt; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: forall (t' : tree (prod (list (list A)) (list A))) (_ : @subtree (prod (list (list A)) (list A)) t' u), no_nil t' *)
intros t' Ht' ; assert (H' : subtree t' (node (ws, b :: bs) ts)).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: no_nil t' *)
(* Goal: @subtree (prod (list (list A)) (list A)) t' (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) *)
apply subtree_trans with u; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: no_nil t' *)
apply (Ht t' H' ).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
assert (H : forall t, In t ts -> no_nil t).
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @In (tree (prod (list (list A)) (list A))) t ts), no_nil t *)
intros u Hu; elim (H' u Hu); trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
elim (roots_labels_exist ts H); intros rrts Hrrts.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
elim (greater_dec leA leA_dec a rrts); intro case_greater.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
elim (insert_forest_aux_get ts H'); intros f' Hf'.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
exists (node (ws, b::bs) f'); constructor 2 with rrts; trivial.
(* Goal: @ex Tree (fun t' : Tree => is_insert_tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) w a t') *)
exists (node (ws, b :: bs) (node (w::ws, a::b::bs) ts :: ts)); constructor 1 with rrts; trivial.
Qed.
Fact insert_forest_get : forall f a w ws, is_forest ws f -> exists f', is_insert_forest f w a f'.
Proof.
(* Goal: forall (f : list Tree) (a : A) (w : list A) (ws : list (list A)) (_ : is_forest ws f), @ex (list Tree) (fun f' : list Tree => is_insert_forest f w a f') *)
intros f a w ws Hisf; generalize (in_is_forest_no_nil Hisf); clear Hisf ws.
(* Goal: forall _ : forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t, @ex (list Tree) (fun f' : list Tree => is_insert_forest f w a f') *)
induction f as [|t f IHf]; intro Hf.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@nil Tree) w a f') *)
exists (nil (A:=Tree)); constructor.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
assert (H : forall t', subtree t' t -> no_nil t').
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: forall (t' : tree (prod (list (list A)) (list A))) (_ : @subtree (prod (list (list A)) (list A)) t' t), no_nil t' *)
intros t' Ht'.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: no_nil t' *)
assert (H' : tree_in_forest t' (t :: f)).
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: no_nil t' *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t' (@cons Tree t f) *)
constructor 1 with t; try left; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
(* Goal: no_nil t' *)
apply Hf; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree t f) w a f') *)
destruct t as [l ts].
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) l ts) f) w a f') *)
destruct l as [ws bs]; destruct bs as [|b bs].
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) w a f') *)
assert (Ht : subtree (node (ws, nil) ts) (node (ws, nil) ts)).
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) w a f') *)
(* Goal: @subtree (prod (list (list A)) (list A)) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) *)
constructor 1; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@nil A)) ts) f) w a f') *)
elim (H (node (ws,nil) ts) Ht ws nil ts); trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
assert (H' : exists f', is_insert_forest f w a f').
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest f w a f') *)
apply IHf.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @tree_in_forest (prod (list (list A)) (list A)) t f), no_nil t *)
intros t Ht; apply Hf.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) *)
inversion Ht; subst.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @tree_in_forest (prod (list (list A)) (list A)) t (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) *)
constructor 1 with t'; try right; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim H'; clear H'; intros f' Hf'.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim (leA_dec b a); intro case_b_a.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
elim (insert_tree_get w a H); intros t' Ht'.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
exists (t'::f); constructor 3; trivial.
(* Goal: @ex (list Tree) (fun f' : list Tree => is_insert_forest (@cons Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) ws (@cons A b bs)) ts) f) w a f') *)
exists (node (ws, b :: bs) ts :: f'); constructor 2; trivial.
Qed.
Fact nil_forest : forall ws, is_forest ws nil -> ws = nil.
Proof.
(* Goal: forall (ws : list (list A)) (_ : is_forest ws (@nil Tree)), @eq (list (list A)) ws (@nil (list A)) *)
intro ws; induction ws as [| w ws IHw]; intros H1; trivial.
(* Goal: @eq (list (list A)) (@cons (list A) w ws) (@nil (list A)) *)
inversion H1; subst.
(* Goal: @eq (list (list A)) (@cons (list A) (@cons A a w0) ws) (@nil (list A)) *)
inversion H5; subst.
(* Goal: @eq (list (list A)) (@cons (list A) (@cons A a w0) ws) (@nil (list A)) *)
generalize (IHw H2); intro; subst.
(* Goal: @eq (list (list A)) (@cons (list A) (@cons A a w0) (@nil (list A))) (@nil (list A)) *)
simpl in H3; inversion H3.
Qed.
Fact roots_labels_greater_get_tree :
forall ts rrts, roots_labels ts = Some rrts ->
forall a, greater leA a rrts -> exists vs, exists b, exists bs, exists ts',
leA b a /\ In (node (vs, b::bs) ts') ts.
Proof.
(* Goal: forall (ts : list Tree) (rrts : list A) (_ : @eq (option (list A)) (roots_labels ts) (@Some (list A) rrts)) (a : A) (_ : @greater A leA a rrts), @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') ts))))) *)
intro ts; induction ts as [|t ts IHts]; intros rrts Hrrts a Ha.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@cons Tree t ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@nil Tree)))))) *)
simpl in Hrrts; inversion Hrrts; subst.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@cons Tree t ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@nil Tree)))))) *)
inversion Ha.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@cons Tree t ts)))))) *)
generalize Hrrts; simpl.
(* Goal: forall _ : @eq (option (list A)) match root_label t with | Some a => match roots_labels ts with | Some ts'' => @Some (list A) (@cons A a ts'') | None => @None (list A) end | None => @None (list A) end (@Some (list A) rrts), @ex (list (list A)) (fun vs : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (or (@eq (tree (prod (list (list A)) (list A))) t (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts')) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') ts)))))) *)
destruct t as [l ts']; destruct l as [vs bs]; unfold root_label; simpl.
(* Goal: forall _ : @eq (option (list A)) match @hd_error A bs with | Some a => match roots_labels ts with | Some ts'' => @Some (list A) (@cons A a ts'') | None => @None (list A) end | None => @None (list A) end (@Some (list A) rrts), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs bs) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b bs0)) ts'0) ts)))))) *)
destruct bs as [|b bs]; simpl.
(* Goal: forall _ : @eq (option (list A)) match roots_labels ts with | Some ts'' => @Some (list A) (@cons A b ts'') | None => @None (list A) end (@Some (list A) rrts), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: forall _ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@nil A)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b bs)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b bs)) ts'0) ts)))))) *)
intro HF; inversion HF.
(* Goal: forall _ : @eq (option (list A)) match roots_labels ts with | Some ts'' => @Some (list A) (@cons A b ts'') | None => @None (list A) end (@Some (list A) rrts), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
generalize (refl_equal (roots_labels ts)); pattern (roots_labels ts) at -1; case (roots_labels ts).
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: forall (l : list A) (_ : @eq (option (list A)) (roots_labels ts) (@Some (list A) l)) (_ : @eq (option (list A)) (@Some (list A) (@cons A b l)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
intros rrts' H1 H2; inversion H2; subst.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
inversion Ha; subst.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
exists vs; exists b; exists bs; exists ts'; split; try left; trivial.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
elim (IHts rrts') with a; trivial.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: forall (x : list (list A)) (_ : @ex A (fun b : A => @ex (list A) (fun bs : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts' : list (tree (prod (list (list A)) (list A))) => and (leA b a) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) x (@cons A b bs)) ts') ts))))), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
intros vs' H; elim H; clear H; intros b' H; elim H; clear H; intros bs' H.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
elim H; clear H; intros ts'' H; elim H; clear H; intros H H'.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
exists vs'; exists b'; exists bs'; exists ts''; split; try right; trivial.
(* Goal: forall (_ : @eq (option (list A)) (roots_labels ts) (@None (list A))) (_ : @eq (option (list A)) (@None (list A)) (@Some (list A) rrts)), @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun b0 : A => @ex (list A) (fun bs0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts'0 : list (tree (prod (list (list A)) (list A))) => and (leA b0 a) (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A b0 bs0)) ts'0) ts)))))) *)
intros dd HF; inversion HF.
Qed.
Fact is_insert_tree_neq : forall t,
forall w a t', is_insert_tree t w a t' -> t <> t'.
Proof.
(* Goal: forall (t : Tree) (w : list A) (a : A) (t' : Tree) (_ : is_insert_tree t w a t'), not (@eq Tree t t') *)
intro t; induction t as [l | l ts IHl]; intros w a t' Ht.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) t') *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@nil (tree (prod (list (list A)) (list A))))) t') *)
inversion Ht; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) t') *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@nil (tree (prod (list (list A)) (list A))))) (@node (prod (list (list A)) (list A)) l f')) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l0) (@nil (tree (prod (list (list A)) (list A))))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l0) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w vs) (@cons A a l0)) (@nil (tree (prod (list (list A)) (list A))))) (@nil (tree (prod (list (list A)) (list A))))))) *)
intro HF; inversion HF; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) t') *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@nil (tree (prod (list (list A)) (list A))))) (@node (prod (list (list A)) (list A)) l f')) *)
inversion H1; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) t') *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@nil (tree (prod (list (list A)) (list A))))) (@node (prod (list (list A)) (list A)) l f')) *)
inversion H2.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) t') *)
inversion Ht; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l0) ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs l0) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w vs) (@cons A a l0)) ts) ts))) *)
intro HF; inversion HF.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
(* Goal: False *)
generalize (node (w :: vs, a :: l0) ts) H0; clear H1 Ht HF IHl H0.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
(* Goal: forall (t : tree (prod (list (list A)) (list A))) (_ : @eq (list (tree (prod (list (list A)) (list A)))) ts (@cons (tree (prod (list (list A)) (list A))) t ts)), False *)
induction ts as [|t ts IHts]; intros t' Ht; inversion Ht.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
(* Goal: False *)
apply IHts with t'; trivial.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
elim (roots_labels_greater_get_tree ts H1 H2); intros vs H'.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
elim H'; clear H'; intros b H'; elim H'; clear H'; intros bs H'.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
elim H'; clear H'; intros ts' H'; elim H'; clear H'; intros H3 H4.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
generalize (IHl (node (vs, b :: bs) ts') H4); intro IHl'.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
assert (IHl'' : forall u, In u ts -> forall (w : list A) (a : A) (t' : Tree), is_insert_tree u w a t' -> u <> t').
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
(* Goal: forall (u : tree (prod (list (list A)) (list A))) (_ : @In (tree (prod (list (list A)) (list A))) u ts) (w : list A) (a : A) (t' : Tree) (_ : is_insert_tree u w a t'), not (@eq (tree (prod (list (list A)) (list A))) u t') *)
intros u Hu; apply IHl; trivial.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
clear Ht H2 H1 IHl.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l ts) (@node (prod (list (list A)) (list A)) l f')) *)
induction H6.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f'))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@nil Tree)) (@node (prod (list (list A)) (list A)) l (@nil Tree))) *)
inversion H4.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f'))) *)
elim H4; clear H4; intro H4.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f'))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f'))) *)
inversion H4; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f'))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') f'))) *)
elim H; trivial.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f'))) *)
intro HF; inversion HF; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: False *)
apply (IHis_insert_forest); trivial.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: forall (u : tree (prod (list (list A)) (list A))) (_ : @In (tree (prod (list (list A)) (list A))) u f') (w : list A) (a : A) (t' : Tree) (_ : is_insert_tree u w a t'), not (@eq (tree (prod (list (list A)) (list A))) u t') *)
intros u Hu; apply IHl''; try right; trivial.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
elim H4; clear H4; intro H4.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
inversion H4; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A b bs)) ts') f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
intro HF; inversion HF; subst.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
(* Goal: False *)
apply (IHl' w a (node (vs, b :: bs) ts')); trivial.
(* Goal: not (@eq Tree (@node (prod (list (list A)) (list A)) l (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f)) (@node (prod (list (list A)) (list A)) l (@cons Tree t' f))) *)
intro HF; inversion HF; subst.
(* Goal: False *)
assert (Hin : In (node (vs0, a' :: l0) ts) (node (vs0, a' :: l0) ts :: f)).
(* Goal: False *)
(* Goal: @In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a' l0)) ts) f) *)
left; trivial.
(* Goal: False *)
apply (IHl'' (node (vs0, a' :: l0) ts) Hin w a (node (vs0, a' :: l0) ts)); trivial.
Qed.
Lemma is_insert_forest_neq_aux : forall f a w f',
(exists vs, exists a', exists l, exists ts, In (node (vs,a'::l) ts) f /\ leA a' a) ->
is_insert_forest f w a f' -> f <> f'.
Proof.
(* Goal: forall (f : list (tree (prod (list (list A)) (list A)))) (a : A) (w : list A) (f' : list Tree) (_ : @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a' : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (leA a' a)))))) (_ : is_insert_forest f w a f'), not (@eq (list (tree (prod (list (list A)) (list A)))) f f') *)
intro f; induction f as [|t f IHf]; intros a w f' Hf Hf'.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@nil (tree (prod (list (list A)) (list A)))) f') *)
elim Hf; clear Hf; intros vs Hf; elim Hf; clear Hf; intros a' Hf.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@nil (tree (prod (list (list A)) (list A)))) f') *)
elim Hf; clear Hf; intros l Hf; elim Hf; clear Hf; intros ts Hf; elim Hf; clear Hf; intros Hf1 Hf2.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@nil (tree (prod (list (list A)) (list A)))) f') *)
inversion Hf1.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
elim Hf; clear Hf; intros vs Hf; elim Hf; clear Hf; intros a' Hf.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
elim Hf; clear Hf; intros l Hf; elim Hf; clear Hf; intros ts Hf; elim Hf; clear Hf; intros Hf1 Hf2.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
elim Hf1; clear Hf1; intro Hf1.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
subst t; inversion Hf'; subst.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (@cons Tree t' f)) *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f'0)) *)
elim H8; trivial.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (@cons Tree t' f)) *)
intro HF; inversion HF; subst.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
(* Goal: False *)
generalize H8 (refl_equal (node (vs, a' :: l) ts)); apply is_insert_tree_neq.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) t f) f') *)
inversion Hf'; subst.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f) (@cons Tree t' f)) *)
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f'0)) *)
intro HF; inversion HF; subst.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f) (@cons Tree t' f)) *)
(* Goal: False *)
generalize H1 (refl_equal f'0); apply IHf.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f) (@cons Tree t' f)) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a' : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f'0) (leA a' a))))) *)
exists vs; exists a'; exists l; exists ts; split; trivial.
(* Goal: not (@eq (list (tree (prod (list (list A)) (list A)))) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f) (@cons Tree t' f)) *)
intro HF; inversion HF; subst.
(* Goal: False *)
generalize H5 (refl_equal (node (vs0, a'0 :: l0) ts0)); apply is_insert_tree_neq.
Qed.
Fact is_insert_forest_neq : forall f ws, is_forest ws f ->
forall a w f', greater leA a (bad_subsequence leA leA_dec (firsts ws)) ->
is_insert_forest f w a f' -> f <> f'.
Proof.
(* Goal: forall (f : list Tree) (ws : list (list A)) (_ : is_forest ws f) (a : A) (w : list A) (f' : list Tree) (_ : @greater A leA a (@bad_subsequence A leA leA_dec (firsts ws))) (_ : is_insert_forest f w a f'), not (@eq (list Tree) f f') *)
intros f ws Hws a w f' Hg; apply is_insert_forest_neq_aux; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a' : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (leA a' a))))) *)
clear w f'.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a' : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (leA a' a))))) *)
generalize a Hg; clear a Hg.
(* Goal: forall (a : A) (_ : @greater A leA a (@bad_subsequence A leA leA_dec (firsts ws))), @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a' : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a' l)) ts) f) (leA a' a))))) *)
induction Hws; intros a' Hg.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@nil Tree)) (leA a'0 a'))))) *)
inversion Hg.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
generalize Hg; clear Hg; simpl in |- *.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: forall _ : @greater A leA a' (if @greater_dec A leA leA_dec a (@bad_subsequence A leA leA_dec (firsts ws)) then @bad_subsequence A leA leA_dec (firsts ws) else @cons A a (@bad_subsequence A leA leA_dec (firsts ws))), @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim (greater_dec leA leA_dec a (bad_subsequence leA leA_dec (firsts ws))); intros case_ws Hg.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim (IHHws a' Hg); intros vs H'.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim H'; clear H'; intros a'' H'.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim H'; clear H'; intros l H'.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim H'; clear H'; intros ts H'.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim H'; clear H'; intros H1 H2.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
clear IHHws Hws case_ws Hg.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
induction H0.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@nil Tree)) (leA a'0 a'))))) *)
inversion H1.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
elim H1; clear H1; intro H1.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
inversion H1; subst.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs0 : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l0 : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts0 : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'' l)) ts) f')) (leA a'0 a'))))) *)
exists vs; exists a''; exists l; exists ts; split; try left; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
elim (IHis_insert_forest H H1); intros vs' H4.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
elim H4; clear H4; intros a''' H4.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
elim H4; clear H4; intros l' H4.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
elim H4; clear H4; intros ts' H4.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
elim H4; clear H4; intros H4 H5.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'1 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'1 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a'1 a'))))) *)
exists vs'; exists a'''; exists l'; exists ts'.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs' (@cons A a''' l')) ts') (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs0 (@cons A a'0 l0)) ts0) f')) (leA a''' a') *)
split; try right; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
elim H1; clear H1; intro H1.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
inversion H1; subst.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
generalize (is_insert_tree_same_root H3).
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: forall _ : @eq (option A) (root_label (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'' l)) ts)) (root_label t'), @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
unfold root_label; simpl; intro H5.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) t' (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
destruct t' as [lbl t'ts].
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) lbl t'ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
simpl in H5.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) lbl t'ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
destruct lbl as [t'vs t'l].
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) t'vs t'l) t'ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
destruct t'l; inversion H5; subst.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) t'vs (@cons A a0 t'l)) t'ts) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
exists t'vs; exists a0; exists t'l; exists t'ts; split; try left; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons Tree t' f)) (leA a'0 a'))))) *)
exists vs; exists a''; exists l; exists ts; split; try right; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f') (leA a'0 a'))))) *)
elim case_ws; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) (@cons (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) f)) (leA a'0 a'))))) *)
generalize Hg; clear Hg; simpl.
(* Goal: forall _ : @greater A leA a' (if @greater_dec A leA leA_dec a (@bad_subsequence A leA leA_dec (firsts ws)) then @bad_subsequence A leA leA_dec (firsts ws) else @cons A a (@bad_subsequence A leA leA_dec (firsts ws))), @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
elim (greater_dec leA leA_dec a (bad_subsequence leA leA_dec (firsts ws))); intros case_ws Hg.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
elim H; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
inversion Hg; subst.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
exists (w::ws); exists a; exists (nil (A:=A)); exists f; split; try left; trivial.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
elim (IHHws a' H2); intros vs' H3.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
elim H3; clear H3; intros a'' H3; elim H3; clear H3; intros l' H3.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
elim H3; clear H3; intros ts' H3; elim H3; clear H3; intros H3 H4.
(* Goal: @ex (list (list A)) (fun vs : list (list A) => @ex A (fun a'0 : A => @ex (list A) (fun l : list A => @ex (list (tree (prod (list (list A)) (list A)))) (fun ts : list (tree (prod (list (list A)) (list A))) => and (or (@eq (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) (@cons (list A) w ws) (@cons A a (@nil A))) f) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts)) (@In (tree (prod (list (list A)) (list A))) (@node (prod (list (list A)) (list A)) (@pair (list (list A)) (list A) vs (@cons A a'0 l)) ts) f)) (leA a'0 a'))))) *)
exists vs'; exists a''; exists l'; exists ts'; split; try right; trivial.
Qed.
End higman_aux.
|
Require Export b_soundness.
Require Export Decidable.
Set Implicit Arguments.
Module Type complete_mod (X: base_mod) (Y: sound_mod X).
Import X Y.
Inductive NNF : Set :=
| NPos : PropVars -> NNF
| NNeg : PropVars -> NNF
| NBot : NNF
| NTop : NNF
| NConj : NNF -> NNF -> NNF
| NDisj : NNF -> NNF -> NNF
.
Fixpoint MakeNNF (A:PropF) : NNF := match A with
| # P => NPos P
| ⊥ => NBot
| B ∨ C => NDisj (MakeNNF B) (MakeNNF C)
| B ∧ C => NConj (MakeNNF B) (MakeNNF C)
| B → C => NDisj (MakeNNFN B) (MakeNNF C)
end
with MakeNNFN (A:PropF) : NNF := match A with
| # P => NNeg P
| ⊥ => NTop
| B ∨ C => NConj (MakeNNFN B) (MakeNNFN C)
| B ∧ C => NDisj (MakeNNFN B) (MakeNNFN C)
| B → C => NConj (MakeNNF B) (MakeNNFN C)
end.
Fixpoint NNFtoPropF (A:NNF) : PropF := match A with
| NPos P => #P
| NNeg P => ¬ #P
| NBot => ⊥
| NTop => ¬⊥
| NConj B C => NNFtoPropF B ∧ NNFtoPropF C
| NDisj B C => NNFtoPropF B ∨ NNFtoPropF C
end.
Inductive Literal :=
| LPos : PropVars -> Literal
| LNeg : PropVars -> Literal
| LBot : Literal
| LTop : Literal
.
Fixpoint Bar P := match P with
| LPos Q => LNeg Q
| LNeg Q => LPos Q
| LBot => LTop
| LTop => LBot
end.
Fixpoint LiteraltoPropF (P:Literal) : PropF := match P with
| LPos Q => #Q
| LNeg Q => ¬#Q
| LBot => ⊥
| LTop => ¬⊥
end.
Definition Clause := list Literal.
Definition ClausetoPropF := map_fold_right LiteraltoPropF Disj ⊥.
Definition CNF := list Clause.
Definition CNFtoPropF := map_fold_right ClausetoPropF Conj ⊤.
Definition AddClause (l:Clause) (ll:CNF) : CNF := map (fun l2 => l++l2) ll.
Definition Disjunct (ll ll2:CNF) : CNF := flat_map (fun l => AddClause l ll2) ll.
Fixpoint MakeCNF (A:NNF) : CNF := match A with
| NPos P => [[LPos P]]
| NNeg P => [[LNeg P]]
| NBot => [[LBot]]
| NTop => [[LTop]]
| NConj B C => MakeCNF B ++ MakeCNF C
| NDisj B C => Disjunct (MakeCNF B) (MakeCNF C)
end.
Definition Valid_Clause (l:Clause) := In LTop l\/exists A,(In (LPos A) l/\In (LNeg A) l).
Definition Valid_CNF ll := forall l, In l ll->Valid_Clause l.
Lemma Literal_eqdec : forall x y : Literal, {x = y} + {x <> y}.
Proof.
(* Goal: forall x y : Literal, sumbool (@eq Literal x y) (not (@eq Literal x y)) *)
intros;destruct x;destruct y;try (right;discriminate);try (left;reflexivity); destruct (Varseq_dec p p0); (left;f_equal;assumption)||(right;intro HH;injection HH;contradiction).
Qed.
Lemma NNF_equiv_valid : forall v A, TrueQ v (NNFtoPropF (MakeNNF A))=TrueQ v A /\
TrueQ v (NNFtoPropF (MakeNNFN A))=TrueQ v ¬A.
Proof.
(* Goal: None *)
intros v A;induction A;try destruct IHA;try destruct IHA1;try destruct IHA2;split;simpl in *; try trivial;try rewrite H;try rewrite H0;try rewrite H1;try rewrite H2;try trivial; repeat rewrite orb_false_r;repeat rewrite orb_false_l; try rewrite negb_andb;try rewrite negb_orb;try rewrite negb_involutive;reflexivity.
Qed.
Lemma CNF_and_valid : forall v ll1 ll2, TrueQ v (CNFtoPropF (ll1 ++ ll2)) =
TrueQ v (CNFtoPropF ll1) && TrueQ v (CNFtoPropF ll2).
Proof.
(* Goal: None *)
intros;induction ll1;simpl.
(* Goal: None *)
(* Goal: None *)
reflexivity.
(* Goal: None *)
unfold CNFtoPropF in IHll1 at 1;rewrite IHll1.
(* Goal: None *)
apply andb_assoc.
Qed.
Lemma CNF_or_clause_valid : forall v l1 l2, TrueQ v (ClausetoPropF (l1++l2)) =
TrueQ v (ClausetoPropF l1) || TrueQ v (ClausetoPropF l2).
Proof.
(* Goal: None *)
intros;induction l1;simpl.
(* Goal: None *)
(* Goal: None *)
reflexivity.
(* Goal: None *)
unfold ClausetoPropF in IHl1 at 1;rewrite IHl1.
(* Goal: None *)
apply orb_assoc.
Qed.
Lemma CNF_add_clause_valid : forall v l ll, TrueQ v (CNFtoPropF (AddClause l ll)) =
TrueQ v (ClausetoPropF l) || TrueQ v (CNFtoPropF ll).
Proof.
(* Goal: None *)
intros;induction ll;simpl.
(* Goal: None *)
(* Goal: None *)
rewrite orb_true_r;reflexivity.
(* Goal: None *)
unfold CNFtoPropF in IHll at 1;rewrite IHll.
(* Goal: None *)
rewrite CNF_or_clause_valid.
(* Goal: None *)
rewrite orb_andb_distrib_r.
(* Goal: None *)
reflexivity.
Qed.
Lemma CNF_or_valid : forall v ll1 ll2, TrueQ v (CNFtoPropF (Disjunct ll1 ll2)) =
TrueQ v (CNFtoPropF ll1) || TrueQ v (CNFtoPropF ll2).
Proof.
(* Goal: None *)
intros;induction ll1;simpl.
(* Goal: None *)
(* Goal: @eq bool true true *)
reflexivity.
(* Goal: None *)
rewrite CNF_and_valid;rewrite IHll1;rewrite CNF_add_clause_valid.
(* Goal: None *)
rewrite orb_andb_distrib_l;reflexivity.
Qed.
Theorem CNF_equiv_valid : forall v A, TrueQ v (CNFtoPropF (MakeCNF A)) = TrueQ v (NNFtoPropF A).
Proof.
(* Goal: None *)
intros;induction A;simpl;try reflexivity;try (destruct (v p);simpl;reflexivity;fail); [rewrite CNF_and_valid|rewrite CNF_or_valid];rewrite IHA1;rewrite IHA2;reflexivity.
Qed.
Definition Countervaluation l P := if (in_dec Literal_eqdec (LNeg P) l) then true else false.
Definition Validates v Δ := exists A, In A Δ /\ Is_true (TrueQ v A).
Lemma TrueQ_impl_Validates : forall v m, Is_true (TrueQ v (ClausetoPropF m)) -> Validates v (map LiteraltoPropF m).
Proof.
(* Goal: None *)
intros;induction m.
(* Goal: None *)
(* Goal: None *)
contradiction.
(* Goal: None *)
simpl in H;case_bool v (LiteraltoPropF a).
(* Goal: None *)
(* Goal: None *)
exists (LiteraltoPropF a);split;[in_solve|rewrite H0;trivial].
(* Goal: None *)
destruct (IHm H) as (?&?&?);exists x;split;[in_solve|assumption].
Qed.
Lemma Validated_valid : forall l, Validates (Countervaluation l) (map LiteraltoPropF l) -> Valid_Clause l.
Proof.
(* Goal: None *)
intros l (A&H&K).
(* Goal: Valid_Clause l *)
apply in_map_iff in H as (p&?&H);subst;destruct p;unfold Countervaluation in K;simpl in K.
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
destruct (in_dec Literal_eqdec (LNeg p) l).
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
right;eauto.
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
contradiction.
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
destruct (in_dec Literal_eqdec (LNeg p) l);contradiction.
(* Goal: Valid_Clause l *)
(* Goal: Valid_Clause l *)
contradiction.
(* Goal: Valid_Clause l *)
left;assumption.
Qed.
Theorem Clause_valid : forall l, Valid (ClausetoPropF l) -> Valid_Clause l.
Proof.
(* Goal: None *)
intros;apply Validated_valid;apply TrueQ_impl_Validates;apply H;intros ? Q;destruct Q.
Qed.
Theorem CNF_valid : forall ll, Valid (CNFtoPropF ll) -> Valid_CNF ll.
Lemma Clause_provable_3 : forall a l1 l2 Γ, In (LiteraltoPropF a) Γ -> Γ ⊢ ClausetoPropF (l1++a::l2).
Proof.
(* Goal: None *)
intros;induction l1.
(* Goal: None *)
(* Goal: None *)
apply OrI1;is_ass.
(* Goal: None *)
apply OrI2;assumption.
Qed.
Lemma Clause_provable_2 : forall a l1 l2 l3, Provable (ClausetoPropF (l1++(Bar a)::l2++a::l3)).
Proof.
(* Goal: None *)
intros;induction l1.
(* Goal: None *)
(* Goal: None *)
apply BotC;mp;[is_ass|destruct a;simpl;apply OrI1]; try (apply ImpI;mp;[is_ass|apply OrI2;apply Clause_provable_3;in_solve]); (apply BotC;mp;[constructor;constructor 2;in_solve|apply OrI2;apply Clause_provable_3;in_solve]).
(* Goal: None *)
apply OrI2;assumption.
Qed.
Theorem Clause_provable : forall l, Valid_Clause l -> Provable (ClausetoPropF l).
Proof.
(* Goal: None *)
intros ? [?|(?&?&?)];apply in_split in H as (?&?&?);subst.
(* Goal: None *)
(* Goal: None *)
induction x;simpl.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
apply OrI1;simpl;apply ImpI;is_ass.
(* Goal: None *)
(* Goal: None *)
apply OrI2;apply IHx.
(* Goal: None *)
apply in_app_or in H0 as [].
(* Goal: None *)
(* Goal: None *)
apply in_split in H as (?&?&?);subst.
(* Goal: None *)
(* Goal: None *)
rewrite app_ass;apply (Clause_provable_2 (LPos x)).
(* Goal: None *)
inversion H;[discriminate|].
(* Goal: None *)
apply in_split in H0 as (?&?&?);subst.
(* Goal: None *)
apply (Clause_provable_2 (LNeg x)).
Qed.
Theorem CNF_provable : forall ll, Valid_CNF ll -> Provable (CNFtoPropF ll).
Proof.
(* Goal: None *)
intros;induction ll;unfold CNFtoPropF;simpl.
(* Goal: None *)
(* Goal: None *)
apply ImpI;is_ass.
(* Goal: None *)
eapply AndI.
(* Goal: None *)
(* Goal: None *)
apply Clause_provable;apply H;constructor;reflexivity.
(* Goal: None *)
apply IHll;intro;intro;apply H;constructor 2;assumption.
Qed.
Lemma prov_or : forall A1 A2 B1 B2 Γ, Provable (A1 → A2) -> Provable (B1 → B2) -> In (A1∨B1) Γ -> Γ ⊢ A2∨B2.
Lemma CNF_and_prov : forall ll1 ll2, Provable (CNFtoPropF (ll1 ++ ll2) → CNFtoPropF ll1 ∧ CNFtoPropF ll2).
Proof.
(* Goal: None *)
intros;induction ll1;simpl.
(* Goal: None *)
(* Goal: None *)
unfold CNFtoPropF at 2;unfold ClausetoPropF;simpl.
(* Goal: None *)
(* Goal: None *)
apply ImpI;apply AndI.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
unfold Top;unfold Neg;apply ImpI;is_ass.
(* Goal: None *)
(* Goal: None *)
is_ass.
(* Goal: None *)
prov_impl_in IHll1; apply ImpI;apply AndI.
(* Goal: None *)
(* Goal: None *)
unfold CNFtoPropF;simpl;apply AndI.
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply AndE1;is_ass.
(* Goal: None *)
(* Goal: None *)
eapply AndE1;apply K.
(* Goal: None *)
(* Goal: None *)
eapply AndE2;is_ass.
(* Goal: None *)
eapply AndE2;apply K;eapply AndE2;is_ass.
Qed.
Lemma CNF_or_clause_prov : forall l1 l2, Provable (ClausetoPropF (l1++l2) → ClausetoPropF l1 ∨ ClausetoPropF l2).
Lemma CNF_add_clause_prov : forall l ll, Provable (CNFtoPropF (AddClause l ll) → ClausetoPropF l ∨ CNFtoPropF ll).
Lemma CNF_or_prov : forall ll1 ll2, Provable (CNFtoPropF (Disjunct ll1 ll2) → CNFtoPropF ll1 ∨ CNFtoPropF ll2).
Proof.
(* Goal: None *)
intros;induction ll1;simpl;unfold CNFtoPropF;simpl.
(* Goal: None *)
(* Goal: None *)
apply ImpI;eapply OrI1;is_ass.
(* Goal: None *)
prov_impl_in IHll1;apply ImpI; apply OrE with (ClausetoPropF a) (CNFtoPropF ll2).
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply prov_impl;[apply CNF_add_clause_prov|].
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
eapply AndE1;eapply prov_impl;[apply CNF_and_prov|is_ass].
(* Goal: None *)
(* Goal: None *)
apply OrE with (CNFtoPropF ll1) (CNFtoPropF ll2).
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
apply K;eapply AndE2;eapply prov_impl;[apply CNF_and_prov|is_ass].
(* Goal: None *)
(* Goal: None *)
(* Goal: None *)
apply OrI1;apply AndI;is_ass.
(* Goal: None *)
(* Goal: None *)
apply OrI2;is_ass.
(* Goal: None *)
apply OrI2;is_ass.
Qed.
Theorem CNF_impl_prov : forall A, Provable (CNFtoPropF (MakeCNF A) → NNFtoPropF A).
Lemma prov_and : forall A1 A2 B1 B2 Γ, Provable (A1 → A2) -> Provable (B1 → B2) -> In (A1∧B1) Γ -> Γ ⊢ A2∧B2.
Proof.
(* Goal: None *)
intros; prov_impl_in H;prov_impl_in H0.
(* Goal: None *)
apply AndI;[apply K;eapply AndE1|apply K0;eapply AndE2];is_ass.
Qed.
Lemma NNF_impl_prov : forall A, Provable (NNFtoPropF (MakeNNF A) → A) /\
Provable (NNFtoPropF (MakeNNFN A) → ¬A).
Theorem Completeness : Prop_Completeness.
Theorem prov_equiv_models : forall Γ A, Γ ⊢ A <-> Γ ⊨ A.
Proof.
(* Goal: None *)
split;[apply Soundness_general|revert A;induction Γ].
(* Goal: None *)
(* Goal: None *)
apply Completeness.
(* Goal: None *)
intros.
(* Goal: None *)
apply deduction.
(* Goal: None *)
apply IHΓ.
(* Goal: None *)
intros ? ?.
(* Goal: None *)
case_bool v a;rewrite H1;simpl.
(* Goal: True *)
(* Goal: None *)
apply H.
(* Goal: True *)
(* Goal: None *)
intros ? ?.
(* Goal: True *)
(* Goal: None *)
destruct H2;subst.
(* Goal: True *)
(* Goal: None *)
(* Goal: None *)
rewrite H1;exact I.
(* Goal: True *)
(* Goal: None *)
apply H0;in_solve.
(* Goal: True *)
exact I.
Qed.
Print Assumptions prov_equiv_models.
End complete_mod. |
Require Export GeoCoq.Tarski_dev.Definitions.
Require Export GeoCoq.Tactics.finish.
Ltac prolong A B x C D :=
assert (sg:= segment_construction A B C D);
ex_and sg x.
Section T1_1.
Context `{Tn:Tarski_neutral_dimensionless}.
Lemma cong_reflexivity : forall A B,
Cong A B A B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @Cong Tn A B A B *)
intros.
(* Goal: @Cong Tn A B A B *)
apply (cong_inner_transitivity B A A B); apply cong_pseudo_reflexivity.
Qed.
Lemma cong_symmetry : forall A B C D : Tpoint,
Cong A B C D -> Cong C D A B.
Lemma cong_transitivity : forall A B C D E F : Tpoint,
Cong A B C D -> Cong C D E F -> Cong A B E F.
Proof.
(* Goal: forall (A B C D E F : @Tpoint Tn) (_ : @Cong Tn A B C D) (_ : @Cong Tn C D E F), @Cong Tn A B E F *)
intros.
(* Goal: @Cong Tn A B E F *)
eapply cong_inner_transitivity; eauto using cong_symmetry.
Qed.
Lemma cong_left_commutativity : forall A B C D,
Cong A B C D -> Cong B A C D.
Lemma cong_right_commutativity : forall A B C D,
Cong A B C D -> Cong A B D C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Cong Tn A B D C *)
intros.
(* Goal: @Cong Tn A B D C *)
apply cong_symmetry.
(* Goal: @Cong Tn D C A B *)
apply cong_symmetry in H.
(* Goal: @Cong Tn D C A B *)
apply cong_left_commutativity.
(* Goal: @Cong Tn C D A B *)
assumption.
Qed.
Lemma cong_3421 : forall A B C D,
Cong A B C D -> Cong C D B A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Cong Tn C D B A *)
auto using cong_symmetry, cong_right_commutativity.
Qed.
Lemma cong_4312 : forall A B C D,
Cong A B C D -> Cong D C A B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Cong Tn D C A B *)
auto using cong_symmetry, cong_right_commutativity.
Qed.
Lemma cong_4321 : forall A B C D,
Cong A B C D -> Cong D C B A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Cong Tn D C B A *)
auto using cong_symmetry, cong_right_commutativity.
Qed.
Lemma cong_trivial_identity : forall A B : Tpoint,
Cong A A B B.
Lemma cong_reverse_identity : forall A C D,
Cong A A C D -> C=D.
Lemma cong_commutativity : forall A B C D,
Cong A B C D -> Cong B A D C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), @Cong Tn B A D C *)
intros.
(* Goal: @Cong Tn B A D C *)
apply cong_left_commutativity.
(* Goal: @Cong Tn A B D C *)
apply cong_right_commutativity.
(* Goal: @Cong Tn A B C D *)
assumption.
Qed.
End T1_1.
Hint Resolve cong_commutativity cong_3421 cong_4312 cong_4321 cong_trivial_identity
cong_left_commutativity cong_right_commutativity
cong_transitivity cong_symmetry cong_reflexivity : cong.
Ltac Cong := auto 4 with cong.
Ltac eCong := eauto with cong.
Section T1_2.
Context `{Tn:Tarski_neutral_dimensionless}.
Lemma not_cong_2134 : forall A B C D, ~ Cong A B C D -> ~ Cong B A C D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn B A C D) *)
auto with cong.
Qed.
Lemma not_cong_1243 : forall A B C D, ~ Cong A B C D -> ~ Cong A B D C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn A B D C) *)
auto with cong.
Qed.
Lemma not_cong_2143 : forall A B C D, ~ Cong A B C D -> ~ Cong B A D C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn B A D C) *)
auto with cong.
Qed.
Lemma not_cong_3412 : forall A B C D, ~ Cong A B C D -> ~ Cong C D A B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn C D A B) *)
auto with cong.
Qed.
Lemma not_cong_4312 : forall A B C D, ~ Cong A B C D -> ~ Cong D C A B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn D C A B) *)
auto with cong.
Qed.
Lemma not_cong_3421 : forall A B C D, ~ Cong A B C D -> ~ Cong C D B A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn C D B A) *)
auto with cong.
Qed.
Lemma not_cong_4321 : forall A B C D, ~ Cong A B C D -> ~ Cong D C B A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@Cong Tn A B C D)), not (@Cong Tn D C B A) *)
auto with cong.
Qed.
End T1_2.
Hint Resolve not_cong_2134 not_cong_1243 not_cong_2143
not_cong_3412 not_cong_4312 not_cong_3421 not_cong_4321 : cong.
Section T1_3.
Context `{Tn:Tarski_neutral_dimensionless}.
Lemma five_segment_with_def : forall A B C D A' B' C' D',
OFSC A B C D A' B' C' D' -> A<>B -> Cong C D C' D'.
Proof.
(* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : @OFSC Tn A B C D A' B' C' D') (_ : not (@eq (@Tpoint Tn) A B)), @Cong Tn C D C' D' *)
unfold OFSC.
(* Goal: forall (A B C D A' B' C' D' : @Tpoint Tn) (_ : and (@Bet Tn A B C) (and (@Bet Tn A' B' C') (and (@Cong Tn A B A' B') (and (@Cong Tn B C B' C') (and (@Cong Tn A D A' D') (@Cong Tn B D B' D')))))) (_ : not (@eq (@Tpoint Tn) A B)), @Cong Tn C D C' D' *)
intros;spliter.
(* Goal: @Cong Tn C D C' D' *)
apply (five_segment A A' B B'); assumption.
Qed.
Lemma cong_diff : forall A B C D : Tpoint,
A <> B -> Cong A B C D -> C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Cong Tn A B C D), not (@eq (@Tpoint Tn) C D) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
intro.
(* Goal: False *)
subst.
(* Goal: False *)
apply H.
(* Goal: @eq (@Tpoint Tn) A B *)
eauto using cong_identity.
Qed.
Lemma cong_diff_2 : forall A B C D ,
B <> A -> Cong A B C D -> C <> D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B A)) (_ : @Cong Tn A B C D), not (@eq (@Tpoint Tn) C D) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) C D) *)
intro;subst.
(* Goal: False *)
apply H.
(* Goal: @eq (@Tpoint Tn) B A *)
symmetry.
(* Goal: @eq (@Tpoint Tn) A B *)
eauto using cong_identity, cong_symmetry.
Qed.
Lemma cong_diff_3 : forall A B C D ,
C <> D -> Cong A B C D -> A <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) C D)) (_ : @Cong Tn A B C D), not (@eq (@Tpoint Tn) A B) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro;subst.
(* Goal: False *)
apply H.
(* Goal: @eq (@Tpoint Tn) C D *)
eauto using cong_identity, cong_symmetry.
Qed.
Lemma cong_diff_4 : forall A B C D ,
D <> C -> Cong A B C D -> A <> B.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) D C)) (_ : @Cong Tn A B C D), not (@eq (@Tpoint Tn) A B) *)
intros.
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro;subst.
(* Goal: False *)
apply H.
(* Goal: @eq (@Tpoint Tn) D C *)
symmetry.
(* Goal: @eq (@Tpoint Tn) C D *)
eauto using cong_identity, cong_symmetry.
Qed.
Lemma cong_3_sym : forall A B C A' B' C',
Cong_3 A B C A' B' C' -> Cong_3 A' B' C' A B C.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Cong_3 Tn A B C A' B' C'), @Cong_3 Tn A' B' C' A B C *)
unfold Cong_3.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C'))), and (@Cong Tn A' B' A B) (and (@Cong Tn A' C' A C) (@Cong Tn B' C' B C)) *)
intuition.
Qed.
Lemma cong_3_swap : forall A B C A' B' C',
Cong_3 A B C A' B' C' -> Cong_3 B A C B' A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Cong_3 Tn A B C A' B' C'), @Cong_3 Tn B A C B' A' C' *)
unfold Cong_3.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C'))), and (@Cong Tn B A B' A') (and (@Cong Tn B C B' C') (@Cong Tn A C A' C')) *)
intuition.
Qed.
Lemma cong_3_swap_2 : forall A B C A' B' C',
Cong_3 A B C A' B' C' -> Cong_3 A C B A' C' B'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Cong_3 Tn A B C A' B' C'), @Cong_3 Tn A C B A' C' B' *)
unfold Cong_3.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : and (@Cong Tn A B A' B') (and (@Cong Tn A C A' C') (@Cong Tn B C B' C'))), and (@Cong Tn A C A' C') (and (@Cong Tn A B A' B') (@Cong Tn C B C' B')) *)
intuition.
Qed.
Lemma cong3_transitivity : forall A0 B0 C0 A1 B1 C1 A2 B2 C2,
Cong_3 A0 B0 C0 A1 B1 C1 -> Cong_3 A1 B1 C1 A2 B2 C2 -> Cong_3 A0 B0 C0 A2 B2 C2.
Proof.
(* Goal: forall (A0 B0 C0 A1 B1 C1 A2 B2 C2 : @Tpoint Tn) (_ : @Cong_3 Tn A0 B0 C0 A1 B1 C1) (_ : @Cong_3 Tn A1 B1 C1 A2 B2 C2), @Cong_3 Tn A0 B0 C0 A2 B2 C2 *)
unfold Cong_3.
(* Goal: forall (A0 B0 C0 A1 B1 C1 A2 B2 C2 : @Tpoint Tn) (_ : and (@Cong Tn A0 B0 A1 B1) (and (@Cong Tn A0 C0 A1 C1) (@Cong Tn B0 C0 B1 C1))) (_ : and (@Cong Tn A1 B1 A2 B2) (and (@Cong Tn A1 C1 A2 C2) (@Cong Tn B1 C1 B2 C2))), and (@Cong Tn A0 B0 A2 B2) (and (@Cong Tn A0 C0 A2 C2) (@Cong Tn B0 C0 B2 C2)) *)
intros.
(* Goal: and (@Cong Tn A0 B0 A2 B2) (and (@Cong Tn A0 C0 A2 C2) (@Cong Tn B0 C0 B2 C2)) *)
spliter.
(* Goal: and (@Cong Tn A0 B0 A2 B2) (and (@Cong Tn A0 C0 A2 C2) (@Cong Tn B0 C0 B2 C2)) *)
repeat split; eapply cong_transitivity; eCong.
Qed.
End T1_3.
Hint Resolve cong_3_sym : cong.
Hint Resolve cong_3_swap cong_3_swap_2 cong3_transitivity : cong3.
Hint Unfold Cong_3 : cong3.
Section T1_4.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma eq_dec_points : forall A B : Tpoint, A=B \/ ~ A=B.
Proof.
(* Goal: forall A B : @Tpoint Tn, or (@eq (@Tpoint Tn) A B) (not (@eq (@Tpoint Tn) A B)) *)
exact point_equality_decidability.
Qed.
Lemma distinct : forall P Q R : Tpoint, P <> Q -> (R <> P \/ R <> Q).
Proof.
(* Goal: forall (P Q R : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) P Q)), or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
intros.
(* Goal: or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
induction (eq_dec_points R P).
(* Goal: or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
(* Goal: or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
subst R.
(* Goal: or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
(* Goal: or (not (@eq (@Tpoint Tn) P P)) (not (@eq (@Tpoint Tn) P Q)) *)
right.
(* Goal: or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
(* Goal: not (@eq (@Tpoint Tn) P Q) *)
assumption.
(* Goal: or (not (@eq (@Tpoint Tn) R P)) (not (@eq (@Tpoint Tn) R Q)) *)
left.
(* Goal: not (@eq (@Tpoint Tn) R P) *)
assumption.
Qed.
Lemma l2_11 : forall A B C A' B' C',
Bet A B C -> Bet A' B' C' -> Cong A B A' B' -> Cong B C B' C' -> Cong A C A' C'.
Proof.
(* Goal: forall (A B C A' B' C' : @Tpoint Tn) (_ : @Bet Tn A B C) (_ : @Bet Tn A' B' C') (_ : @Cong Tn A B A' B') (_ : @Cong Tn B C B' C'), @Cong Tn A C A' C' *)
intros.
(* Goal: @Cong Tn A C A' C' *)
induction (eq_dec_points A B).
(* Goal: @Cong Tn A C A' C' *)
(* Goal: @Cong Tn A C A' C' *)
subst B.
(* Goal: @Cong Tn A C A' C' *)
(* Goal: @Cong Tn A C A' C' *)
assert (A' = B') by (apply (cong_identity A' B' A); Cong).
(* Goal: @Cong Tn A C A' C' *)
(* Goal: @Cong Tn A C A' C' *)
subst; Cong.
(* Goal: @Cong Tn A C A' C' *)
apply cong_commutativity; apply (five_segment A A' B B' C C' A A'); Cong.
Qed.
Lemma bet_cong3 : forall A B C A' B', Bet A B C -> Cong A B A' B' -> exists C', Cong_3 A B C A' B' C'.
Lemma construction_uniqueness : forall Q A B C X Y,
Q <> A -> Bet Q A X -> Cong A X B C -> Bet Q A Y -> Cong A Y B C -> X=Y.
Proof.
(* Goal: forall (Q A B C X Y : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) Q A)) (_ : @Bet Tn Q A X) (_ : @Cong Tn A X B C) (_ : @Bet Tn Q A Y) (_ : @Cong Tn A Y B C), @eq (@Tpoint Tn) X Y *)
intros.
(* Goal: @eq (@Tpoint Tn) X Y *)
assert (Cong A X A Y) by (apply cong_transitivity with B C; Cong).
(* Goal: @eq (@Tpoint Tn) X Y *)
assert (Cong Q X Q Y) by (apply (l2_11 Q A X Q A Y);Cong).
(* Goal: @eq (@Tpoint Tn) X Y *)
assert(OFSC Q A X Y Q A X X) by (unfold OFSC;repeat split;Cong).
(* Goal: @eq (@Tpoint Tn) X Y *)
apply five_segment_with_def in H6; try assumption.
(* Goal: @eq (@Tpoint Tn) X Y *)
apply cong_identity with X; Cong.
Qed.
Lemma Cong_cases :
forall A B C D,
Cong A B C D \/ Cong A B D C \/ Cong B A C D \/ Cong B A D C \/
Cong C D A B \/ Cong C D B A \/ Cong D C A B \/ Cong D C B A ->
Cong A B C D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : or (@Cong Tn A B C D) (or (@Cong Tn A B D C) (or (@Cong Tn B A C D) (or (@Cong Tn B A D C) (or (@Cong Tn C D A B) (or (@Cong Tn C D B A) (or (@Cong Tn D C A B) (@Cong Tn D C B A)))))))), @Cong Tn A B C D *)
intros.
(* Goal: @Cong Tn A B C D *)
decompose [or] H;clear H; Cong.
Qed.
Lemma Cong_perm :
forall A B C D,
Cong A B C D ->
Cong A B C D /\ Cong A B D C /\ Cong B A C D /\ Cong B A D C /\
Cong C D A B /\ Cong C D B A /\ Cong D C A B /\ Cong D C B A.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @Cong Tn A B C D), and (@Cong Tn A B C D) (and (@Cong Tn A B D C) (and (@Cong Tn B A C D) (and (@Cong Tn B A D C) (and (@Cong Tn C D A B) (and (@Cong Tn C D B A) (and (@Cong Tn D C A B) (@Cong Tn D C B A))))))) *)
intros.
(* Goal: and (@Cong Tn A B C D) (and (@Cong Tn A B D C) (and (@Cong Tn B A C D) (and (@Cong Tn B A D C) (and (@Cong Tn C D A B) (and (@Cong Tn C D B A) (and (@Cong Tn D C A B) (@Cong Tn D C B A))))))) *)
repeat split; Cong.
Qed.
End T1_4. |
Require Export GeoCoq.Elements.OriginalProofs.euclidean_tactics.
Section Euclid.
Context `{Ax:euclidean_neutral}.
Lemma lemma_TCreflexive :
forall A B C,
Triangle A B C ->
Cong_3 A B C A B C.
Proof.
(* Goal: forall (A B C : @Point Ax) (_ : @Triangle Ax A B C), @Cong_3 Ax A B C A B C *)
intros.
(* Goal: @Cong_3 Ax A B C A B C *)
assert (Cong A B A B) by (conclude cn_congruencereflexive).
(* Goal: @Cong_3 Ax A B C A B C *)
assert (Cong B C B C) by (conclude cn_congruencereflexive).
(* Goal: @Cong_3 Ax A B C A B C *)
assert (Cong A C A C) by (conclude cn_congruencereflexive).
(* Goal: @Cong_3 Ax A B C A B C *)
assert (Cong_3 A B C A B C) by (conclude_def Cong_3 ).
(* Goal: @Cong_3 Ax A B C A B C *)
close.
Qed.
End Euclid. |
Require Import Factorization_Verif.
Require Import Comparator_Relation.
Parameter BASE : BT.
Definition b := base BASE.
Definition Digit := digit BASE.
Definition Num := num BASE.
Definition Val_bound := val_bound BASE.
Definition Value := Val BASE.
Definition Connection := connection order (inf b) (inf b) (R b).
Theorem general_correct :
forall (n : nat) (X Y : Num n) (o o' : order),
Connection n o X Y o' -> R (exp b n) o (Val_bound n X) (Val_bound n Y) o'.
Proof.
(* Goal: forall (n : nat) (X Y : Num n) (o o' : order) (_ : Connection n o X Y o'), R (exp b n) o (Val_bound n X) (Val_bound n Y) o' *)
intros n X Y o o' C.
(* Goal: R (exp b n) o (Val_bound n X) (Val_bound n Y) o' *)
unfold b in |- *.
(* Goal: R (exp (base BASE) n) o (Val_bound n X) (Val_bound n Y) o' *)
apply factorization_for_verification with (A := order) (BASE := BASE).
(* Goal: Factorization_Verif.Connection order BASE R n o X Y o' *)
(* Goal: proper order BASE R *)
(* Goal: factorizable order R *)
exact is_factorizable.
(* Goal: Factorization_Verif.Connection order BASE R n o X Y o' *)
(* Goal: proper order BASE R *)
exact (is_proper BASE).
(* Goal: Factorization_Verif.Connection order BASE R n o X Y o' *)
try trivial.
Qed.
Theorem correctness :
forall (n : nat) (X Y : Num n) (o : order),
Connection n E X Y o -> o = Compare_Nat.comparison (Value n X) (Value n Y).
Proof.
(* Goal: forall (n : nat) (X Y : Num n) (o : order) (_ : Connection n E X Y o), @eq order o (comparison (Value n X) (Value n Y)) *)
intros n X Y o.
(* Goal: forall _ : Connection n E X Y o, @eq order o (comparison (Value n X) (Value n Y)) *)
generalize (general_correct n X Y E o).
(* Goal: forall (_ : forall _ : Connection n E X Y o, R (exp b n) E (Val_bound n X) (Val_bound n Y) o) (_ : Connection n E X Y o), @eq order o (comparison (Value n X) (Value n Y)) *)
unfold R in |- *; simpl in |- *; auto.
Qed.
|
From mathcomp
Require Import ssreflect ssrbool seq eqtype.
From LemmaOverloading
Require Import heaps noalias.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Module NoAlias2.
Section NoAlias2Section.
Structure tagged_bool (x y : ptr) := Tag {untag : bool}.
Local Coercion untag : tagged_bool >-> bool.
Canonical Structure ineq x y := @Tag x y (x != y).
Structure form x y (s : seq ptr) :=
Form {eq_of : tagged_bool x y;
_ : uniq s -> untag eq_of}.
Lemma start_pf (x y : ptr) (f : Search2.form x y) : uniq f -> ineq x y.
Proof.
(* Goal: forall _ : is_true (@uniq ptr_eqType (Search2.untag (@Search2.seq_of x y f))), is_true (@untag x y (ineq x y)) *)
by case: f=>s [].
Qed.
Canonical Structure start x y (f : Search2.form x y) :=
@Form x y f (ineq x y) (@start_pf x y f).
End NoAlias2Section.
Module Exports.
Canonical Structure ineq.
Canonical Structure start.
Coercion untag : tagged_bool >-> bool.
End Exports.
End NoAlias2.
Export NoAlias2.Exports.
Lemma noaliasR2 s x y (f : Scan.form s) (g : NoAlias2.form x y s) :
Proof.
(* Goal: forall _ : is_true (def (Scan.untag (@Scan.heap_of s f))), is_true (@NoAlias2.untag x y (@NoAlias2.eq_of x y s g)) *)
by case: f=> [h] H /H [U _]; case: g=> [] /= ? /(_ U).
Qed.
Arguments noaliasR2 [s x y f g].
Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
(x1 != x2) /\
(x1 != x2) && (x2 != x3) && (x3 != x1) /\
(x2 == x3) = false /\ (x1 == x2) = false /\
(x1 != x2) && (x2 != x3) && (x1 != x4) && (x3 != x1).
Proof.
move=>D.
split.
- by apply: (noaliasR2 D).
split.
- by rewrite !(noaliasR2 D).
split.
- try by rewrite [x2 == x3](negbTE (noaliasR2 D)).
admit.
split.
-
try by rewrite (negbTE (noaliasR2 D)).
admit.
try rewrite !(negbTE (noaliasR2 D)).
admit.
Abort.
Module NoAlias3.
Section NoAlias3Section.
Structure form x (s : seq ptr) :=
Form {y_of : ptr;
_ : uniq s -> x != y_of}.
Local Coercion y_of : form >-> ptr.
Arguments Form : clear implicits.
Lemma noalias_pf (x y : ptr) (f : Search2.form x y) :
Proof.
(* Goal: forall _ : is_true (@uniq ptr_eqType (Search2.untag (@Search2.seq_of x y f))), is_true (negb (@eq_op ptr_eqType x y)) *)
by move: f=>[[s]][].
Qed.
Canonical Structure start x y (f : Search2.form x y) :=
@Form x f y (@noalias_pf x y f).
End NoAlias3Section.
Module Exports.
Canonical Structure start.
Coercion y_of : form >-> ptr.
End Exports.
End NoAlias3.
Export NoAlias3.Exports.
Lemma noaliasR s x (f : Scan.form s) (g : NoAlias3.form x s) :
Proof.
(* Goal: forall _ : is_true (def (Scan.untag (@Scan.heap_of s f))), is_true (negb (@eq_op ptr_eqType x (@NoAlias3.y_of x s g))) *)
by move: f g=>[[h]] H1 [[y']] /= H2; case/H1=>U _; apply: H2.
Qed.
Arguments noaliasR {s x f g}.
Example exnc A (x1 x2 x3 x4 : ptr) (v1 v2 : A) (h1 h2 : heap) :
def (h1 :+ x2 :-> 1 :+ h2 :+ x1 :-> v2 :+ (x3 :-> v1 :+ empty)) ->
(x1 != x2) /\
(x1 != x2) && (x2 != x3) && (x3 != x1) /\
(x2 == x3) = false /\ (x1 == x2) = false /\
(x1 != x2) && (x2 != x3) && (x1 != x4) && (x3 != x1).
Proof.
move=>D.
split.
- by apply: (noaliasR D).
split.
- by rewrite !(noaliasR D).
split.
- by rewrite [x2 == x3](negbTE (noaliasR D)).
split.
-
by rewrite (negbTE (noaliasR D)).
rewrite !(negbTE (noaliasR D)).
admit.
Abort.
|
Require Import Arith.
Require Import Terms.
Require Import Reduction.
Require Import Redexes.
Require Import Test.
Fixpoint mark (e : lambda) : redexes :=
match e with
| Ref n => Var n
| Abs M => Fun (mark M)
| App M N => Ap false (mark M) (mark N)
end.
Fixpoint unmark (e : redexes) : lambda :=
match e with
| Var n => Ref n
| Fun U => Abs (unmark U)
| Ap b U V => App (unmark U) (unmark V)
end.
Lemma inverse : forall M : lambda, M = unmark (mark M).
Proof.
(* Goal: forall M : lambda, @eq lambda M (unmark (mark M)) *)
simple induction M; simpl in |- *; trivial; simple induction 1; trivial.
(* Goal: forall (l0 : lambda) (_ : @eq lambda l0 (unmark (mark l0))), @eq lambda (App l l0) (App l (unmark (mark l0))) *)
simple induction 1; trivial.
Qed.
Lemma comp_unmark_eq : forall U V : redexes, comp U V -> unmark U = unmark V.
Proof.
(* Goal: forall (U V : redexes) (_ : comp U V), @eq lambda (unmark U) (unmark V) *)
simple induction 1; simpl in |- *; trivial.
(* Goal: forall (U1 V1 : redexes) (_ : comp U1 V1) (_ : @eq lambda (unmark U1) (unmark V1)) (U2 V2 : redexes) (_ : comp U2 V2) (_ : @eq lambda (unmark U2) (unmark V2)) (_ : bool) (_ : bool), @eq lambda (App (unmark U1) (unmark U2)) (App (unmark V1) (unmark V2)) *)
(* Goal: forall (U V : redexes) (_ : comp U V) (_ : @eq lambda (unmark U) (unmark V)), @eq lambda (Abs (unmark U)) (Abs (unmark V)) *)
simple induction 2; trivial.
(* Goal: forall (U1 V1 : redexes) (_ : comp U1 V1) (_ : @eq lambda (unmark U1) (unmark V1)) (U2 V2 : redexes) (_ : comp U2 V2) (_ : @eq lambda (unmark U2) (unmark V2)) (_ : bool) (_ : bool), @eq lambda (App (unmark U1) (unmark U2)) (App (unmark V1) (unmark V2)) *)
simple induction 2; simple induction 2; trivial.
Qed.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_ABCequalsCBA.
Require Export GeoCoq.Elements.OriginalProofs.lemma_supplements.
Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglestransitive.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_15 :
forall A B C D E,
BetS A E B -> BetS C E D -> nCol A E C ->
CongA A E C D E B /\ CongA C E B A E D.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @BetS Ax0 A E B) (_ : @BetS Ax0 C E D) (_ : @nCol Ax0 A E C), and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
intros.
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (neq E D) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (neq D E) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (neq E B) by (forward_using lemma_betweennotequal).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (neq B E) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (~ Col B E D).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
(* Goal: not (@Col Ax0 B E D) *)
{
(* Goal: not (@Col Ax0 B E D) *)
intro.
(* Goal: False *)
assert (Col A E B) by (conclude_def Col ).
(* Goal: False *)
assert (Col B E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E A D) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col C E D) by (conclude_def Col ).
(* Goal: False *)
assert (Col D E C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col D E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E C A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A E C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
}
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (eq D D) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Out E D D) by (conclude lemma_ray4).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Out E B B) by (conclude lemma_ray4).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (BetS B E A) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Supp B E D D A) by (conclude_def Supp ).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (BetS D E C) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Supp D E B B C) by (conclude_def Supp ).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (~ Col A E D).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
(* Goal: not (@Col Ax0 A E D) *)
{
(* Goal: not (@Col Ax0 A E D) *)
intro.
(* Goal: False *)
assert (Col C E D) by (conclude_def Col ).
(* Goal: False *)
assert (Col D E C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col D E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E C A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A E C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
}
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA B E D D E B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA D E A B E C) by (conclude lemma_supplements).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (~ Col B E C).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
(* Goal: not (@Col Ax0 B E C) *)
{
(* Goal: not (@Col Ax0 B E C) *)
intro.
(* Goal: False *)
assert (Col A E B) by (conclude_def Col ).
(* Goal: False *)
assert (Col B E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E A C) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A E C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
}
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA B E C C E B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA D E A C E B) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA A E D D E A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA A E D C E B) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA C E B A E D) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (~ eq E C).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
(* Goal: not (@eq Ax0 E C) *)
{
(* Goal: not (@eq Ax0 E C) *)
intro.
(* Goal: False *)
assert (Col B E C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
}
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Out E C C) by (conclude lemma_ray4).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Supp B E C C A) by (conclude_def Supp ).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (BetS C E D) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (Supp C E B B D) by (conclude_def Supp ).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (~ Col A E C).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
(* Goal: not (@Col Ax0 A E C) *)
{
(* Goal: not (@Col Ax0 A E C) *)
intro.
(* Goal: False *)
assert (Col D E C) by (conclude_def Col ).
(* Goal: False *)
assert (Col C E D) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col C E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C E) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col E D A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A E D) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
}
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA B E C C E B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA C E A B E D) by (conclude lemma_supplements).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (~ Col B E D).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
(* Goal: not (@Col Ax0 B E D) *)
{
(* Goal: not (@Col Ax0 B E D) *)
intro.
(* Goal: False *)
assert (Col A E B) by (conclude_def Col ).
(* Goal: False *)
assert (Col B E A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col E A D) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A E D) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
}
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA B E D D E B) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA C E A D E B) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA A E C C E A) by (conclude lemma_ABCequalsCBA).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
assert (CongA A E C D E B) by (conclude lemma_equalanglestransitive).
(* Goal: and (@CongA Ax0 A E C D E B) (@CongA Ax0 C E B A E D) *)
close.
Qed.
Lemma proposition_15a :
forall A B C D E : Point,
BetS A E B ->
BetS C E D -> nCol A E C -> CongA A E C D E B.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @BetS Ax0 A E B) (_ : @BetS Ax0 C E D) (_ : @nCol Ax0 A E C), @CongA Ax0 A E C D E B *)
intros.
(* Goal: @CongA Ax0 A E C D E B *)
apply (proposition_15 A B C D E);assumption.
Qed.
Lemma proposition_15b :
forall A B C D E : Point,
BetS A E B ->
BetS C E D -> nCol A E C ->
CongA C E B A E D.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @BetS Ax0 A E B) (_ : @BetS Ax0 C E D) (_ : @nCol Ax0 A E C), @CongA Ax0 C E B A E D *)
intros.
(* Goal: @CongA Ax0 C E B A E D *)
apply (proposition_15 A B C D E);assumption.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCdistinct.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NChelper.
Require Export GeoCoq.Elements.OriginalProofs.lemma_oppositesidesymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_07.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_14 :
forall A B C D E,
RT A B C D B E -> Out B C D -> TS E D B A ->
Supp A B C D E /\ BetS A B E.
Proof.
(* Goal: forall (A B C D E : @Point Ax0) (_ : @RT Ax0 A B C D B E) (_ : @Out Ax0 B C D) (_ : @TS Ax0 E D B A), and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
intros.
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
let Tf:=fresh in assert (Tf:exists a b c d e, (Supp a b c d e /\ CongA A B C a b c /\ CongA D B E d b e)) by (conclude_def RT );destruct Tf as [a[b[c[d[e]]]]];spliter.
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA a b c A B C) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA d b e D B E) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (nCol A B C) by (conclude lemma_equalanglesNC).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq A B) by (forward_using lemma_NCdistinct).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (nCol D B E) by (conclude lemma_equalanglesNC).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq B E) by (forward_using lemma_NCdistinct).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
let Tf:=fresh in assert (Tf:exists T, (BetS A B T /\ Cong B T B E)) by (conclude lemma_extension);destruct Tf as [T];spliter.
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Cong B D B D) by (conclude cn_congruencereflexive).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Supp A B C D T) by (conclude_def Supp ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA a b c A B C) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA d b e D B E) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA d b e D B T) by (conclude lemma_supplements).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA D B E D B T) by (conclude lemma_equalanglestransitive).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (CongA D B T D B E) by (conclude lemma_equalanglessymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Col A B T) by (conclude_def Col ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq B T) by (forward_using lemma_betweennotequal).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq T B) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Col A B B) by (conclude_def Col ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (nCol T B C) by (conclude lemma_NChelper).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (nCol C B T) by (forward_using lemma_NCorder).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Col B C D) by (conclude lemma_rayimpliescollinear).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Col C B D) by (forward_using lemma_collinearorder).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq D B) by (forward_using lemma_NCdistinct).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Col C B B) by (conclude_def Col ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (nCol D B T) by (conclude lemma_NChelper).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Cong D T D E) by (conclude proposition_04).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Cong T D E D) by (forward_using lemma_congruenceflip).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Cong T B E B) by (forward_using lemma_congruenceflip).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Col D B B) by (conclude_def Col ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (TS A D B E) by (conclude lemma_oppositesidesymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
let Tf:=fresh in assert (Tf:exists m, (BetS A m E /\ Col D B m /\ nCol D B A)) by (conclude_def TS );destruct Tf as [m];spliter.
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (BetS E m A) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (BetS T B A) by (conclude axiom_betweennesssymmetry).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (OS T E D B) by (conclude_def OS ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq B C) by (forward_using lemma_NCdistinct).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (eq T E) by (conclude proposition_07).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (BetS A B E) by (conclude cn_equalitysub).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
assert (Supp A B C D E) by (conclude_def Supp ).
(* Goal: and (@Supp Ax0 A B C D E) (@BetS Ax0 A B E) *)
close.
Qed.
End Euclid.
|
Require Import Le.
Require Import Lt.
Require Import Plus.
Require Import Gt.
Require Import Minus.
Require Import Mult.
Require Import TS.
Require Import sigma_lift.
Require Import comparith.
Definition e_P2 (b : wsort) (U : TS b) : nat :=
(fix F (w : wsort) (t : TS w) {struct t} : nat :=
match t with
| var _ => 1
| app t0 t1 => S (F wt t0 + F wt t1)
| lambda t0 => 2 * F wt t0
| env t0 t1 => F wt t0 * S (F ws t1)
| id => 1
| shift => 1
| cons t0 t1 => S (F wt t0 + F ws t1)
| comp t0 t1 => F ws t0 * S (F ws t1)
| lift t0 => 4 * F ws t0
| meta_X _ => 1
| meta_x _ => 1
end) b U.
Notation P2 := (e_P2 _) (only parsing).
Theorem P2_pos : forall (b : wsort) (M : TS b), e_P2 _ M > 0.
Proof.
(* Goal: forall (b : wsort) (M : TS b), gt (e_P2 b M) O *)
simple induction M; simpl in |- *; intros; auto with arith.
Qed.
Hint Resolve P2_pos.
Theorem P2_app : forall M N : terms, reg_app M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_app M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; elim Mult.mult_plus_distr_r; auto with arith.
Qed.
Hint Resolve P2_app.
Theorem P2_lambda : forall M N : terms, reg_lambda M N -> e_P2 _ M < e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_lambda M N), lt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros.
(* Goal: lt (e_P2 wt (env (lambda a) s)) (e_P2 wt (lambda (env a (lift s)))) *)
change (2 * (e_P2 _ a * S (4 * e_P2 _ s)) > 2 * e_P2 _ a * S (e_P2 _ s)) in |- *.
(* Goal: gt (Nat.mul (S (S O)) (Nat.mul (e_P2 wt a) (S (Nat.mul (S (S (S (S O)))) (e_P2 ws s))))) (Nat.mul (Nat.mul (S (S O)) (e_P2 wt a)) (S (e_P2 ws s))) *)
elim mult_assoc_reverse; auto with arith.
Qed.
Hint Resolve P2_lambda.
Theorem P2_clos : forall M N : terms, reg_clos M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_clos M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *.
(* Goal: gt (Nat.mul (Nat.mul (e_P2 wt a) (S (e_P2 ws s))) (S (e_P2 ws t))) (Nat.mul (e_P2 wt a) (S (Nat.mul (e_P2 ws s) (S (e_P2 ws t))))) *)
elim mult_assoc_l; apply gt_mult_reg_l.
(* Goal: gt (Nat.mul (S (e_P2 ws s)) (S (e_P2 ws t))) (S (Nat.mul (e_P2 ws s) (S (e_P2 ws t)))) *)
(* Goal: gt (e_P2 wt a) O *)
auto with arith.
(* Goal: gt (Nat.mul (S (e_P2 ws s)) (S (e_P2 ws t))) (S (Nat.mul (e_P2 ws s) (S (e_P2 ws t)))) *)
simpl in |- *; auto with arith.
Qed.
Hint Resolve P2_clos.
Theorem P2_varshift1 :
forall M N : terms, reg_varshift1 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_varshift1 M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; simpl in |- *; auto with arith.
Qed.
Hint Resolve P2_varshift1.
Theorem P2_varshift2 :
forall M N : terms, reg_varshift2 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_varshift2 M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; repeat elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_varshift2.
Theorem P2_fvarcons :
forall M N : terms, reg_fvarcons M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_fvarcons M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_fvarcons.
Theorem P2_fvarlift1 :
forall M N : terms, reg_fvarlift1 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_fvarlift1 M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 wt (env (var O) (lift s))) (e_P2 wt (var O)) *)
change (1 * S (4 * e_P2 _ s) > 1) in |- *.
(* Goal: gt (Nat.mul (S O) (S (Nat.mul (S (S (S (S O)))) (e_P2 ws s)))) (S O) *)
auto with arith.
Qed.
Hint Resolve P2_fvarlift1.
Theorem P2_fvarlift2 :
forall M N : terms, reg_fvarlift2 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_fvarlift2 M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; repeat elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_fvarlift2.
Theorem P2_rvarcons :
forall M N : terms, reg_rvarcons M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_rvarcons M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; repeat elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_rvarcons.
Theorem P2_rvarlift1 :
forall M N : terms, reg_rvarlift1 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_rvarlift1 M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; repeat elim plus_n_O.
(* Goal: gt (S (Nat.add (e_P2 ws s) (Nat.add (e_P2 ws s) (Nat.add (e_P2 ws s) (e_P2 ws s))))) (S (Nat.mul (e_P2 ws s) (S (S O)))) *)
elim mult_n_2; auto with arith.
Qed.
Hint Resolve P2_rvarlift1.
Theorem P2_rvarlift2 :
forall M N : terms, reg_rvarlift2 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_rvarlift2 M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 wt (env (var (S n)) (comp (lift s) t))) (e_P2 wt (env (var n) (comp s (comp shift t)))) *)
change (1 * S (4 * e_P2 _ s * S (e_P2 _ t)) > 1 * S (e_P2 _ s * S (1 * S (e_P2 _ t)))) in |- *.
(* Goal: gt (Nat.mul (S O) (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (e_P2 ws t))))) (Nat.mul (S O) (S (Nat.mul (e_P2 ws s) (S (Nat.mul (S O) (S (e_P2 ws t))))))) *)
unfold mult at 1 in |- *; unfold mult at 3 in |- *; unfold mult at 4 in |- *; repeat elim plus_n_O.
(* Goal: gt (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (e_P2 ws t)))) (S (Nat.mul (e_P2 ws s) (S (S (e_P2 ws t))))) *)
apply gt_n_S; repeat elim mult_n_Sm; elim plus_assoc.
(* Goal: gt (Nat.add (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (e_P2 ws t)) (Nat.mul (S (S (S (S O)))) (e_P2 ws s))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (e_P2 ws t)) (PeanoNat.Nat.add (e_P2 ws s) (e_P2 ws s))) *)
apply gt_plus_plus.
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (PeanoNat.Nat.add (e_P2 ws s) (e_P2 ws s)) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (e_P2 ws t)) (Nat.mul (e_P2 ws s) (e_P2 ws t)) *)
elim mult_assoc_l; auto with arith.
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (PeanoNat.Nat.add (e_P2 ws s) (e_P2 ws s)) *)
elim mult_n_2; elim mult_sym; auto with arith.
Qed.
Hint Resolve P2_rvarlift2.
Theorem P2_assenv :
forall M N : sub_explicits, reg_assenv M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_assenv M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros; simpl in |- *.
(* Goal: gt (Nat.mul (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) (S (e_P2 ws u))) (Nat.mul (e_P2 ws s) (S (Nat.mul (e_P2 ws t) (S (e_P2 ws u))))) *)
rewrite mult_assoc_reverse; simpl in |- *; auto with arith.
Qed.
Hint Resolve P2_assenv.
Theorem P2_mapenv :
forall M N : sub_explicits, reg_mapenv M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_mapenv M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros; simpl in |- *; elim Mult.mult_plus_distr_r; auto with arith.
Qed.
Hint Resolve P2_mapenv.
Theorem P2_shiftcons :
forall M N : sub_explicits, reg_shiftcons M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_shiftcons M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_shiftcons.
Theorem P2_shiftlift1 :
forall M N : sub_explicits, reg_shiftlift1 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_shiftlift1 M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 ws (comp shift (lift s))) (e_P2 ws (comp s shift)) *)
change (1 * S (4 * e_P2 _ s) > e_P2 _ s * 2) in |- *.
(* Goal: gt (Nat.mul (S O) (S (Nat.mul (S (S (S (S O)))) (e_P2 ws s)))) (Nat.mul (e_P2 ws s) (S (S O))) *)
unfold mult at 1 in |- *; elim plus_n_O.
(* Goal: gt (S (Nat.mul (S (S (S (S O)))) (e_P2 ws s))) (Nat.mul (e_P2 ws s) (S (S O))) *)
apply gt_S_l; elim mult_sym; auto with arith.
Qed.
Hint Resolve P2_shiftlift1.
Theorem P2_shiftlift2 :
forall M N : sub_explicits, reg_shiftlift2 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_shiftlift2 M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 ws (comp shift (comp (lift s) t))) (e_P2 ws (comp s (comp shift t))) *)
change (1 * S (4 * e_P2 _ s * S (e_P2 _ t)) > e_P2 _ s * S (1 * S (e_P2 _ t))) in |- *.
(* Goal: gt (Nat.mul (S O) (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (e_P2 ws t))))) (Nat.mul (e_P2 ws s) (S (Nat.mul (S O) (S (e_P2 ws t))))) *)
unfold mult at 1 in |- *; elim plus_n_O; unfold mult at 4 in |- *; elim plus_n_O.
(* Goal: gt (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (e_P2 ws t)))) (Nat.mul (e_P2 ws s) (S (S (e_P2 ws t)))) *)
apply gt_S_l; repeat elim mult_n_Sm; elim plus_assoc.
(* Goal: gt (Nat.add (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (e_P2 ws t)) (Nat.mul (S (S (S (S O)))) (e_P2 ws s))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (e_P2 ws t)) (PeanoNat.Nat.add (e_P2 ws s) (e_P2 ws s))) *)
apply gt_plus_plus.
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (PeanoNat.Nat.add (e_P2 ws s) (e_P2 ws s)) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (e_P2 ws t)) (Nat.mul (e_P2 ws s) (e_P2 ws t)) *)
elim mult_assoc_l; auto with arith.
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (PeanoNat.Nat.add (e_P2 ws s) (e_P2 ws s)) *)
elim mult_n_2; elim mult_sym; auto with arith.
Qed.
Hint Resolve P2_shiftlift2.
Theorem P2_lift1 :
forall M N : sub_explicits, reg_lift1 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_lift1 M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 ws (comp (lift s) (lift t))) (e_P2 ws (lift (comp s t))) *)
change (4 * e_P2 _ s * S (4 * e_P2 _ t) > 4 * (e_P2 _ s * S (e_P2 _ t))) in |- *.
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (Nat.mul (S (S (S (S O)))) (e_P2 ws t)))) (Nat.mul (S (S (S (S O)))) (Nat.mul (e_P2 ws s) (S (e_P2 ws t)))) *)
elim mult_assoc_reverse; auto with arith.
Qed.
Hint Resolve P2_lift1.
Theorem P2_lift2 :
forall M N : sub_explicits, reg_lift2 M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_lift2 M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 ws (comp (lift s) (comp (lift t) u))) (e_P2 ws (comp (lift (comp s t)) u)) *)
change (4 * e_P2 _ s * S (4 * e_P2 _ t * S (e_P2 _ u)) > 4 * (e_P2 _ s * S (e_P2 _ t)) * S (e_P2 _ u)) in |- *.
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws t)) (S (e_P2 ws u))))) (Nat.mul (Nat.mul (S (S (S (S O)))) (Nat.mul (e_P2 ws s) (S (e_P2 ws t)))) (S (e_P2 ws u))) *)
elim mult_assoc_reverse; elim (mult_assoc_l (4 * e_P2 _ s) (S (e_P2 _ t)) (S (e_P2 _ u))); apply gt_mult_reg_l.
(* Goal: gt (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws t)) (S (e_P2 ws u)))) (Nat.mul (S (e_P2 ws t)) (S (e_P2 ws u))) *)
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) O *)
auto with arith.
(* Goal: gt (S (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws t)) (S (e_P2 ws u)))) (Nat.mul (S (e_P2 ws t)) (S (e_P2 ws u))) *)
apply gt_S_l; apply gt_mult_reg_r.
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws t)) (S (e_P2 ws t)) *)
(* Goal: gt (S (e_P2 ws u)) O *)
auto with arith.
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws t)) (S (e_P2 ws t)) *)
apply gt_trans with (3 * e_P2 _ t).
(* Goal: gt (Nat.mul (S (S (S O))) (e_P2 ws t)) (S (e_P2 ws t)) *)
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws t)) (Nat.mul (S (S (S O))) (e_P2 ws t)) *)
auto with arith.
(* Goal: gt (Nat.mul (S (S (S O))) (e_P2 ws t)) (S (e_P2 ws t)) *)
simpl in |- *; elim plus_n_O; rewrite S_plus; apply plus_gt_compat_l.
(* Goal: gt (Nat.add (e_P2 ws t) (e_P2 ws t)) (S O) *)
elim mult_n_2; auto with arith.
Qed.
Hint Resolve P2_lift2.
Theorem P2_liftenv :
forall M N : sub_explicits, reg_liftenv M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_liftenv M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros.
(* Goal: gt (e_P2 ws (comp (lift s) (cons a t))) (e_P2 ws (cons a (comp s t))) *)
change (4 * e_P2 _ s * S (S (e_P2 _ a + e_P2 _ t)) > S (e_P2 _ a + e_P2 _ s * S (e_P2 _ t))) in |- *.
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (S (Nat.add (e_P2 wt a) (e_P2 ws t))))) (S (Nat.add (e_P2 wt a) (Nat.mul (e_P2 ws s) (S (e_P2 ws t))))) *)
cut (S (S (e_P2 _ a + e_P2 _ t)) = e_P2 _ a + (e_P2 _ t + 2)).
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: forall _ : @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))), gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S (S (Nat.add (e_P2 wt a) (e_P2 ws t))))) (S (Nat.add (e_P2 wt a) (Nat.mul (e_P2 ws s) (S (e_P2 ws t))))) *)
intro H1; rewrite H1.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O))))) (S (Nat.add (e_P2 wt a) (Nat.mul (e_P2 ws s) (S (e_P2 ws t))))) *)
rewrite (S_plus (e_P2 _ a + e_P2 _ s * S (e_P2 _ t))); rewrite comparith.mult_plus_distr_r.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: gt (Nat.add (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (e_P2 wt a)) (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 ws t) (S (S O))))) (Nat.add (Nat.add (e_P2 wt a) (Nat.mul (e_P2 ws s) (S (e_P2 ws t)))) (S O)) *)
elim plus_assoc; apply gt_plus_plus.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 ws t) (S (S O)))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) (S O)) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (e_P2 wt a)) (e_P2 wt a) *)
apply gt_mult_l.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 ws t) (S (S O)))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) (S O)) *)
(* Goal: gt (e_P2 wt a) O *)
(* Goal: gt (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S O) *)
auto with arith.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 ws t) (S (S O)))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) (S O)) *)
(* Goal: gt (e_P2 wt a) O *)
auto with arith.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 ws t) (S (S O)))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) (S O)) *)
replace (e_P2 _ t + 2) with (e_P2 _ t + 1 + 1).
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: @eq nat (Nat.add (Nat.add (e_P2 ws t) (S O)) (S O)) (Nat.add (e_P2 ws t) (S (S O))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (Nat.add (e_P2 ws t) (S O)) (S O))) (PeanoNat.Nat.add (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) (S O)) *)
rewrite comparith.mult_plus_distr_r; apply gt_plus_plus.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: @eq nat (Nat.add (Nat.add (e_P2 ws t) (S O)) (S O)) (Nat.add (e_P2 ws t) (S (S O))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S O)) (S O) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (Nat.add (e_P2 ws t) (S O))) (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) *)
elim S_plus; elim mult_assoc_l.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: @eq nat (Nat.add (Nat.add (e_P2 ws t) (S O)) (S O)) (Nat.add (e_P2 ws t) (S (S O))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S O)) (S O) *)
(* Goal: gt (Nat.mul (S (S (S (S O)))) (Nat.mul (e_P2 ws s) (S (e_P2 ws t)))) (Nat.mul (e_P2 ws s) (S (e_P2 ws t))) *)
apply gt_mult_l; auto with arith.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: @eq nat (Nat.add (Nat.add (e_P2 ws t) (S O)) (S O)) (Nat.add (e_P2 ws t) (S (S O))) *)
(* Goal: gt (Nat.mul (Nat.mul (S (S (S (S O)))) (e_P2 ws s)) (S O)) (S O) *)
apply gt_mult_l; auto with arith.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
(* Goal: @eq nat (Nat.add (Nat.add (e_P2 ws t) (S O)) (S O)) (Nat.add (e_P2 ws t) (S (S O))) *)
elim (plus_n_Sm (e_P2 _ t) 1); auto with arith.
(* Goal: @eq nat (S (S (Nat.add (e_P2 wt a) (e_P2 ws t)))) (Nat.add (e_P2 wt a) (Nat.add (e_P2 ws t) (S (S O)))) *)
rewrite plus_assoc; elim plus_n_Sm; elim plus_n_Sm; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_liftenv.
Theorem P2_idl :
forall M N : sub_explicits, reg_idl M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_idl M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; simpl in |- *; intros; elim plus_n_O; auto with arith.
Qed.
Hint Resolve P2_idl.
Theorem P2_idr :
forall M N : sub_explicits, reg_idr M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_idr M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P2_idr.
Theorem P2_liftid :
forall M N : sub_explicits, reg_liftid M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : sub_explicits) (_ : reg_liftid M N), gt (e_P2 ws M) (e_P2 ws N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P2_liftid.
Theorem P2_id : forall M N : terms, reg_id M N -> e_P2 _ M > e_P2 _ N.
Proof.
(* Goal: forall (M N : terms) (_ : reg_id M N), gt (e_P2 wt M) (e_P2 wt N) *)
simple induction 1; intros; simpl in |- *; auto with arith.
Qed.
Hint Resolve P2_id.
|
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Ring_facts.
Require Export Generated_module.
Section ideals.
Variable R : RING.
Definition is_ideal (I : subgroup R) :=
forall x : R, in_part x I -> forall a : R, in_part (ring_mult a x) I.
Record ideal : Type :=
{ideal_subgroup :> subgroup R; ideal_prf : is_ideal ideal_subgroup}.
Lemma ideal_prop :
forall (I : ideal) (x : I) (a : R), in_part (ring_mult a (I x)) I.
Proof.
(* Goal: forall (I : ideal) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (@group_of_subgroup (abelian_group_group (ring_group R)) (ideal_subgroup I)))))) (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a (@subtype_image_inj (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))) x)) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
intros I x a; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a (@subtype_image_inj (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))) x)) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
apply (ideal_prf (i:=I)).
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@subtype_image_inj (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))) x) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
case x; simpl in |- *; auto with algebra.
Qed.
Lemma ideal_prop2 :
forall (I : ideal) (x a : R), in_part x I -> in_part (ring_mult a x) I.
Proof.
(* Goal: forall (I : ideal) (x a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
intros I x a H'; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
apply (ideal_prf (i:=I)); auto with algebra.
Qed.
Lemma ideal_prop3 :
forall (I : ideal) (x y : R),
in_part x I -> in_part y I -> in_part (sgroup_law R x y) I.
Proof.
(* Goal: forall (I : ideal) (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) y (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
auto with algebra.
Qed.
Lemma ideal_prop4 :
forall (I : ideal) (x : R), in_part x I -> in_part (group_inverse R x) I.
Proof.
(* Goal: forall (I : ideal) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (ideal_subgroup I)))) *)
auto with algebra.
Qed.
End ideals.
Hint Resolve ideal_prop2: algebra.
Section Ring_as_module.
Variable R : ring.
Definition ring_module : module R.
Proof.
(* Goal: module R *)
apply (BUILD_MODULE_GROUP (R:=R) (module_util_G:=R) (gen_module_op:=fun a x : R => ring_mult a x)); abstract auto with algebra.
Qed.
End Ring_as_module.
Coercion ring_module : ring >-> module.
Section Generated_ideal.
Variable R : RING.
Variable A : part_set R.
Definition generated_module_subgroup : subgroup R.
Proof.
(* Goal: subgroup (abelian_group_group (ring_group R)) *)
apply (BUILD_SUB_GROUP (G:=R) (H:=generated_module (R:=R) (Mod:=R) A)); simpl in |- *; auto with algebra.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) y (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
intros x y H' H'0; try assumption.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
elim H'0; intros x0 E; elim E; intros H'1 H'2; try exact H'2; clear E H'0.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
elim H'; intros x1 E; elim E; intros H'0 H'3; try exact H'3; clear E H'.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
exists (Law x1 x0); split; [ try assumption | idtac ].
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) x1 x0)) *)
simpl in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) x y) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x1) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)) *)
exact (SGROUP_comp (E:=R) H'3 H'2).
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x))) *)
exists (Unit R A); split; [ idtac | try assumption ].
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)))) *)
(* Goal: True *)
auto with algebra.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)))) *)
simpl in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R))))) *)
auto with algebra.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
intros x H'; try assumption.
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
elim H'; intros x0 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
exists (Inv x0); split; [ idtac | try assumption ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) x0)) *)
(* Goal: True *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) x0)) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (group_inverse (abelian_group_group (ring_group R)) x) (group_inverse (abelian_group_group (ring_group R)) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)) *)
exact (GROUP_comp (G:=R) H'1).
Qed.
Definition generated_ideal : ideal R.
Proof.
(* Goal: ideal R *)
apply (Build_ideal (R:=R) (ideal_subgroup:=generated_module_subgroup)).
(* Goal: @is_ideal R generated_module_subgroup *)
red in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) generated_module_subgroup)))) (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) generated_module_subgroup))) *)
simpl in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))) (a : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
intros x H' a; try assumption.
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
elim H'; intros x0 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
exists (Op a x0); split; [ idtac | try assumption ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) a x0)) *)
(* Goal: True *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) a x0)) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R a x) (@module_mult R (ring_module R) a (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)) *)
exact (MODULE_comp (R:=R) (Mod:=R:MODULE R) (Refl a) H'1).
Qed.
Lemma generated_ideal_included : included A generated_ideal.
Proof.
(* Goal: @included (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R generated_ideal)))) *)
red in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x A), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R generated_ideal)))) *)
simpl in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x A), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0))) *)
intros x H'; exists (Var R (V:=A) (Build_subtype (E:=R) (P:=A) (subtype_elt:=x) H')); split; [ idtac | try assumption ].
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A x H'))) *)
(* Goal: True *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A x H'))) *)
simpl in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x x *)
auto with algebra.
Qed.
Lemma generated_ideal_minimal :
forall I : ideal R, included A I -> included generated_ideal I.
Proof.
(* Goal: forall (I : ideal R) (_ : @included (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))), @included (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R generated_ideal)))) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
unfold included in |- *.
(* Goal: forall (I : ideal R) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x A), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R generated_ideal))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
simpl in |- *.
(* Goal: forall (I : ideal R) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x A), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
intros I H' x H'0; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
elim H'0; intros x0 E; elim E; intros H'1 H'2; try exact H'2; clear E H'0.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
generalize H'2; clear H'2; clear H'1.
(* Goal: forall _ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
generalize x; clear x.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) x0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
elim x0.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (c : Carrier (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
simpl in |- *.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (c : @subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A c)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
intros c x H'0; try assumption.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
apply 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x A *)
apply in_part_comp_l with (subtype_elt c); 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@subtype_elt (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A c) A *)
case c; 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
intros f H'0 f0 H'1 x H'2; try assumption.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
simpl in H'2.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
apply in_part_comp_l with (sgroup_law R (FMd_lift_fun (R:=R) (V:=A) (Mod:=R:MODULE R) (inj_part A) f) (FMd_lift_fun (R:=R) (V:=A) (Mod:=R:MODULE R) (inj_part A) f0)); 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
simpl in |- *.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (monoid_on_def (group_monoid (abelian_group_group (ring_group R)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
intros x H'0; try assumption.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
apply in_part_comp_l with (monoid_unit R); 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
intros f H'0 x H'1; try assumption.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
simpl in H'1.
(* 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
apply in_part_comp_l with (group_inverse R (FMd_lift_fun (R:=R) (V:=A) (Mod:=R:MODULE R) (inj_part A) f)); 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 (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) c f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
intros c f H'0 x H'1; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
simpl in H'1.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
apply in_part_comp_l with (module_mult c (FMd_lift_fun (R:=R) (V:=A) (Mod:=R:MODULE R) (inj_part A) f)); auto with algebra.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R (ring_module R)))))) (@module_mult R (ring_module R) c (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
change (in_part (ring_mult c (FMd_lift_fun (R:=R) (V:=A) (Mod:=R:MODULE R) (inj_part A) f)) (subsgroup_part (submonoid_subsgroup (subgroup_submonoid (ideal_subgroup I))))) in |- *.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@ring_mult R c (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A)) (ring_module R : Ob (MODULE R)) (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R))))) A) f)) (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (ring_group R))) (@subgroup_submonoid (abelian_group_group (ring_group R)) (@ideal_subgroup R I)))) *)
apply ideal_prop2; auto with algebra.
Qed.
End Generated_ideal.
Hint Resolve generated_ideal_minimal generated_ideal_included: algebra.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelflip.
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric.
Section Euclid.
Context `{Ax1:euclidean_neutral}.
Lemma lemma_PGflip :
forall A B C D,
PG A B C D ->
PG B A D C.
Proof.
(* Goal: forall (A B C D : @Point Ax1) (_ : @PG Ax1 A B C D), @PG Ax1 B A D C *)
intros.
(* Goal: @PG Ax1 B A D C *)
assert ((Par A B C D /\ Par A D B C)) by (conclude_def PG ).
(* Goal: @PG Ax1 B A D C *)
assert (Par B A D C) by (forward_using lemma_parallelflip).
(* Goal: @PG Ax1 B A D C *)
assert (Par B C A D) by (conclude lemma_parallelsymmetric).
(* Goal: @PG Ax1 B A D C *)
assert (PG B A D C) by (conclude_def PG ).
(* Goal: @PG Ax1 B A D C *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_equalanglestransitive.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_angleorderrespectscongruence2 :
forall A B C D E F a b c,
LtA A B C D E F -> CongA a b c A B C ->
LtA a b c D E F.
Proof.
(* Goal: forall (A B C D E F a b c : @Point Ax0) (_ : @LtA Ax0 A B C D E F) (_ : @CongA Ax0 a b c A B C), @LtA Ax0 a b c D E F *)
intros.
(* Goal: @LtA Ax0 a b c D E F *)
let Tf:=fresh in assert (Tf:exists P Q R, (BetS P Q R /\ Out E D P /\ Out E F R /\ CongA A B C D E Q)) by (conclude_def LtA );destruct Tf as [P[Q[R]]];spliter.
(* Goal: @LtA Ax0 a b c D E F *)
assert (CongA a b c D E Q) by (conclude lemma_equalanglestransitive).
(* Goal: @LtA Ax0 a b c D E F *)
assert (LtA a b c D E F) by (conclude_def LtA ).
(* Goal: @LtA Ax0 a b c D E F *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_parallelsymmetric.
Require Export GeoCoq.Elements.OriginalProofs.proposition_29.
Require Export GeoCoq.Elements.OriginalProofs.proposition_28A.
Section Euclid.
Context `{Ax:euclidean_euclidean}.
Lemma proposition_30B :
forall A B C D E F G H K,
Par A B E F -> Par C D E F -> BetS G K H -> BetS A G B -> BetS E H F -> BetS C K D -> TS A G H F -> TS C K H F ->
Par A B C D.
Proof.
(* Goal: forall (A B C D E F G H K : @Point Ax0) (_ : @Par Ax0 A B E F) (_ : @Par Ax0 C D E F) (_ : @BetS Ax0 G K H) (_ : @BetS Ax0 A G B) (_ : @BetS Ax0 E H F) (_ : @BetS Ax0 C K D) (_ : @TS Ax0 A G H F) (_ : @TS Ax0 C K H F), @Par Ax0 A B C D *)
intros.
(* Goal: @Par Ax0 A B C D *)
assert (neq G H) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (neq H G) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (neq K H) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (neq H K) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A B C D *)
let Tf:=fresh in assert (Tf:exists P, (BetS H G P /\ Cong G P G H)) by (conclude lemma_extension);destruct Tf as [P];spliter.
(* Goal: @Par Ax0 A B C D *)
assert (BetS P G H) by (conclude axiom_betweennesssymmetry).
(* Goal: @Par Ax0 A B C D *)
assert (CongA A G H G H F) by (apply (proposition_29 A B E F P G H);auto).
(* Goal: @Par Ax0 A B C D *)
assert (BetS P K H) by (conclude lemma_3_5b).
(* Goal: @Par Ax0 A B C D *)
assert (CongA C K H K H F) by (conclude (proposition_29 C D E F P )).
(* Goal: @Par Ax0 A B C D *)
assert (BetS H K G) by (conclude axiom_betweennesssymmetry).
(* Goal: @Par Ax0 A B C D *)
assert (Out H K G) by (conclude lemma_ray4).
(* Goal: @Par Ax0 A B C D *)
assert (Out H G K) by (conclude lemma_ray5).
(* Goal: @Par Ax0 A B C D *)
assert (eq F F) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (neq H F) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (Out H F F) by (conclude lemma_ray4).
(* Goal: @Par Ax0 A B C D *)
assert (CongA A G H K H F) by (conclude lemma_equalangleshelper).
(* Goal: @Par Ax0 A B C D *)
assert (CongA K H F A G H) by (conclude lemma_equalanglessymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (CongA C K H A G H) by (conclude lemma_equalanglestransitive).
(* Goal: @Par Ax0 A B C D *)
assert (neq G H) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (Out G H K) by (conclude lemma_ray4).
(* Goal: @Par Ax0 A B C D *)
assert (neq A G) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (neq G A) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (Out G A A) by (conclude lemma_ray4).
(* Goal: @Par Ax0 A B C D *)
assert (CongA C K H A G K) by (conclude lemma_equalangleshelper).
(* Goal: @Par Ax0 A B C D *)
assert (CongA H K C K G A) by (conclude lemma_equalanglesflip).
(* Goal: @Par Ax0 A B C D *)
let Tf:=fresh in assert (Tf:exists M, (BetS A M F /\ Col G H M /\ nCol G H A)) by (conclude_def TS );destruct Tf as [M];spliter.
(* Goal: @Par Ax0 A B C D *)
let Tf:=fresh in assert (Tf:exists m, (BetS C m F /\ Col K H m /\ nCol K H C)) by (conclude_def TS );destruct Tf as [m];spliter.
(* Goal: @Par Ax0 A B C D *)
assert (Col G K H) by (conclude_def Col ).
(* Goal: @Par Ax0 A B C D *)
assert (Col H G K) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (Col H G M) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (neq H G) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (Col G K M) by (conclude lemma_collinear4).
(* Goal: @Par Ax0 A B C D *)
assert (Col K G M) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (Col H K m) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (Col H K G) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (neq H K) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (Col K m G) by (conclude lemma_collinear4).
(* Goal: @Par Ax0 A B C D *)
assert (Col K G m) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (Col G H K) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (eq G G) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (Col G H G) by (conclude_def Col ).
(* Goal: @Par Ax0 A B C D *)
assert (neq G K) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (nCol G K A) by (conclude lemma_NChelper).
(* Goal: @Par Ax0 A B C D *)
assert (nCol K G A) by (forward_using lemma_NCorder).
(* Goal: @Par Ax0 A B C D *)
assert (Col K H G) by (forward_using lemma_collinearorder).
(* Goal: @Par Ax0 A B C D *)
assert (eq K K) by (conclude cn_equalityreflexive).
(* Goal: @Par Ax0 A B C D *)
assert (Col K H K) by (conclude_def Col ).
(* Goal: @Par Ax0 A B C D *)
assert (neq G K) by (forward_using lemma_betweennotequal).
(* Goal: @Par Ax0 A B C D *)
assert (neq K G) by (conclude lemma_inequalitysymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (nCol K G C) by (conclude lemma_NChelper).
(* Goal: @Par Ax0 A B C D *)
assert (OS A C K G) by (conclude_def OS ).
(* Goal: @Par Ax0 A B C D *)
assert (OS C A K G) by (forward_using lemma_samesidesymmetric).
(* Goal: @Par Ax0 A B C D *)
assert (BetS D K C) by (conclude axiom_betweennesssymmetry).
(* Goal: @Par Ax0 A B C D *)
assert (BetS B G A) by (conclude axiom_betweennesssymmetry).
(* Goal: @Par Ax0 A B C D *)
assert (Par D C B A) by (conclude proposition_28A).
(* Goal: @Par Ax0 A B C D *)
assert (Par C D A B) by (forward_using lemma_parallelflip).
(* Goal: @Par Ax0 A B C D *)
assert (Par A B C D) by (conclude lemma_parallelsymmetric).
(* Goal: @Par Ax0 A B C D *)
close.
Qed.
End Euclid.
|
From mathcomp
Require Import ssreflect ssrbool ssrnat eqtype.
From LemmaOverloading
Require Import heaps.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrfun ssrbool eqtype ssrnat seq.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Module CodeSeq.
Definition code := foldr (fun n m => 2 ^ n * m.*2.+1) 0.
Fixpoint decode_rec (v q r : nat) {struct q} :=
match q, r with
| 0, _ => [:: v]
| q'.+1, 0 => v :: [rec 0, q', q']
| q'.+1, 1 => [rec v.+1, q', q']
| q'.+1, r'.+2 => [rec v, q', r']
end where "[ 'rec' v , q , r ]" := (decode_rec v q r).
Definition decode n := if n is 0 then [::] else [rec 0, n.-1, n.-1].
Lemma decodeK : cancel decode code.
Proof.
(* Goal: @cancel (list nat) nat decode code *)
have m2s: forall n, n.*2 - n = n by move=> n; rewrite -addnn addnK.
(* Goal: @cancel (list nat) nat decode code *)
case=> //= n; rewrite -[n.+1]mul1n -(expn0 2) -{3}[n]m2s.
(* Goal: @eq nat (code (decode_rec O n n)) (muln (expn (S (S O)) O) (S (subn (double n) n))) *)
elim: n {2 4}n {1 3}0 => [|q IHq] [|[|r]] v //=; rewrite {}IHq ?mul1n ?m2s //.
(* Goal: @eq nat (muln (expn (S (S O)) (S v)) (S q)) (muln (expn (S (S O)) v) (S (subn (double (S q)) (S O)))) *)
by rewrite expnSr -mulnA mul2n.
Qed.
Lemma codeK : cancel code decode.
Proof.
(* Goal: @cancel nat (list nat) code decode *)
elim=> //= v s IHs; rewrite -[_ * _]prednK ?muln_gt0 ?expn_gt0 //=.
(* Goal: @eq (list nat) (decode_rec O (Nat.pred (muln (expn (S (S O)) v) (S (double (code s))))) (Nat.pred (muln (expn (S (S O)) v) (S (double (code s)))))) (@cons nat v s) *)
rewrite -{3}[v]addn0; elim: v {1 4}0 => [|v IHv {IHs}] q.
(* Goal: @eq (list nat) (decode_rec q (Nat.pred (muln (expn (S (S O)) (S v)) (S (double (code s))))) (Nat.pred (muln (expn (S (S O)) (S v)) (S (double (code s)))))) (@cons nat (addn (S v) q) s) *)
(* Goal: @eq (list nat) (decode_rec q (Nat.pred (muln (expn (S (S O)) O) (S (double (code s))))) (Nat.pred (muln (expn (S (S O)) O) (S (double (code s)))))) (@cons nat (addn O q) s) *)
rewrite mul1n /= -{1}addnn -{4}IHs; move: (_ s) {IHs} => n.
(* Goal: @eq (list nat) (decode_rec q (Nat.pred (muln (expn (S (S O)) (S v)) (S (double (code s))))) (Nat.pred (muln (expn (S (S O)) (S v)) (S (double (code s)))))) (@cons nat (addn (S v) q) s) *)
(* Goal: @eq (list nat) (decode_rec q (addn n n) (double n)) (@cons nat (addn O q) (decode n)) *)
by elim: {1 3}n => //=; case: n.
(* Goal: @eq (list nat) (decode_rec q (Nat.pred (muln (expn (S (S O)) (S v)) (S (double (code s))))) (Nat.pred (muln (expn (S (S O)) (S v)) (S (double (code s)))))) (@cons nat (addn (S v) q) s) *)
rewrite expnS -mulnA mul2n -{1}addnn -[_ * _]prednK ?muln_gt0 ?expn_gt0 //.
(* Goal: @eq (list nat) (decode_rec q (Nat.pred (addn (S (Nat.pred (muln (expn (S (S O)) v) (S (double (code s)))))) (S (Nat.pred (muln (expn (S (S O)) v) (S (double (code s)))))))) (Nat.pred (double (S (Nat.pred (muln (expn (S (S O)) v) (S (double (code s))))))))) (@cons nat (addn (S v) q) s) *)
by rewrite doubleS addSn /= addSnnS; elim: {-2}_.-1 => //=.
Qed.
Lemma ltn_code s : all (fun j => j < code s) s.
Proof.
(* Goal: is_true (@all nat (fun j : nat => leq (S j) (code s)) s) *)
elim: s => //= i s IHs; rewrite -[_.+1]muln1 leq_mul 1?ltn_expl //=.
(* Goal: is_true (@all nat (fun j : nat => leq (S j) (muln (expn (S (S O)) i) (S (double (code s))))) s) *)
apply: sub_all IHs => j /leqW lejs; rewrite -[j.+1]mul1n leq_mul ?expn_gt0 //.
(* Goal: is_true (leq (S j) (S (double (code s)))) *)
by rewrite ltnS -[j]mul1n -mul2n leq_mul.
Qed.
Lemma gtn_decode n : all (ltn^~ n) (decode n).
Proof.
(* Goal: is_true (@all nat (fun x : nat => @rel_of_simpl_rel nat ltn x n) (decode n)) *)
by rewrite -{1}[n]decodeK ltn_code.
Qed.
End CodeSeq.
Section OtherEncodings.
Variables T T1 T2 : Type.
Definition seq_of_opt := @oapp T _ (nseq 1) [::].
Definition tag_of_pair (p : T1 * T2) := @Tagged T1 p.1 (fun _ => T2) p.2.
Definition pair_of_tag (u : {i : T1 & T2}) := (tag u, tagged u).
Lemma tag_of_pairK : cancel tag_of_pair pair_of_tag. Proof. by case. Qed.
Proof.
(* Goal: @cancel (@sigT T1 (fun x : T1 => (fun _ : T1 => T2) x)) (prod T1 T2) tag_of_pair pair_of_tag *)
by case.
Qed.
Definition opair_of_sum (s : T1 + T2) :=
match s with inl x => (Some x, None) | inr y => (None, Some y) end.
Definition sum_of_opair p :=
oapp (some \o @inr T1 T2) (omap (@inl _ T2) p.1) p.2.
Lemma bool_of_unitK : cancel (fun _ => true) (fun _ => tt).
Proof.
(* Goal: @cancel bool unit (fun _ : unit => true) (fun _ : bool => tt) *)
by case.
Qed.
End OtherEncodings.
Prenex Implicits seq_of_opt tag_of_pair pair_of_tag opair_of_sum sum_of_opair.
Prenex Implicits seq_of_optK tag_of_pairK pair_of_tagK opair_of_sumK.
Module GenTree.
Section Def.
Variable T : Type.
Unset Elimination Schemes.
Inductive tree := Leaf of T | Node of nat & seq tree.
Definition tree_rect K IH_leaf IH_node :=
fix loop t : K t := match t with
| Leaf x => IH_leaf x
| Node n f0 =>
let fix iter_pair f : foldr (fun t => prod (K t)) unit f :=
if f is t :: f' then (loop t, iter_pair f') else tt in
IH_node n f0 (iter_pair f0)
end.
Definition tree_rec (K : tree -> Set) := @tree_rect K.
Definition tree_ind K IH_leaf IH_node :=
fix loop t : K t : Prop := match t with
| Leaf x => IH_leaf x
| Node n f0 =>
let fix iter_conj f : foldr (fun t => and (K t)) True f :=
if f is t :: f' then conj (loop t) (iter_conj f') else Logic.I
in IH_node n f0 (iter_conj f0)
end.
Fixpoint encode t : seq (nat + T) :=
match t with
| Leaf x => [:: inr _ x]
| Node n f => inl _ n.+1 :: rcons (flatten (map encode f)) (inl _ 0)
end.
Definition decode_step c fs :=
match c with
| inr x => (Leaf x :: fs.1, fs.2)
| inl 0 => ([::], fs.1 :: fs.2)
| inl n.+1 => (Node n fs.1 :: head [::] fs.2, behead fs.2)
end.
Definition decode c := ohead (foldr decode_step ([::], [::]) c).1.
Lemma codeK : pcancel encode decode.
End Def.
End GenTree.
Arguments GenTree.codeK : clear implicits.
Definition tree_eqMixin (T : eqType) := PcanEqMixin (GenTree.codeK T).
Canonical tree_eqType (T : eqType) := EqType (GenTree.tree T) (tree_eqMixin T).
Module Choice.
Section ClassDef.
Record mixin_of T := Mixin {
find : pred T -> nat -> option T;
_ : forall P n x, find P n = Some x -> P x;
_ : forall P : pred T, (exists x, P x) -> exists n, find P n;
_ : forall P Q : pred T, P =1 Q -> find P =1 find Q
}.
Record class_of T := Class {base : Equality.class_of T; mixin : mixin_of T}.
Local Coercion base : class_of >-> Equality.class_of.
Structure type := Pack {sort; _ : class_of sort}.
Local Coercion sort : type >-> Sortclass.
Variables (T : Type) (cT : type).
Definition class := let: Pack _ c as cT' := cT return class_of cT' in c.
Definition clone c of phant_id class c := @Pack T c.
Let xT := let: Pack T _ := cT in T.
Notation xclass := (class : class_of xT).
Definition pack m :=
fun b bT & phant_id (Equality.class bT) b => Pack (@Class T b m).
Definition eqType := @Equality.Pack cT xclass.
End ClassDef.
Module Import Exports.
Coercion base : class_of >-> Equality.class_of.
Coercion sort : type >-> Sortclass.
Coercion eqType : type >-> Equality.type.
Canonical eqType.
Notation choiceType := type.
Notation choiceMixin := mixin_of.
Notation ChoiceType T m := (@pack T m _ _ id).
Notation "[ 'choiceType' 'of' T 'for' cT ]" := (@clone T cT _ idfun)
(at level 0, format "[ 'choiceType' 'of' T 'for' cT ]") : form_scope.
Notation "[ 'choiceType' 'of' T ]" := (@clone T _ _ id)
(at level 0, format "[ 'choiceType' 'of' T ]") : form_scope.
End Exports.
Module InternalTheory.
Section InternalTheory.
Definition find T := find (mixin (class T)).
Variable T : choiceType.
Implicit Types P Q : pred T.
Lemma correct P n x : find P n = Some x -> P x.
Proof.
(* Goal: forall _ : @eq (option (sort T)) (@find T P n) (@Some (sort T) x), is_true (P x) *)
by case: T => _ [_ []] //= in P n x *.
Qed.
Qed.
Lemma complete P : (exists x, P x) -> (exists n, find P n).
Proof.
(* Goal: forall _ : @ex (sort T) (fun x : sort T => is_true (P x)), @ex nat (fun n : nat => is_true (@isSome (sort T) (@find T P n))) *)
by case: T => _ [_ []] //= in P *.
Qed.
Qed.
Lemma extensional P Q : P =1 Q -> find P =1 find Q.
Proof.
(* Goal: forall _ : @eqfun bool (sort T) P Q, @eqfun (option (sort T)) nat (@find T P) (@find T Q) *)
by case: T => _ [_ []] //= in P Q *.
Qed.
Qed.
Fact xchoose_subproof P exP : {x | find P (ex_minn (@complete P exP)) = Some x}.
Proof.
(* Goal: @sig (sort T) (fun x : sort T => @eq (option (sort T)) (@find T P (@ex_minn (fun n : nat => @isSome (sort T) (@find T P n)) (@complete P exP))) (@Some (sort T) x)) *)
by case: (ex_minnP (complete exP)) => n; case: (find P n) => // x; exists x.
Qed.
End InternalTheory.
End InternalTheory.
End Choice.
Export Choice.Exports.
Section ChoiceTheory.
Implicit Type T : choiceType.
Import Choice.InternalTheory CodeSeq.
Local Notation dc := decode.
Section OneType.
Variable T : choiceType.
Implicit Types P Q : pred T.
Definition xchoose P exP := sval (@xchoose_subproof T P exP).
Lemma xchooseP P exP : P (@xchoose P exP).
Proof.
(* Goal: is_true (P (@xchoose P exP)) *)
by rewrite /xchoose; case: (xchoose_subproof exP) => x /= /correct.
Qed.
Lemma eq_xchoose P Q exP exQ : P =1 Q -> @xchoose P exP = @xchoose Q exQ.
Proof.
(* Goal: forall _ : @eqfun bool (Choice.sort T) P Q, @eq (Choice.sort T) (@xchoose P exP) (@xchoose Q exQ) *)
rewrite /xchoose => eqPQ.
(* Goal: @eq (Choice.sort T) (@proj1_sig (Choice.sort T) (fun x : Choice.sort T => @eq (option (Choice.sort T)) (@find T P (@ex_minn (fun n : nat => @isSome (Choice.sort T) (@find T P n)) (@complete T P exP))) (@Some (Choice.sort T) x)) (@xchoose_subproof T P exP)) (@proj1_sig (Choice.sort T) (fun x : Choice.sort T => @eq (option (Choice.sort T)) (@find T Q (@ex_minn (fun n : nat => @isSome (Choice.sort T) (@find T Q n)) (@complete T Q exQ))) (@Some (Choice.sort T) x)) (@xchoose_subproof T Q exQ)) *)
case: (xchoose_subproof exP) => x; case: (xchoose_subproof exQ) => y /=.
(* Goal: forall (_ : @eq (option (Choice.sort T)) (@find T Q (@ex_minn (fun n : nat => @isSome (Choice.sort T) (@find T Q n)) (@complete T Q exQ))) (@Some (Choice.sort T) y)) (_ : @eq (option (Choice.sort T)) (@find T P (@ex_minn (fun n : nat => @isSome (Choice.sort T) (@find T P n)) (@complete T P exP))) (@Some (Choice.sort T) x)), @eq (Choice.sort T) x y *)
case: ex_minnP => n; case: ex_minnP => m.
(* Goal: forall (_ : is_true (@isSome (Choice.sort T) (@find T P m))) (_ : forall (n : nat) (_ : is_true (@isSome (Choice.sort T) (@find T P n))), is_true (leq m n)) (_ : is_true (@isSome (Choice.sort T) (@find T Q n))) (_ : forall (n0 : nat) (_ : is_true (@isSome (Choice.sort T) (@find T Q n0))), is_true (leq n n0)) (_ : @eq (option (Choice.sort T)) (@find T Q n) (@Some (Choice.sort T) y)) (_ : @eq (option (Choice.sort T)) (@find T P m) (@Some (Choice.sort T) x)), @eq (Choice.sort T) x y *)
rewrite -(extensional eqPQ) {1}(extensional eqPQ).
(* Goal: forall (_ : is_true (@isSome (Choice.sort T) (@find T Q m))) (_ : forall (n : nat) (_ : is_true (@isSome (Choice.sort T) (@find T P n))), is_true (leq m n)) (_ : is_true (@isSome (Choice.sort T) (@find T P n))) (_ : forall (n0 : nat) (_ : is_true (@isSome (Choice.sort T) (@find T Q n0))), is_true (leq n n0)) (_ : @eq (option (Choice.sort T)) (@find T P n) (@Some (Choice.sort T) y)) (_ : @eq (option (Choice.sort T)) (@find T P m) (@Some (Choice.sort T) x)), @eq (Choice.sort T) x y *)
move=> Qm minPm Pn minQn; suffices /eqP->: m == n by move=> -> [].
(* Goal: is_true (@eq_op nat_eqType m n) *)
by rewrite eqn_leq minQn ?minPm.
Qed.
Lemma sigW P : (exists x, P x) -> {x | P x}.
Proof.
(* Goal: forall _ : @ex (Choice.sort T) (fun x : Choice.sort T => is_true (P x)), @sig (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) *)
by move=> exP; exists (xchoose exP); apply: xchooseP.
Qed.
Lemma sig2W P Q : (exists2 x, P x & Q x) -> {x | P x & Q x}.
Proof.
(* Goal: forall _ : @ex2 (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) (fun x : Choice.sort T => is_true (Q x)), @sig2 (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) (fun x : Choice.sort T => is_true (Q x)) *)
move=> exPQ; have [|x /andP[]] := @sigW (predI P Q); last by exists x.
(* Goal: @ex (Choice.sort T) (fun x : Choice.sort T => is_true (@pred_of_simpl (Choice.sort T) (@predI (Choice.sort T) P Q) x)) *)
by have [x Px Qx] := exPQ; exists x; apply/andP.
Qed.
Lemma sig_eqW (vT : eqType) (lhs rhs : T -> vT) :
(exists x, lhs x = rhs x) -> {x | lhs x = rhs x}.
Proof.
(* Goal: forall _ : @ex (Choice.sort T) (fun x : Choice.sort T => @eq (Equality.sort vT) (lhs x) (rhs x)), @sig (Choice.sort T) (fun x : Choice.sort T => @eq (Equality.sort vT) (lhs x) (rhs x)) *)
move=> exP; suffices [x /eqP Ex]: {x | lhs x == rhs x} by exists x.
(* Goal: @sig (Choice.sort T) (fun x : Choice.sort T => is_true (@eq_op vT (lhs x) (rhs x))) *)
by apply: sigW; have [x /eqP Ex] := exP; exists x.
Qed.
Lemma sig2_eqW (vT : eqType) (P : pred T) (lhs rhs : T -> vT) :
(exists2 x, P x & lhs x = rhs x) -> {x | P x & lhs x = rhs x}.
Proof.
(* Goal: forall _ : @ex2 (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) (fun x : Choice.sort T => @eq (Equality.sort vT) (lhs x) (rhs x)), @sig2 (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) (fun x : Choice.sort T => @eq (Equality.sort vT) (lhs x) (rhs x)) *)
move=> exP; suffices [x Px /eqP Ex]: {x | P x & lhs x == rhs x} by exists x.
(* Goal: @sig2 (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) (fun x : Choice.sort T => is_true (@eq_op vT (lhs x) (rhs x))) *)
by apply: sig2W; have [x Px /eqP Ex] := exP; exists x.
Qed.
Definition choose P x0 :=
if insub x0 : {? x | P x} is Some (exist x Px) then
xchoose (ex_intro [eta P] x Px)
else x0.
Lemma chooseP P x0 : P x0 -> P (choose P x0).
Proof.
(* Goal: forall _ : is_true (P x0), is_true (P (choose P x0)) *)
by move=> Px0; rewrite /choose insubT xchooseP.
Qed.
Lemma choose_id P x0 y0 : P x0 -> P y0 -> choose P x0 = choose P y0.
Proof.
(* Goal: forall (_ : is_true (P x0)) (_ : is_true (P y0)), @eq (Choice.sort T) (choose P x0) (choose P y0) *)
by move=> Px0 Py0; rewrite /choose !insubT /=; apply: eq_xchoose.
Qed.
Lemma eq_choose P Q : P =1 Q -> choose P =1 choose Q.
Proof.
(* Goal: forall _ : @eqfun bool (Choice.sort T) P Q, @eqfun (Choice.sort T) (Choice.sort T) (choose P) (choose Q) *)
rewrite /choose => eqPQ x0.
(* Goal: @eq (Choice.sort T) match @insub (Choice.sort T) (fun x : Choice.sort T => P x) (@sig_subType (Choice.sort T) P) x0 with | Some (@exist _ _ x Px as s) => @xchoose P (@ex_intro (Choice.sort T) (fun x0 : Choice.sort T => is_true (P x0)) x Px) | None => x0 end match @insub (Choice.sort T) (fun x : Choice.sort T => Q x) (@sig_subType (Choice.sort T) Q) x0 with | Some (@exist _ _ x Px as s) => @xchoose Q (@ex_intro (Choice.sort T) (fun x0 : Choice.sort T => is_true (Q x0)) x Px) | None => x0 end *)
do [case: insubP; rewrite eqPQ] => [[x Px] Qx0 _| ?]; last by rewrite insubN.
(* Goal: @eq (Choice.sort T) (@xchoose P (@ex_intro (Choice.sort T) (fun x : Choice.sort T => is_true (P x)) x Px)) match @insub (Choice.sort T) (fun x : Choice.sort T => Q x) (@sig_subType (Choice.sort T) Q) x0 with | Some (@exist _ _ x Px as s) => @xchoose Q (@ex_intro (Choice.sort T) (fun x0 : Choice.sort T => is_true (Q x0)) x Px) | None => x0 end *)
by rewrite insubT; apply: eq_xchoose.
Qed.
Section CanChoice.
Variables (sT : Type) (f : sT -> T).
Lemma PcanChoiceMixin f' : pcancel f f' -> choiceMixin sT.
Proof.
(* Goal: forall _ : @pcancel (Choice.sort T) sT f f', Choice.mixin_of sT *)
move=> fK; pose liftP sP := [pred x | oapp sP false (f' x)].
(* Goal: Choice.mixin_of sT *)
pose sf sP := [fun n => obind f' (find (liftP sP) n)].
(* Goal: Choice.mixin_of sT *)
exists sf => [sP n x | sP [y sPy] | sP sQ eqPQ n] /=.
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome sT (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)))) *)
(* Goal: forall _ : @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Some sT x), is_true (sP x) *)
-
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome sT (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)))) *)
(* Goal: forall _ : @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Some sT x), is_true (sP x) *)
by case Df: (find _ n) => //= [?] Dx; have:= correct Df; rewrite /= Dx.
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome sT (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)))) *)
-
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome sT (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)))) *)
have [|n Pn] := @complete T (liftP sP); first by exists (f y); rewrite /= fK.
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome sT (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)))) *)
exists n; case Df: (find _ n) Pn => //= [x] _.
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
(* Goal: is_true (@isSome sT (f' x)) *)
by have:= correct Df => /=; case: (f' x).
(* Goal: @eq (option sT) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sP)) n)) (@Option.bind (Choice.sort T) sT f' (@find T (@pred_of_simpl (Choice.sort T) (liftP sQ)) n)) *)
by congr (obind _ _); apply: extensional => x /=; case: (f' x) => /=.
Qed.
Definition CanChoiceMixin f' (fK : cancel f f') :=
PcanChoiceMixin (can_pcan fK).
End CanChoice.
Section SubChoice.
Variables (P : pred T) (sT : subType P).
Definition sub_choiceMixin := PcanChoiceMixin (@valK T P sT).
Definition sub_choiceClass := @Choice.Class sT (sub_eqMixin sT) sub_choiceMixin.
Canonical sub_choiceType := Choice.Pack sub_choiceClass.
End SubChoice.
Fact seq_choiceMixin : choiceMixin (seq T).
Proof.
(* Goal: Choice.mixin_of (list (Choice.sort T)) *)
pose r f := [fun xs => fun x : T => f (x :: xs) : option (seq T)].
(* Goal: Choice.mixin_of (list (Choice.sort T)) *)
pose fix f sP ns xs {struct ns} := if ns is n :: ns1 then let fr := r (f sP ns1) xs in obind fr (find fr n) else if sP xs then Some xs else None.
(* Goal: Choice.mixin_of (list (Choice.sort T)) *)
exists (fun sP nn => f sP (dc nn) nil) => [sP n ys | sP [ys] | sP sQ eqPQ n].
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP ys), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) (@nil (Choice.sort T))))) *)
(* Goal: forall _ : @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (@Some (list (Choice.sort T)) ys), is_true (sP ys) *)
-
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP ys), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) (@nil (Choice.sort T))))) *)
(* Goal: forall _ : @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (@Some (list (Choice.sort T)) ys), is_true (sP ys) *)
elim: {n}(dc n) nil => [|n ns IHs] xs /=; first by case: ifP => // sPxs [<-].
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP ys), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) (@nil (Choice.sort T))))) *)
(* Goal: forall _ : @eq (option (list (Choice.sort T))) (@Option.bind (Choice.sort T) (list (Choice.sort T)) (fun x : Choice.sort T => f sP ns (@cons (Choice.sort T) x xs)) (@find T (fun x : Choice.sort T => @isSome (list (Choice.sort T)) (f sP ns (@cons (Choice.sort T) x xs))) n)) (@Some (list (Choice.sort T)) ys), is_true (sP ys) *)
by case: (find _ n) => //= [x]; apply: IHs.
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP ys), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) (@nil (Choice.sort T))))) *)
-
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP ys), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) (@nil (Choice.sort T))))) *)
rewrite -(cats0 ys); elim/last_ind: ys nil => [|ys y IHs] xs /=.
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP (@cat (Choice.sort T) (@rcons (Choice.sort T) ys y) xs)), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) xs))) *)
(* Goal: forall _ : is_true (sP xs), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) xs))) *)
by move=> sPxs; exists 0; rewrite /= sPxs.
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (sP (@cat (Choice.sort T) (@rcons (Choice.sort T) ys y) xs)), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) xs))) *)
rewrite cat_rcons => /IHs[n1 sPn1] {IHs}.
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) xs))) *)
have /complete[n]: exists z, f sP (dc n1) (z :: xs) by exists y.
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: forall _ : is_true (@isSome (Choice.sort T) (@find T (fun z : Choice.sort T => @isSome (list (Choice.sort T)) (f sP (decode n1) (@cons (Choice.sort T) z xs))) n)), @ex nat (fun n : nat => is_true (@isSome (list (Choice.sort T)) (f sP (decode n) xs))) *)
case Df: (find _ n)=> // [x] _; exists (code (n :: dc n1)).
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
(* Goal: is_true (@isSome (list (Choice.sort T)) (f sP (decode (code (@cons nat n (decode n1)))) xs)) *)
by rewrite codeK /= Df /= (correct Df).
(* Goal: @eq (option (list (Choice.sort T))) (f sP (decode n) (@nil (Choice.sort T))) (f sQ (decode n) (@nil (Choice.sort T))) *)
elim: {n}(dc n) nil => [|n ns IHs] xs /=; first by rewrite eqPQ.
(* Goal: @eq (option (list (Choice.sort T))) (@Option.bind (Choice.sort T) (list (Choice.sort T)) (fun x : Choice.sort T => f sP ns (@cons (Choice.sort T) x xs)) (@find T (fun x : Choice.sort T => @isSome (list (Choice.sort T)) (f sP ns (@cons (Choice.sort T) x xs))) n)) (@Option.bind (Choice.sort T) (list (Choice.sort T)) (fun x : Choice.sort T => f sQ ns (@cons (Choice.sort T) x xs)) (@find T (fun x : Choice.sort T => @isSome (list (Choice.sort T)) (f sQ ns (@cons (Choice.sort T) x xs))) n)) *)
rewrite (@extensional _ _ (r (f sQ ns) xs)) => [|x]; last by rewrite IHs.
(* Goal: @eq (option (list (Choice.sort T))) (@Option.bind (Choice.sort T) (list (Choice.sort T)) (fun x : Choice.sort T => f sP ns (@cons (Choice.sort T) x xs)) (@find T (fun x : Choice.sort T => @isSome (list (Choice.sort T)) (@fun_of_simpl (list (Choice.sort T)) (forall _ : Choice.sort T, option (list (Choice.sort T))) (r (f sQ ns)) xs x)) n)) (@Option.bind (Choice.sort T) (list (Choice.sort T)) (fun x : Choice.sort T => f sQ ns (@cons (Choice.sort T) x xs)) (@find T (fun x : Choice.sort T => @isSome (list (Choice.sort T)) (f sQ ns (@cons (Choice.sort T) x xs))) n)) *)
by case: find => /=.
Qed.
Canonical seq_choiceType := Eval hnf in ChoiceType (seq T) seq_choiceMixin.
End OneType.
Section TagChoice.
Variables (I : choiceType) (T_ : I -> choiceType).
Fact tagged_choiceMixin : choiceMixin {i : I & T_ i}.
Proof.
(* Goal: Choice.mixin_of (@sigT (Choice.sort I) (fun i : Choice.sort I => Choice.sort (T_ i))) *)
pose mkT i (x : T_ i) := Tagged T_ x.
(* Goal: Choice.mixin_of (@sigT (Choice.sort I) (fun i : Choice.sort I => Choice.sort (T_ i))) *)
pose ft tP n i := omap (mkT i) (find (tP \o mkT i) n).
(* Goal: Choice.mixin_of (@sigT (Choice.sort I) (fun i : Choice.sort I => Choice.sort (T_ i))) *)
pose fi tP ni nt := obind (ft tP nt) (find (ft tP nt) ni).
(* Goal: Choice.mixin_of (@sigT (Choice.sort I) (fun i : Choice.sort I => Choice.sort (T_ i))) *)
pose f tP n := if dc n is [:: ni; nt] then fi tP ni nt else None.
(* Goal: Choice.mixin_of (@sigT (Choice.sort I) (fun i : Choice.sort I => Choice.sort (T_ i))) *)
exists f => [tP n u | tP [[i x] tPxi] | sP sQ eqPQ n].
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
(* Goal: forall _ : @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f tP n) (@Some (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) u), is_true (tP u) *)
-
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
(* Goal: forall _ : @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f tP n) (@Some (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) u), is_true (tP u) *)
rewrite /f /fi; case: (dc n) => [|ni [|nt []]] //=.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
(* Goal: forall _ : @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (@Option.bind (Choice.sort I) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft tP nt) (@find I (fun i : Choice.sort I => @isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft tP nt i)) ni)) (@Some (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) u), is_true (tP u) *)
case: (find _ _) => //= [i]; rewrite /ft.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
(* Goal: forall _ : @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (@Option.map (Choice.sort (T_ i)) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (mkT i) (@find (T_ i) (@funcomp bool (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (Choice.sort (T_ i)) tt tP (mkT i)) nt)) (@Some (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) u), is_true (tP u) *)
by case Df: (find _ _) => //= [x] [<-]; have:= correct Df.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
-
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
have /complete[nt tPnt]: exists y, (tP \o mkT i) y by exists x.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (f tP n))) *)
have{tPnt}: exists j, ft tP nt j by exists i; rewrite /ft; case: find tPnt.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: forall _ : @ex (Choice.sort I) (fun j : Choice.sort I => is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft tP nt j))), @ex nat (fun n : nat => is_true (@isSome (@sigT (Choice.sort I) (fun x0 : Choice.sort I => Choice.sort (T_ x0))) (f tP n))) *)
case/complete=> ni tPn; exists (code [:: ni; nt]); rewrite /f codeK /fi.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
(* Goal: is_true (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (@Option.bind (Choice.sort I) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft tP nt) (@find I (fun i : Choice.sort I => @isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft tP nt i)) ni))) *)
by case Df: find tPn => //= [j] _; have:= correct Df.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (f sP n) (f sQ n) *)
rewrite /f /fi; case: (dc n) => [|ni [|nt []]] //=.
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (@Option.bind (Choice.sort I) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sP nt) (@find I (fun i : Choice.sort I => @isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sP nt i)) ni)) (@Option.bind (Choice.sort I) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt) (@find I (fun i : Choice.sort I => @isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt i)) ni)) *)
rewrite (@extensional _ _ (ft sQ nt)) => [|i].
(* Goal: @eq bool (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sP nt i)) (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt i)) *)
(* Goal: @eq (option (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x)))) (@Option.bind (Choice.sort I) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sP nt) (@find I (fun i : Choice.sort I => @isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt i)) ni)) (@Option.bind (Choice.sort I) (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt) (@find I (fun i : Choice.sort I => @isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt i)) ni)) *)
by case: find => //= i; congr (omap _ _); apply: extensional => x /=.
(* Goal: @eq bool (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sP nt i)) (@isSome (@sigT (Choice.sort I) (fun x : Choice.sort I => Choice.sort (T_ x))) (ft sQ nt i)) *)
by congr (omap _ _); apply: extensional => x /=.
Qed.
Canonical tagged_choiceType :=
Eval hnf in ChoiceType {i : I & T_ i} tagged_choiceMixin.
End TagChoice.
Fact nat_choiceMixin : choiceMixin nat.
Proof.
(* Goal: Choice.mixin_of nat *)
pose f := [fun (P : pred nat) n => if P n then Some n else None].
(* Goal: Choice.mixin_of nat *)
exists f => [P n m | P [n Pn] | P Q eqPQ n] /=; last by rewrite eqPQ.
(* Goal: @ex nat (fun n : nat => is_true (@isSome nat (if P n then @Some nat n else @None nat))) *)
(* Goal: forall _ : @eq (option nat) (if P n then @Some nat n else @None nat) (@Some nat m), is_true (P m) *)
by case: ifP => // Pn [<-].
(* Goal: @ex nat (fun n : nat => is_true (@isSome nat (if P n then @Some nat n else @None nat))) *)
by exists n; rewrite Pn.
Qed.
Canonical nat_choiceType := Eval hnf in ChoiceType nat nat_choiceMixin.
Definition bool_choiceMixin := CanChoiceMixin oddb.
Canonical bool_choiceType := Eval hnf in ChoiceType bool bool_choiceMixin.
Canonical bitseq_choiceType := Eval hnf in [choiceType of bitseq].
Definition unit_choiceMixin := CanChoiceMixin bool_of_unitK.
Canonical unit_choiceType := Eval hnf in ChoiceType unit unit_choiceMixin.
Definition option_choiceMixin T := CanChoiceMixin (@seq_of_optK T).
Canonical option_choiceType T :=
Eval hnf in ChoiceType (option T) (option_choiceMixin T).
Definition sig_choiceMixin T (P : pred T) : choiceMixin {x | P x} :=
sub_choiceMixin _.
Canonical sig_choiceType T (P : pred T) :=
Eval hnf in ChoiceType {x | P x} (sig_choiceMixin P).
Definition prod_choiceMixin T1 T2 := CanChoiceMixin (@tag_of_pairK T1 T2).
Canonical prod_choiceType T1 T2 :=
Eval hnf in ChoiceType (T1 * T2) (prod_choiceMixin T1 T2).
Definition sum_choiceMixin T1 T2 := PcanChoiceMixin (@opair_of_sumK T1 T2).
Canonical sum_choiceType T1 T2 :=
Eval hnf in ChoiceType (T1 + T2) (sum_choiceMixin T1 T2).
Definition tree_choiceMixin T := PcanChoiceMixin (GenTree.codeK T).
Canonical tree_choiceType T := ChoiceType (GenTree.tree T) (tree_choiceMixin T).
End ChoiceTheory.
Prenex Implicits xchoose choose.
Notation "[ 'choiceMixin' 'of' T 'by' <: ]" :=
(sub_choiceMixin _ : choiceMixin T)
(at level 0, format "[ 'choiceMixin' 'of' T 'by' <: ]") : form_scope.
Module Countable.
Record mixin_of (T : Type) : Type := Mixin {
pickle : T -> nat;
unpickle : nat -> option T;
pickleK : pcancel pickle unpickle
}.
Definition EqMixin T m := PcanEqMixin (@pickleK T m).
Definition ChoiceMixin T m := PcanChoiceMixin (@pickleK T m).
Section ClassDef.
Record class_of T := Class { base : Choice.class_of T; mixin : mixin_of T }.
Local Coercion base : class_of >-> Choice.class_of.
Structure type : Type := Pack {sort : Type; _ : class_of sort}.
Local Coercion sort : type >-> Sortclass.
Variables (T : Type) (cT : type).
Definition class := let: Pack _ c as cT' := cT return class_of cT' in c.
Definition clone c of phant_id class c := @Pack T c.
Let xT := let: Pack T _ := cT in T.
Notation xclass := (class : class_of xT).
Definition pack m :=
fun bT b & phant_id (Choice.class bT) b => Pack (@Class T b m).
Definition eqType := @Equality.Pack cT xclass.
Definition choiceType := @Choice.Pack cT xclass.
End ClassDef.
Module Exports.
Coercion base : class_of >-> Choice.class_of.
Coercion mixin : class_of >-> mixin_of.
Coercion sort : type >-> Sortclass.
Coercion eqType : type >-> Equality.type.
Canonical eqType.
Coercion choiceType : type >-> Choice.type.
Canonical choiceType.
Notation countType := type.
Notation CountType T m := (@pack T m _ _ id).
Notation CountMixin := Mixin.
Notation CountChoiceMixin := ChoiceMixin.
Notation "[ 'countType' 'of' T 'for' cT ]" := (@clone T cT _ idfun)
(at level 0, format "[ 'countType' 'of' T 'for' cT ]") : form_scope.
Notation "[ 'countType' 'of' T ]" := (@clone T _ _ id)
(at level 0, format "[ 'countType' 'of' T ]") : form_scope.
End Exports.
End Countable.
Export Countable.Exports.
Definition unpickle T := Countable.unpickle (Countable.class T).
Definition pickle T := Countable.pickle (Countable.class T).
Arguments unpickle {T} n.
Arguments pickle {T} x.
Section CountableTheory.
Variable T : countType.
Lemma pickleK : @pcancel nat T pickle unpickle.
Proof.
(* Goal: @pcancel nat (Countable.sort T) (@pickle T) (@unpickle T) *)
exact: Countable.pickleK.
Qed.
Definition pickle_inv n :=
obind (fun x : T => if pickle x == n then Some x else None) (unpickle n).
Lemma pickle_invK : ocancel pickle_inv pickle.
Proof.
(* Goal: @ocancel (Countable.sort T) (Equality.sort nat_eqType) pickle_inv (@pickle T) *)
by rewrite /pickle_inv => n; case def_x: (unpickle n) => //= [x]; case: eqP.
Qed.
Lemma pickleK_inv : pcancel pickle pickle_inv.
Proof.
(* Goal: @pcancel nat (Countable.sort T) (@pickle T) pickle_inv *)
by rewrite /pickle_inv => x; rewrite pickleK /= eqxx.
Qed.
Lemma pcan_pickleK sT f f' :
@pcancel T sT f f' -> pcancel (pickle \o f) (pcomp f' unpickle).
Proof.
(* Goal: forall _ : @pcancel (Countable.sort T) sT f f', @pcancel nat sT (@funcomp nat (Countable.sort T) sT tt (@pickle T) f) (@pcomp sT (Countable.sort T) nat f' (@unpickle T)) *)
by move=> fK x; rewrite /pcomp pickleK /= fK.
Qed.
Definition PcanCountMixin sT f f' (fK : pcancel f f') :=
@CountMixin sT _ _ (pcan_pickleK fK).
Definition CanCountMixin sT f f' (fK : cancel f f') :=
@PcanCountMixin sT _ _ (can_pcan fK).
Definition sub_countMixin P sT := PcanCountMixin (@valK T P sT).
Definition pickle_seq s := CodeSeq.code (map (@pickle T) s).
Definition unpickle_seq n := Some (pmap (@unpickle T) (CodeSeq.decode n)).
Lemma pickle_seqK : pcancel pickle_seq unpickle_seq.
Proof.
(* Goal: @pcancel nat (list (Countable.sort T)) pickle_seq unpickle_seq *)
by move=> s; rewrite /unpickle_seq CodeSeq.codeK (map_pK pickleK).
Qed.
Definition seq_countMixin := CountMixin pickle_seqK.
Canonical seq_countType := Eval hnf in CountType (seq T) seq_countMixin.
End CountableTheory.
Notation "[ 'countMixin' 'of' T 'by' <: ]" :=
(sub_countMixin _ : Countable.mixin_of T)
(at level 0, format "[ 'countMixin' 'of' T 'by' <: ]") : form_scope.
Arguments pickle_inv {T} n.
Arguments pickleK {T} x.
Arguments pickleK_inv {T} x.
Arguments pickle_invK {T} n : rename.
Section SubCountType.
Variables (T : choiceType) (P : pred T).
Import Countable.
Structure subCountType : Type :=
SubCountType {subCount_sort :> subType P; _ : mixin_of subCount_sort}.
Coercion sub_countType (sT : subCountType) :=
Eval hnf in pack (let: SubCountType _ m := sT return mixin_of sT in m) id.
Canonical sub_countType.
Definition pack_subCountType U :=
fun sT cT & sub_sort sT * sort cT -> U * U =>
fun b m & phant_id (Class b m) (class cT) => @SubCountType sT m.
End SubCountType.
Notation "[ 'subCountType' 'of' T ]" :=
(@pack_subCountType _ _ T _ _ id _ _ id)
(at level 0, format "[ 'subCountType' 'of' T ]") : form_scope.
Section TagCountType.
Variables (I : countType) (T_ : I -> countType).
Definition pickle_tagged (u : {i : I & T_ i}) :=
CodeSeq.code [:: pickle (tag u); pickle (tagged u)].
Definition unpickle_tagged s :=
if CodeSeq.decode s is [:: ni; nx] then
obind (fun i => omap (@Tagged I i T_) (unpickle nx)) (unpickle ni)
else None.
Lemma pickle_taggedK : pcancel pickle_tagged unpickle_tagged.
Proof.
(* Goal: @pcancel nat (@sigT (Countable.sort I) (fun i : Countable.sort I => Countable.sort (T_ i))) pickle_tagged unpickle_tagged *)
by case=> i x; rewrite /unpickle_tagged CodeSeq.codeK /= pickleK /= pickleK.
Qed.
Definition tag_countMixin := CountMixin pickle_taggedK.
Definition nat_countMixin := CountMixin nat_pickleK.
Canonical nat_countType := Eval hnf in CountType nat nat_countMixin.
Definition bool_countMixin := CanCountMixin oddb.
Canonical bool_countType := Eval hnf in CountType bool bool_countMixin.
Canonical bitseq_countType := Eval hnf in [countType of bitseq].
Definition unit_countMixin := CanCountMixin bool_of_unitK.
Canonical unit_countType := Eval hnf in CountType unit unit_countMixin.
Definition option_countMixin T := CanCountMixin (@seq_of_optK T).
Canonical option_countType T :=
Eval hnf in CountType (option T) (option_countMixin T).
Definition sig_countMixin T (P : pred T) := [countMixin of {x | P x} by <:].
Canonical sig_countType T (P : pred T) :=
Eval hnf in CountType {x | P x} (sig_countMixin P).
Canonical sig_subCountType T (P : pred T) :=
Eval hnf in [subCountType of {x | P x}].
Definition prod_countMixin T1 T2 := CanCountMixin (@tag_of_pairK T1 T2).
Canonical prod_countType T1 T2 :=
Eval hnf in CountType (T1 * T2) (prod_countMixin T1 T2).
Definition sum_countMixin T1 T2 := PcanCountMixin (@opair_of_sumK T1 T2).
Canonical sum_countType T1 T2 :=
Eval hnf in CountType (T1 + T2) (sum_countMixin T1 T2).
Definition tree_countMixin T := PcanCountMixin (GenTree.codeK T).
Canonical tree_countType T := CountType (GenTree.tree T) (tree_countMixin T).
End CountableDataTypes.
|
Require Import String.
Require Import Ascii.
Require Import Arith.
Require Import OrderedType.
Require Import OrderedTypeEx.
Require Import StructTact.StructTactics.
Inductive lex_lt: string -> string -> Prop :=
| lex_lt_lt : forall (c1 c2 : ascii) (s1 s2 : string),
nat_of_ascii c1 < nat_of_ascii c2 ->
lex_lt (String c1 s1) (String c2 s2)
| lex_lt_eq : forall (c : ascii) (s1 s2 : string),
lex_lt s1 s2 ->
lex_lt (String c s1) (String c s2)
| lex_lt_empty : forall (c : ascii) (s : string),
lex_lt EmptyString (String c s).
Inductive lex_order : string -> string -> Prop :=
| lex_order_empty :
lex_order EmptyString EmptyString
| lex_order_char_lt :
forall (c1 c2: ascii) (s1 s2: string),
nat_of_ascii c1 < nat_of_ascii c2 ->
lex_order (String c1 s1) (String c2 s2)
| lex_order_char_eq :
forall (c: ascii) (s1 s2: string),
lex_order s1 s2 ->
lex_order (String c s1) (String c s2)
| lex_order_empty_string :
forall s, lex_order EmptyString s.
Definition lex_le (s1 s2 : string) : Prop := lex_lt s1 s2 \/ s1 = s2.
Lemma lex_le_in_lex_order : forall (s1 s2 : string),
lex_order s1 s2 -> lex_le s1 s2.
Proof.
(* Goal: forall (s1 s2 : string) (_ : lex_order s1 s2), lex_le s1 s2 *)
intros s1 s2 H.
(* Goal: lex_le s1 s2 *)
induction H.
(* Goal: lex_le EmptyString s *)
(* Goal: lex_le (String c s1) (String c s2) *)
(* Goal: lex_le (String c1 s1) (String c2 s2) *)
(* Goal: lex_le EmptyString EmptyString *)
-
(* Goal: lex_le EmptyString EmptyString *)
right.
(* Goal: @eq string EmptyString EmptyString *)
reflexivity.
(* BG Goal: lex_le EmptyString s *)
(* BG Goal: lex_le (String c s1) (String c s2) *)
(* BG Goal: lex_le (String c1 s1) (String c2 s2) *)
-
(* Goal: lex_le (String c1 s1) (String c2 s2) *)
left.
(* Goal: lex_lt (String c1 s1) (String c2 s2) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii c1) (nat_of_ascii c2) *)
assumption.
(* BG Goal: lex_le EmptyString s *)
(* BG Goal: lex_le (String c s1) (String c s2) *)
-
(* Goal: lex_le (String c s1) (String c s2) *)
case IHlex_order; intro H_le.
(* Goal: lex_le (String c s1) (String c s2) *)
(* Goal: lex_le (String c s1) (String c s2) *)
*
(* Goal: lex_le (String c s1) (String c s2) *)
left.
(* Goal: lex_lt (String c s1) (String c s2) *)
apply lex_lt_eq.
(* Goal: lex_lt s1 s2 *)
assumption.
(* BG Goal: lex_le EmptyString s *)
(* BG Goal: lex_le (String c s1) (String c s2) *)
*
(* Goal: lex_le (String c s1) (String c s2) *)
rewrite H_le.
(* Goal: lex_le (String c s2) (String c s2) *)
right.
(* Goal: @eq string (String c s2) (String c s2) *)
reflexivity.
(* BG Goal: lex_le EmptyString s *)
-
(* Goal: lex_le EmptyString s *)
case s.
(* Goal: forall (a : ascii) (s : string), lex_le EmptyString (String a s) *)
(* Goal: lex_le EmptyString EmptyString *)
*
(* Goal: lex_le EmptyString EmptyString *)
right.
(* Goal: @eq string EmptyString EmptyString *)
reflexivity.
(* BG Goal: forall (a : ascii) (s : string), lex_le EmptyString (String a s) *)
*
(* Goal: forall (a : ascii) (s : string), lex_le EmptyString (String a s) *)
intros c s0.
(* Goal: lex_le EmptyString (String c s0) *)
left.
(* Goal: lex_lt EmptyString (String c s0) *)
apply lex_lt_empty.
Qed.
Lemma lex_order_refl : forall (s : string), lex_order s s.
Proof.
(* Goal: forall s : string, lex_order s s *)
induction s.
(* Goal: lex_order (String a s) (String a s) *)
(* Goal: lex_order EmptyString EmptyString *)
*
(* Goal: lex_order EmptyString EmptyString *)
apply lex_order_empty_string.
(* BG Goal: lex_order (String a s) (String a s) *)
*
(* Goal: lex_order (String a s) (String a s) *)
intros.
(* Goal: lex_order (String a s) (String a s) *)
apply lex_order_char_eq.
(* Goal: lex_order s s *)
assumption.
Qed.
Lemma lex_order_lex_le : forall (s1 s2 : string),
lex_le s1 s2 -> lex_order s1 s2.
Proof.
(* Goal: forall (s1 s2 : string) (_ : lex_le s1 s2), lex_order s1 s2 *)
intros s1 s2 H_le.
(* Goal: lex_order s1 s2 *)
case H_le; intro H_le'.
(* Goal: lex_order s1 s2 *)
(* Goal: lex_order s1 s2 *)
-
(* Goal: lex_order s1 s2 *)
induction H_le'.
(* Goal: lex_order EmptyString (String c s) *)
(* Goal: lex_order (String c s1) (String c s2) *)
(* Goal: lex_order (String c1 s1) (String c2 s2) *)
*
(* Goal: lex_order (String c1 s1) (String c2 s2) *)
apply lex_order_char_lt.
(* Goal: lt (nat_of_ascii c1) (nat_of_ascii c2) *)
assumption.
(* BG Goal: lex_order s1 s2 *)
(* BG Goal: lex_order EmptyString (String c s) *)
(* BG Goal: lex_order (String c s1) (String c s2) *)
*
(* Goal: lex_order (String c s1) (String c s2) *)
apply lex_order_char_eq.
(* Goal: lex_order s1 s2 *)
apply IHH_le'.
(* Goal: lex_le s1 s2 *)
left.
(* Goal: lex_lt s1 s2 *)
assumption.
(* BG Goal: lex_order s1 s2 *)
(* BG Goal: lex_order EmptyString (String c s) *)
*
(* Goal: lex_order EmptyString (String c s) *)
apply lex_order_empty_string.
(* BG Goal: lex_order s1 s2 *)
-
(* Goal: lex_order s1 s2 *)
rewrite <- H_le'.
(* Goal: lex_order s1 s1 *)
apply lex_order_refl.
Qed.
Theorem lex_lt_trans : forall s0 s1 s2,
lex_lt s0 s1 -> lex_lt s1 s2 -> lex_lt s0 s2.
Proof.
(* Goal: forall (s0 s1 s2 : string) (_ : lex_lt s0 s1) (_ : lex_lt s1 s2), lex_lt s0 s2 *)
induction s0.
(* Goal: forall (s1 s2 : string) (_ : lex_lt (String a s0) s1) (_ : lex_lt s1 s2), lex_lt (String a s0) s2 *)
(* Goal: forall (s1 s2 : string) (_ : lex_lt EmptyString s1) (_ : lex_lt s1 s2), lex_lt EmptyString s2 *)
-
(* Goal: forall (s1 s2 : string) (_ : lex_lt EmptyString s1) (_ : lex_lt s1 s2), lex_lt EmptyString s2 *)
intros.
(* Goal: lex_lt EmptyString s2 *)
inversion H; subst.
(* Goal: lex_lt EmptyString s2 *)
inversion H0; subst.
(* Goal: lex_lt EmptyString (String c s0) *)
(* Goal: lex_lt EmptyString (String c2 s0) *)
*
(* Goal: lex_lt EmptyString (String c2 s0) *)
apply lex_lt_empty.
(* BG Goal: forall (s1 s2 : string) (_ : lex_lt (String a s0) s1) (_ : lex_lt s1 s2), lex_lt (String a s0) s2 *)
(* BG Goal: lex_lt EmptyString (String c s0) *)
*
(* Goal: lex_lt EmptyString (String c s0) *)
apply lex_lt_empty.
(* BG Goal: forall (s1 s2 : string) (_ : lex_lt (String a s0) s1) (_ : lex_lt s1 s2), lex_lt (String a s0) s2 *)
-
(* Goal: forall (s1 s2 : string) (_ : lex_lt (String a s0) s1) (_ : lex_lt s1 s2), lex_lt (String a s0) s2 *)
intros.
(* Goal: lex_lt (String a s0) s2 *)
inversion H; subst; inversion H0; subst.
(* Goal: lex_lt (String a s0) (String a s3) *)
(* Goal: lex_lt (String a s0) (String c2 s3) *)
(* Goal: lex_lt (String a s0) (String c2 s3) *)
(* Goal: lex_lt (String a s0) (String c0 s3) *)
*
(* Goal: lex_lt (String a s0) (String c0 s3) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii a) (nat_of_ascii c0) *)
eauto with arith.
(* BG Goal: lex_lt (String a s0) (String a s3) *)
(* BG Goal: lex_lt (String a s0) (String c2 s3) *)
(* BG Goal: lex_lt (String a s0) (String c2 s3) *)
*
(* Goal: lex_lt (String a s0) (String c2 s3) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii a) (nat_of_ascii c2) *)
assumption.
(* BG Goal: lex_lt (String a s0) (String a s3) *)
(* BG Goal: lex_lt (String a s0) (String c2 s3) *)
*
(* Goal: lex_lt (String a s0) (String c2 s3) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii a) (nat_of_ascii c2) *)
assumption.
(* BG Goal: lex_lt (String a s0) (String a s3) *)
*
(* Goal: lex_lt (String a s0) (String a s3) *)
apply lex_lt_eq.
(* Goal: lex_lt s0 s3 *)
eapply IHs0; eauto.
Qed.
Theorem lex_lt_not_eq : forall s0 s1,
lex_lt s0 s1 -> s0 <> s1.
Proof.
(* Goal: forall (s0 s1 : string) (_ : lex_lt s0 s1), not (@eq string s0 s1) *)
induction s0.
(* Goal: forall (s1 : string) (_ : lex_lt (String a s0) s1), not (@eq string (String a s0) s1) *)
(* Goal: forall (s1 : string) (_ : lex_lt EmptyString s1), not (@eq string EmptyString s1) *)
-
(* Goal: forall (s1 : string) (_ : lex_lt EmptyString s1), not (@eq string EmptyString s1) *)
intros.
(* Goal: not (@eq string EmptyString s1) *)
inversion H; subst.
(* Goal: not (@eq string EmptyString (String c s)) *)
congruence.
(* BG Goal: forall (s1 : string) (_ : lex_lt (String a s0) s1), not (@eq string (String a s0) s1) *)
-
(* Goal: forall (s1 : string) (_ : lex_lt (String a s0) s1), not (@eq string (String a s0) s1) *)
intros.
(* Goal: not (@eq string (String a s0) s1) *)
inversion H; subst.
(* Goal: not (@eq string (String a s0) (String a s3)) *)
(* Goal: not (@eq string (String a s0) (String c2 s3)) *)
*
(* Goal: not (@eq string (String a s0) (String c2 s3)) *)
intro H_eq.
(* Goal: False *)
find_injection.
(* Goal: False *)
contradict H3.
(* Goal: not (lt (nat_of_ascii c2) (nat_of_ascii c2)) *)
auto with arith.
(* BG Goal: not (@eq string (String a s0) (String a s3)) *)
*
(* Goal: not (@eq string (String a s0) (String a s3)) *)
intro H_eq.
(* Goal: False *)
find_injection.
(* Goal: False *)
specialize (IHs0 s3).
(* Goal: False *)
concludes.
(* Goal: False *)
auto.
Qed.
Lemma nat_of_ascii_injective:
forall c1 c2, nat_of_ascii c1 = nat_of_ascii c2 -> c1 = c2.
Proof.
(* Goal: forall (c1 c2 : ascii) (_ : @eq nat (nat_of_ascii c1) (nat_of_ascii c2)), @eq ascii c1 c2 *)
intros; simpl.
(* Goal: @eq ascii c1 c2 *)
assert (ascii_of_nat (nat_of_ascii c1) = ascii_of_nat (nat_of_ascii c2)) as Hinvol.
(* Goal: @eq ascii c1 c2 *)
(* Goal: @eq ascii (ascii_of_nat (nat_of_ascii c1)) (ascii_of_nat (nat_of_ascii c2)) *)
auto.
(* Goal: @eq ascii c1 c2 *)
repeat rewrite ascii_nat_embedding in Hinvol.
(* Goal: @eq ascii c1 c2 *)
trivial.
Qed.
Fixpoint string_compare_lex_compat (s0 s1 : string) : Compare lex_lt eq s0 s1.
Proof.
(* Goal: @Compare string lex_lt (@eq string) s0 s1 *)
refine (match s0 as ss0, s1 as ss1 return (_ = ss0 -> _ = ss1 -> _) with | EmptyString, EmptyString => fun H_eq H_eq' => EQ _ | EmptyString, String c' s'1 => fun H_eq H_eq' => LT _ | String c s'0, EmptyString => fun H_eq H_eq' => GT _ | String c s'0, String c' s'1 => fun H_eq H_eq' => match Nat.compare (nat_of_ascii c) (nat_of_ascii c') as cmp return (_ = cmp -> _) with | Lt => fun H_eq_cmp => LT _ | Eq => fun H_eq_cmp => match string_compare_lex_compat s'0 s'1 with | LT H_lt => LT _ | EQ H_eq_lex => EQ _ | GT H_gt => GT _ end | Gt => fun H_eq_cmp => GT _ end (refl_equal _) end (refl_equal _) (refl_equal _)); try (rewrite H_eq; rewrite H_eq'); auto.
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
(* Goal: @eq string (String c s'0) (String c' s'1) *)
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
(* Goal: lex_lt EmptyString (String c s'0) *)
(* Goal: lex_lt EmptyString (String c' s'1) *)
-
(* Goal: lex_lt EmptyString (String c' s'1) *)
apply lex_lt_empty.
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: @eq string (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt EmptyString (String c s'0) *)
-
(* Goal: lex_lt EmptyString (String c s'0) *)
apply lex_lt_empty.
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: @eq string (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
-
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
apply nat_compare_eq in H_eq_cmp.
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
apply nat_of_ascii_injective in H_eq_cmp.
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
rewrite H_eq_cmp.
(* Goal: lex_lt (String c' s'0) (String c' s'1) *)
apply lex_lt_eq.
(* Goal: lex_lt s'0 s'1 *)
assumption.
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: @eq string (String c s'0) (String c' s'1) *)
-
(* Goal: @eq string (String c s'0) (String c' s'1) *)
apply nat_compare_eq in H_eq_cmp.
(* Goal: @eq string (String c s'0) (String c' s'1) *)
apply nat_of_ascii_injective in H_eq_cmp.
(* Goal: @eq string (String c s'0) (String c' s'1) *)
subst.
(* Goal: @eq string (String c' s'1) (String c' s'1) *)
reflexivity.
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
-
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
apply nat_compare_eq in H_eq_cmp.
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
apply nat_of_ascii_injective in H_eq_cmp.
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
rewrite H_eq_cmp.
(* Goal: lex_lt (String c' s'1) (String c' s'0) *)
apply lex_lt_eq.
(* Goal: lex_lt s'1 s'0 *)
assumption.
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
(* BG Goal: lex_lt (String c s'0) (String c' s'1) *)
-
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
apply nat_compare_lt in H_eq_cmp.
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii c) (nat_of_ascii c') *)
assumption.
(* BG Goal: lex_lt (String c' s'1) (String c s'0) *)
-
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
apply nat_compare_gt in H_eq_cmp.
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii c') (nat_of_ascii c) *)
auto with arith.
Qed.
Module string_lex_as_OT_compat <: UsualOrderedType.
Definition t := string.
Definition eq := @eq string.
Definition lt := lex_lt.
Definition eq_refl := @eq_refl string.
Definition eq_sym := @eq_sym string.
Definition eq_trans := @eq_trans string.
Definition lt_trans := lex_lt_trans.
Definition lt_not_eq := lex_lt_not_eq.
Definition compare := string_compare_lex_compat.
Definition eq_dec := string_dec.
End string_lex_as_OT_compat.
Require Import Orders.
Lemma lex_lt_irrefl : Irreflexive lex_lt.
Proof.
(* Goal: @Irreflexive string lex_lt *)
intros s0 H_lt.
(* Goal: False *)
apply lex_lt_not_eq in H_lt.
(* Goal: False *)
auto.
Qed.
Theorem lex_lt_strorder : StrictOrder lex_lt.
Proof.
(* Goal: @StrictOrder string lex_lt *)
exact (Build_StrictOrder _ lex_lt_irrefl lex_lt_trans).
Qed.
Theorem lex_lt_lt_compat : Proper (eq ==> eq ==> iff) lex_lt.
Proof.
(* Goal: @Proper (forall (_ : string) (_ : string), Prop) (@respectful string (forall _ : string, Prop) (@eq string) (@respectful string Prop (@eq string) iff)) lex_lt *)
intros s0 s1 H_eq s2 s3 H_eq'.
(* Goal: iff (lex_lt s0 s2) (lex_lt s1 s3) *)
split; intro H_imp; subst; auto.
Qed.
Fixpoint string_compare_lex (s0 s1 : string) : { cmp : comparison | CompSpec eq lex_lt s0 s1 cmp }.
Proof.
(* Goal: @sig comparison (fun cmp : comparison => @CompSpec string (@eq string) lex_lt s0 s1 cmp) *)
refine (match s0 as ss0, s1 as ss1 return (_ = ss0 -> _ = ss1 -> _) with | EmptyString, EmptyString => fun H_eq H_eq' => exist _ Eq _ | EmptyString, String c' s'1 => fun H_eq H_eq' => exist _ Lt _ | String c s'0, EmptyString => fun H_eq H_eq' => exist _ Gt _ | String c s'0, String c' s'1 => fun H_eq H_eq' => match Nat.compare (nat_of_ascii c) (nat_of_ascii c') as cmp0 return (_ = cmp0 -> _) with | Lt => fun H_eq_cmp0 => exist _ Lt _ | Eq => fun H_eq_cmp0 => match string_compare_lex s'0 s'1 with | exist _ cmp H_cmp' => match cmp as cmp1 return (cmp = cmp1 -> _) with | Lt => fun H_eq_cmp1 => exist _ Lt _ | Eq => fun H_eq_cmp1 => exist _ Eq _ | Gt => fun H_eq_cmp1 => exist _ Gt _ end (refl_equal _) end | Gt => fun H_eq_cmp0 => exist _ Gt _ end (refl_equal _) end (refl_equal _) (refl_equal _)); try (rewrite H_eq; rewrite H_eq').
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) EmptyString Gt *)
(* Goal: @CompSpec string (@eq string) lex_lt EmptyString (String c' s'1) Lt *)
(* Goal: @CompSpec string (@eq string) lex_lt EmptyString EmptyString Eq *)
-
(* Goal: @CompSpec string (@eq string) lex_lt EmptyString EmptyString Eq *)
apply CompEq; auto.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) EmptyString Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt EmptyString (String c' s'1) Lt *)
-
(* Goal: @CompSpec string (@eq string) lex_lt EmptyString (String c' s'1) Lt *)
apply CompLt.
(* Goal: lex_lt EmptyString (String c' s'1) *)
apply lex_lt_empty.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) EmptyString Gt *)
-
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) EmptyString Gt *)
apply CompGt.
(* Goal: lex_lt EmptyString (String c s'0) *)
apply lex_lt_empty.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
-
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
apply nat_compare_eq in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
apply nat_of_ascii_injective in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
rewrite H_eq_cmp1 in H_cmp'.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Eq *)
inversion H_cmp'; subst.
(* Goal: @CompSpec string (@eq string) lex_lt (String c' s'1) (String c' s'1) Eq *)
apply CompEq.
(* Goal: @eq string (String c' s'1) (String c' s'1) *)
reflexivity.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
-
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
apply nat_compare_eq in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
apply nat_of_ascii_injective in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
rewrite H_eq_cmp1 in H_cmp'.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
inversion H_cmp'.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
subst.
(* Goal: @CompSpec string (@eq string) lex_lt (String c' s'0) (String c' s'1) Lt *)
apply CompLt.
(* Goal: lex_lt (String c' s'0) (String c' s'1) *)
apply lex_lt_eq.
(* Goal: lex_lt s'0 s'1 *)
assumption.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
-
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
apply nat_compare_eq in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
apply nat_of_ascii_injective in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
rewrite H_eq_cmp1 in H_cmp'.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
subst.
(* Goal: @CompSpec string (@eq string) lex_lt (String c' s'0) (String c' s'1) Gt *)
inversion H_cmp'.
(* Goal: @CompSpec string (@eq string) lex_lt (String c' s'0) (String c' s'1) Gt *)
apply CompGt.
(* Goal: lex_lt (String c' s'1) (String c' s'0) *)
apply lex_lt_eq.
(* Goal: lex_lt s'1 s'0 *)
assumption.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
-
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
apply nat_compare_lt in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Lt *)
apply CompLt.
(* Goal: lex_lt (String c s'0) (String c' s'1) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii c) (nat_of_ascii c') *)
assumption.
(* BG Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
-
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
apply nat_compare_gt in H_eq_cmp0.
(* Goal: @CompSpec string (@eq string) lex_lt (String c s'0) (String c' s'1) Gt *)
apply CompGt.
(* Goal: lex_lt (String c' s'1) (String c s'0) *)
apply lex_lt_lt.
(* Goal: lt (nat_of_ascii c') (nat_of_ascii c) *)
auto with arith.
Qed.
Module string_lex_as_OT <: UsualOrderedType.
Definition t := string.
Definition eq := @eq string.
Definition eq_equiv := @eq_equivalence string.
Definition lt := lex_lt.
Definition lt_strorder := lex_lt_strorder.
Definition lt_compat := lex_lt_lt_compat.
Definition compare := fun x y => proj1_sig (string_compare_lex x y).
Definition compare_spec := fun x y => proj2_sig (string_compare_lex x y).
Definition eq_dec := string_dec.
End string_lex_as_OT.
|
From mathcomp
Require Import ssreflect ssrfun seq.
From LemmaOverloading
Require Import rels.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Section Permutations.
Variable A : Type.
Lemma in_split (x : A) (s : seq A) :
x \In s -> exists s1, exists s2, s = s1 ++ x :: s2.
Proof.
(* Goal: forall _ : @InMem A x (@Mem A (seq_PredType A) s), @ex (list A) (fun s1 : list A => @ex (list A) (fun s2 : list A => @eq (list A) s (@cat A s1 (@cons A x s2)))) *)
elim:s=>[|y s IH] //=; rewrite InE.
(* Goal: forall _ : or (@eq A x y) (@InMem A x (@Mem A (seq_PredType A) s)), @ex (list A) (fun s1 : list A => @ex (list A) (fun s2 : list A => @eq (list A) (@cons A y s) (@cat A s1 (@cons A x s2)))) *)
case=>[<-|]; first by exists [::]; exists s.
(* Goal: forall _ : @InMem A x (@Mem A (seq_PredType A) s), @ex (list A) (fun s1 : list A => @ex (list A) (fun s2 : list A => @eq (list A) (@cons A y s) (@cat A s1 (@cons A x s2)))) *)
by case/IH=>s1 [s2] ->; exists (y :: s1); exists s2.
Qed.
Inductive perm (s1 s2 : seq A) : Prop :=
| permutation_nil of s1 = [::] & s2 = [::]
| permutation_skip x t1 t2 of s1 = x :: t1 & s2 = x :: t2 & perm t1 t2
| permutation_swap x y t of s1 = x :: y :: t & s2 = y :: x :: t
| permutation_trans t of perm s1 t & perm t s2.
Lemma perm_nil (s : seq A) : perm [::] s <-> s = [::].
Proof.
(* Goal: iff (perm (@nil A) s) (@eq (list A) s (@nil A)) *)
split=>[H|]; last by move=>->; apply: permutation_nil.
(* Goal: @eq (list A) s (@nil A) *)
move: {1 2}[::] s H (erefl (Nil A)).
(* Goal: forall (l s : list A) (_ : perm l s) (_ : @eq (list A) l (@nil A)), @eq (list A) s (@nil A) *)
apply: perm_ind=>[|s1 s2 x t1 t2 ->|s1 s2 x y t ->|s1 s2 t _ IH1 _ IH2] //.
(* Goal: forall _ : @eq (list A) s1 (@nil A), @eq (list A) s2 (@nil A) *)
by move/IH1; move/IH2.
Qed.
Lemma perm_refl (s : seq A) : perm s s.
Proof.
(* Goal: perm s s *)
elim:s=>[|e s IH]; first by apply: permutation_nil.
(* Goal: perm (@cons A e s) (@cons A e s) *)
by apply: (permutation_skip (x:=e)) IH.
Qed.
Hint Resolve perm_refl : core.
Lemma perm_sym s1 s2 : perm s1 s2 <-> perm s2 s1.
Proof.
(* Goal: iff (perm s1 s2) (perm s2 s1) *)
suff L: forall s1 s2, perm s1 s2 -> perm s2 s1 by split; apply: L.
(* Goal: forall (s1 s2 : list A) (_ : perm s1 s2), perm s2 s1 *)
apply: perm_ind=>s1' s2'.
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1' (@cons A x (@cons A y t))) (_ : @eq (list A) s2' (@cons A y (@cons A x t))), perm s2' s1' *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1' (@cons A x t1)) (_ : @eq (list A) s2' (@cons A x t2)) (_ : perm t1 t2) (_ : perm t2 t1), perm s2' s1' *)
(* Goal: forall (_ : @eq (list A) s1' (@nil A)) (_ : @eq (list A) s2' (@nil A)), perm s2' s1' *)
-
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1' (@cons A x (@cons A y t))) (_ : @eq (list A) s2' (@cons A y (@cons A x t))), perm s2' s1' *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1' (@cons A x t1)) (_ : @eq (list A) s2' (@cons A x t2)) (_ : perm t1 t2) (_ : perm t2 t1), perm s2' s1' *)
(* Goal: forall (_ : @eq (list A) s1' (@nil A)) (_ : @eq (list A) s2' (@nil A)), perm s2' s1' *)
by move=>->->; apply: permutation_nil.
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1' (@cons A x (@cons A y t))) (_ : @eq (list A) s2' (@cons A y (@cons A x t))), perm s2' s1' *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1' (@cons A x t1)) (_ : @eq (list A) s2' (@cons A x t2)) (_ : perm t1 t2) (_ : perm t2 t1), perm s2' s1' *)
-
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1' (@cons A x (@cons A y t))) (_ : @eq (list A) s2' (@cons A y (@cons A x t))), perm s2' s1' *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1' (@cons A x t1)) (_ : @eq (list A) s2' (@cons A x t2)) (_ : perm t1 t2) (_ : perm t2 t1), perm s2' s1' *)
by move=>x t1 t2 -> -> H1; apply: permutation_skip.
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1' (@cons A x (@cons A y t))) (_ : @eq (list A) s2' (@cons A y (@cons A x t))), perm s2' s1' *)
-
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1' (@cons A x (@cons A y t))) (_ : @eq (list A) s2' (@cons A y (@cons A x t))), perm s2' s1' *)
by move =>x y t -> ->; apply: permutation_swap eq_refl eq_refl.
(* Goal: forall (t : list A) (_ : perm s1' t) (_ : perm t s1') (_ : perm t s2') (_ : perm s2' t), perm s2' s1' *)
by move=>t _ H1 _ H2; apply: permutation_trans H2 H1.
Qed.
Lemma perm_trans s2 s1 s3 : perm s1 s2 -> perm s2 s3 -> perm s1 s3.
Proof.
(* Goal: forall (_ : perm s1 s2) (_ : perm s2 s3), perm s1 s3 *)
by apply: permutation_trans.
Qed.
Lemma perm_in s1 s2 x : perm s1 s2 -> x \In s1 -> x \In s2.
Proof.
(* Goal: forall (_ : perm s1 s2) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
move: s1 s2; apply: perm_ind=>s1 s2.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x0 (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x0 t))) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x0 t1)) (_ : @eq (list A) s2 (@cons A x0 t2)) (_ : perm t1 t2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t1), @InMem A x (@Mem A (seq_PredType A) t2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (_ : @eq (list A) s1 (@nil A)) (_ : @eq (list A) s2 (@nil A)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x0 (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x0 t))) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x0 t1)) (_ : @eq (list A) s2 (@cons A x0 t2)) (_ : perm t1 t2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t1), @InMem A x (@Mem A (seq_PredType A) t2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (_ : @eq (list A) s1 (@nil A)) (_ : @eq (list A) s2 (@nil A)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
by move=>->->.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x0 (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x0 t))) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x0 t1)) (_ : @eq (list A) s2 (@cons A x0 t2)) (_ : perm t1 t2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t1), @InMem A x (@Mem A (seq_PredType A) t2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x0 (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x0 t))) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x0 t1)) (_ : @eq (list A) s2 (@cons A x0 t2)) (_ : perm t1 t2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t1), @InMem A x (@Mem A (seq_PredType A) t2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
move=>y t1 t2 -> -> H; rewrite !InE; tauto.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x0 (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x0 t))) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
(* Goal: forall (x0 y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x0 (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x0 t))) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
by move=>y z t -> ->; rewrite !InE; tauto.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) s1), @InMem A x (@Mem A (seq_PredType A) t)) (_ : perm t s2) (_ : forall _ : @InMem A x (@Mem A (seq_PredType A) t), @InMem A x (@Mem A (seq_PredType A) s2)) (_ : @InMem A x (@Mem A (seq_PredType A) s1)), @InMem A x (@Mem A (seq_PredType A) s2) *)
by move=>t _ IH1 _ IH2; move/IH1; move/IH2.
Qed.
Lemma perm_cat2lL s s1 s2 : perm s1 s2 -> perm (s ++ s1) (s ++ s2).
Proof.
(* Goal: forall _ : perm s1 s2, perm (@cat A s s1) (@cat A s s2) *)
by elim:s=>[|e s IH] //=; move/IH; apply: permutation_skip.
Qed.
Lemma perm_cat2rL s s1 s2 : perm s1 s2 -> perm (s1 ++ s) (s2 ++ s).
Proof.
(* Goal: forall _ : perm s1 s2, perm (@cat A s1 s) (@cat A s2 s) *)
move=>H; move: s1 s2 H s; apply: perm_ind=>s1 s2.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall s : list A, perm (@cat A t1 s) (@cat A t2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (_ : @eq (list A) s1 (@nil A)) (_ : @eq (list A) s2 (@nil A)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall s : list A, perm (@cat A t1 s) (@cat A t2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (_ : @eq (list A) s1 (@nil A)) (_ : @eq (list A) s2 (@nil A)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
by move=>->->.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall s : list A, perm (@cat A t1 s) (@cat A t2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall s : list A, perm (@cat A t1 s) (@cat A t2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
by move=>x t1 t2 -> -> H IH s /=; apply: permutation_skip (IH _).
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
by move=>x y t -> -> s /=; apply: permutation_swap eq_refl.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall s : list A, perm (@cat A s1 s) (@cat A t s)) (_ : perm t s2) (_ : forall s : list A, perm (@cat A t s) (@cat A s2 s)) (s : list A), perm (@cat A s1 s) (@cat A s2 s) *)
by move=>t H1 IH1 H2 IH2 s; apply: permutation_trans (IH2 s).
Qed.
Lemma perm_catL s1 t1 s2 t2 :
perm s1 s2 -> perm t1 t2 -> perm (s1 ++ t1) (s2 ++ t2).
Proof.
(* Goal: forall (_ : perm s1 s2) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
move=>H; move: s1 s2 H t1 t2; apply: perm_ind=>s1 s2.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A t1 t3) (@cat A t2 t4)) (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A s1 t3) (@cat A s2 t4) *)
(* Goal: forall (_ : @eq (list A) s1 (@nil A)) (_ : @eq (list A) s2 (@nil A)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A t1 t3) (@cat A t2 t4)) (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A s1 t3) (@cat A s2 t4) *)
(* Goal: forall (_ : @eq (list A) s1 (@nil A)) (_ : @eq (list A) s2 (@nil A)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
by move=>->->.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A t1 t3) (@cat A t2 t4)) (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A s1 t3) (@cat A s2 t4) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x : A) (t1 t2 : list A) (_ : @eq (list A) s1 (@cons A x t1)) (_ : @eq (list A) s2 (@cons A x t2)) (_ : perm t1 t2) (_ : forall (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A t1 t3) (@cat A t2 t4)) (t3 t4 : list A) (_ : perm t3 t4), perm (@cat A s1 t3) (@cat A s2 t4) *)
move=>x t1 t2 -> -> H IH r1 r2.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall _ : perm r1 r2, perm (@cat A (@cons A x t1) r1) (@cat A (@cons A x t2) r2) *)
by move/IH; apply: permutation_skip.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
-
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: forall (x y : A) (t : list A) (_ : @eq (list A) s1 (@cons A x (@cons A y t))) (_ : @eq (list A) s2 (@cons A y (@cons A x t))) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
move=>x y t -> -> t1 t2 H.
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
(* Goal: perm (@cat A (@cons A x (@cons A y t)) t1) (@cat A (@cons A y (@cons A x t)) t2) *)
by apply: (permutation_trans (t:=[:: x, y & t] ++ t2)); [apply: perm_cat2lL | simpl; apply: permutation_swap eq_refl].
(* Goal: forall (t : list A) (_ : perm s1 t) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A t t2)) (_ : perm t s2) (_ : forall (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A t t1) (@cat A s2 t2)) (t1 t2 : list A) (_ : perm t1 t2), perm (@cat A s1 t1) (@cat A s2 t2) *)
move=>t H1 IH1 H2 IH2 t1 t2 H.
(* Goal: perm (@cat A s1 t1) (@cat A s2 t2) *)
by apply: permutation_trans (IH2 _ _ H); apply: IH1.
Qed.
Lemma perm_cat_consL s1 t1 s2 t2 x :
perm s1 s2 -> perm t1 t2 -> perm (s1 ++ x :: t1) (s2 ++ x :: t2).
Proof.
(* Goal: forall (_ : perm s1 s2) (_ : perm t1 t2), perm (@cat A s1 (@cons A x t1)) (@cat A s2 (@cons A x t2)) *)
by move=>H1 H2; apply: perm_catL H1 _; apply: permutation_skip H2.
Qed.
Lemma perm_catC s1 s2 : perm (s1 ++ s2) (s2 ++ s1).
Hint Resolve perm_catC : core.
Lemma perm_cons_catCA s1 s2 x : perm (x :: s1 ++ s2) (s1 ++ x :: s2).
Proof.
(* Goal: perm (@cons A x (@cat A s1 s2)) (@cat A s1 (@cons A x s2)) *)
rewrite -cat_rcons -cats1 -cat_cons -cat1s.
(* Goal: perm (@cat A (@cat A (@cons A x (@nil A)) s1) s2) (@cat A (@cat A s1 (@cons A x (@nil A))) s2) *)
by apply: perm_cat2rL; apply: perm_catC.
Qed.
Lemma perm_cons_catAC s1 s2 x : perm (s1 ++ x :: s2) (x :: s1 ++ s2).
Proof.
(* Goal: perm (@cat A s1 (@cons A x s2)) (@cons A x (@cat A s1 s2)) *)
by apply/perm_sym; apply: perm_cons_catCA.
Qed.
Hint Resolve perm_cons_catCA perm_cons_catAC : core.
Lemma perm_cons_cat_consL s1 s2 s x :
perm s (s1 ++ s2) -> perm (x :: s) (s1 ++ x :: s2).
Lemma perm_ind2 (P : seq A -> seq A -> Prop) :
P [::] [::] ->
(forall x s1 s2, perm s1 s2 -> P s1 s2 ->
P (x :: s1) (x :: s2)) ->
(forall x y s1 s2, perm s1 s2 -> P s1 s2 ->
P (y :: x :: s1) (x :: y :: s2)) ->
(forall s2 s1 s3, perm s1 s2 -> P s1 s2 ->
perm s2 s3 -> P s2 s3 -> P s1 s3) ->
forall s1 s2, perm s1 s2 -> P s1 s2.
Lemma perm_cat_consR s1 t1 s2 t2 x :
perm (s1 ++ x :: t1) (s2 ++ x :: t2) -> perm (s1 ++ t1) (s2 ++ t2).
Lemma perm_cons x s1 s2 : perm (x :: s1) (x :: s2) <-> perm s1 s2.
Proof.
(* Goal: iff (perm (@cons A x s1) (@cons A x s2)) (perm s1 s2) *)
split; last by apply: permutation_skip.
(* Goal: forall _ : perm (@cons A x s1) (@cons A x s2), perm s1 s2 *)
by move/(@perm_cat_consR [::] s1 [::] s2 x).
Qed.
Lemma perm_cons_cat_cons x s1 s2 s :
perm (x :: s) (s1 ++ x :: s2) <-> perm s (s1 ++ s2).
Proof.
(* Goal: iff (perm (@cons A x s) (@cat A s1 (@cons A x s2))) (perm s (@cat A s1 s2)) *)
split=>[|H]; first by by move/(@perm_cat_consR [::] s s1 s2 x).
(* Goal: perm (@cons A x s) (@cat A s1 (@cons A x s2)) *)
by apply: (@perm_trans (x :: s1++s2))=>//; apply: permutation_skip eq_refl _.
Qed.
Lemma perm_cat_cons x s1 s2 t1 t2 :
perm (s1 ++ x :: t1) (s2 ++ x :: t2) <-> perm (s1 ++ t1) (s2 ++ t2).
Lemma perm_cat2l s1 s2 s3: perm (s1 ++ s2) (s1 ++ s3) <-> perm s2 s3.
Proof.
(* Goal: iff (perm (@cat A s1 s2) (@cat A s1 s3)) (perm s2 s3) *)
split; last by apply: perm_cat2lL.
(* Goal: forall _ : perm (@cat A s1 s2) (@cat A s1 s3), perm s2 s3 *)
elim: s1 s2 s3=>[|x s1 IH] s2 s3 //= H.
(* Goal: perm s2 s3 *)
by apply: IH; move/perm_cons: H.
Qed.
Lemma perm_cat2r s1 s2 s3 : perm (s2 ++ s1) (s3 ++ s1) <-> perm s2 s3.
Proof.
(* Goal: iff (perm (@cat A s2 s1) (@cat A s3 s1)) (perm s2 s3) *)
split; last by apply: perm_cat2rL.
(* Goal: forall _ : perm (@cat A s2 s1) (@cat A s3 s1), perm s2 s3 *)
elim: s1 s2 s3=>[|x s1 IH] s2 s3 /=; first by rewrite !cats0.
(* Goal: forall _ : perm (@cat A s2 (@cons A x s1)) (@cat A s3 (@cons A x s1)), perm s2 s3 *)
by move=>H; apply: IH; apply: perm_cat_consR H.
Qed.
Lemma perm_catAC s1 s2 s3 : perm ((s1 ++ s2) ++ s3) ((s1 ++ s3) ++ s2).
Proof.
(* Goal: perm (@cat A (@cat A s1 s2) s3) (@cat A (@cat A s1 s3) s2) *)
by move=>*; rewrite -!catA perm_cat2l.
Qed.
Lemma perm_catCA s1 s2 s3 : perm (s1 ++ s2 ++ s3) (s2 ++ s1 ++ s3).
Proof.
(* Goal: perm (@cat A s1 (@cat A s2 s3)) (@cat A s2 (@cat A s1 s3)) *)
by move=>*; rewrite !catA perm_cat2r.
Qed.
End Permutations.
Hint Resolve perm_refl perm_catC perm_cons_catCA
perm_cons_catAC perm_catAC perm_catCA : core.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Group_util.
Require Export Abelian_group_facts.
Section Def.
Variable G : GROUP.
Variable G' : ABELIAN_GROUP.
Definition group_hom_law : forall f g : Hom G G', Hom G G'.
Proof.
(* Goal: forall (_ : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : Carrier (@Hom GROUP G (abelian_group_group G'))), Carrier (@Hom GROUP G (abelian_group_group G')) *)
intros f0 g.
(* Goal: Carrier (@Hom GROUP G (abelian_group_group G')) *)
apply (BUILD_HOM_GROUP (G:=G) (G':=G') (ff:=fun x : G => sgroup_law G' (f0 x) (g x))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) y))) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) y)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) y))) *)
intros x y; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) x y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) x)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) y))) *)
apply Trans with (sgroup_law G' (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f0)) x) (Ap (sgroup_map (monoid_sgroup_hom f0)) y)) (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom g)) x) (Ap (sgroup_map (monoid_sgroup_hom g)) y))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G)))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
apply Trans with (sgroup_law G' (monoid_unit G') (monoid_unit G')); auto with algebra.
Qed.
Definition group_hom_unit : Hom G G'.
Proof.
(* Goal: Carrier (@Hom GROUP G (abelian_group_group G')) *)
apply (BUILD_HOM_GROUP (G:=G) (G':=G') (ff:=fun x : G => monoid_unit G')).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: forall (_ : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G'))))) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: forall (_ : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G'))))) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
auto with algebra.
Qed.
Definition group_hom_inv : forall f : Hom G G', Hom G G'.
Proof.
(* Goal: forall _ : Carrier (@Hom GROUP G (abelian_group_group G')), Carrier (@Hom GROUP G (abelian_group_group G')) *)
intros f0.
(* Goal: Carrier (@Hom GROUP G (abelian_group_group G')) *)
apply (BUILD_HOM_GROUP (G:=G) (G':=G') (ff:=fun x : G => group_inverse G' (f0 x))).
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y))) *)
(* Goal: forall (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y)) *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: forall x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y))) *)
intros x y; try assumption.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y))) *)
apply Trans with (Ap (sgroup_map (monoid_sgroup_hom f0)) (group_inverse G (sgroup_law G x y))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (group_inverse G (sgroup_law (monoid_sgroup (group_monoid G)) x y))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y))) *)
apply Trans with (Ap (sgroup_map (monoid_sgroup_hom f0)) (sgroup_law G (group_inverse G y) (group_inverse G x))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (sgroup_law (monoid_sgroup (group_monoid G)) (group_inverse G y) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y))) *)
apply Trans with (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f0)) (group_inverse G y)) (Ap (sgroup_map (monoid_sgroup_hom f0)) (group_inverse G x))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (group_inverse G y)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (group_inverse G x))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) x)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) y))) *)
apply Trans with (sgroup_law G' (Ap (sgroup_map (monoid_sgroup_hom f0)) (group_inverse G x)) (Ap (sgroup_map (monoid_sgroup_hom f0)) (group_inverse G y))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
apply Trans with (Ap (sgroup_map (monoid_sgroup_hom f0)) (group_inverse G (monoid_unit G))); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f0)) (group_inverse G (@monoid_unit (monoid_sgroup (group_monoid G)) (monoid_on_def (group_monoid G))))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
apply Trans with (Ap (sgroup_map (monoid_sgroup_hom f0)) (monoid_unit G)); auto with algebra.
Qed.
Definition group_hom : ABELIAN_GROUP.
Proof.
(* Goal: Ob ABELIAN_GROUP *)
apply (BUILD_ABELIAN_GROUP (E:=Hom G G') (genlaw:=group_hom_law) (e:=group_hom_unit) (geninv:=group_hom_inv)).
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x y z : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
(* Goal: forall (x x' y y' : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x x') (_ : @Equal (@Hom GROUP G (abelian_group_group G')) y y'), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law x' y') *)
intros x x' y y' H' H'0; try assumption.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x y z : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
(* Goal: @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law x' y') *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x y z : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
(* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x)) (fun (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) y) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')))))) *)
red in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x y z : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x)) (fun (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) y) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) y) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')))))) x0) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x y z : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x')) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y')) x0)) *)
auto with algebra.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x y z : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
intros x y z; try assumption.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law (group_hom_law x y) z) (group_hom_law x (group_hom_law y z)) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0)) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (fun (x1 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0))) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y0)) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x)) (fun (x y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x)) (fun (x y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x)) (fun (x y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))))))) *)
red in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2)) (fun (x2 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x2 y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) (@f2 G (abelian_group_group G') (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2)) (fun (x2 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x2 y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2)) (fun (x2 y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x2 y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x2 y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x1))) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x1)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y0)) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x)) (fun (x y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x)) (fun (x y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x)) (fun (x y1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y1) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) y1) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x y1 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)))))))))) x0) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) z)) x0))) *)
auto with algebra.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
intros x; try assumption.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x group_hom_unit) x *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G'))))) (fun (x0 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))) x0 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) *)
red in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G'))))) (fun (x1 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))) x1 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))))))) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G'))))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) *)
auto with algebra.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall (x y : Carrier (@Hom GROUP G (abelian_group_group G'))) (_ : @Equal (@Hom GROUP G (abelian_group_group G')) x y), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
intros x y H'; try assumption.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_inv x) (group_hom_inv y) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0)) (fun (x0 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x)) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) *)
red in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1)) (fun (x1 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x)) (fun (x y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) x0) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) *)
auto with algebra.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
intros x; try assumption.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x (group_hom_inv x)) group_hom_unit *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0))) (fun (x0 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y)) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) x0 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))))))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))) *)
red in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1))) (fun (x1 y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1)) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y)) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2)) (fun (x2 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x2 y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2 y0 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) (@f2 G (abelian_group_group G') (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2)) (fun (x2 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x2 y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2 y0 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) x1 y H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@f2 G (abelian_group_group G') (fun x2 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2)) (fun (x2 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H0 : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x2 y0) => @GROUP_comp (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x2 y0 H0 (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))))))) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun _ : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => @monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) (fun (x y : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (_ : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x y) => @Refl (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))))) x0) *)
simpl in |- *.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0))) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
auto with algebra.
(* Goal: forall x y : Carrier (@Hom GROUP G (abelian_group_group G')), @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
intros x y; try assumption.
(* Goal: @Equal (@Hom GROUP G (abelian_group_group G')) (group_hom_law x y) (group_hom_law y x) *)
simpl in |- *.
(* Goal: @Map_eq (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) (@f2 G (abelian_group_group G') (fun x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0)) (fun (x0 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x0 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) *)
red in |- *.
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))))) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@f2 G (abelian_group_group G') (fun x1 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))) => sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1)) (fun (x1 y0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))) (H : @Equal (sgroup_set (monoid_sgroup (group_monoid G))) x1 y0) => @SGROUP_comp (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) y0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) y0) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)))) (@Ap_comp (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x1 y0 H (@Refl (MAP (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G'))))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)))))) x0) *)
simpl in |- *.
(* Goal: forall x0 : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0)) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) y)) x0) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) x)) x0)) *)
auto with algebra.
Qed.
Lemma group_hom_law_prop :
forall (f g : group_hom) (x : G),
Equal (sgroup_law _ f g x) (sgroup_law _ (f x) (g x)).
Proof.
(* Goal: forall (f g : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group group_hom))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group group_hom))) f g))) x) (sgroup_law (monoid_sgroup (group_monoid (abelian_group_group G'))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f)) x) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) g)) x)) *)
simpl in |- *; auto with algebra.
Qed.
Lemma group_hom_unit_prop :
forall x : G, Equal (monoid_unit group_hom x) (monoid_unit G').
Proof.
(* Goal: forall x : Carrier (sgroup_set (monoid_sgroup (group_monoid G))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group group_hom))) (monoid_on_def (group_monoid (abelian_group_group group_hom)))))) x) (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group G'))) (monoid_on_def (group_monoid (abelian_group_group G')))) *)
simpl in |- *; auto with algebra.
Qed.
Lemma group_hom_inv_prop :
forall (f : group_hom) (x : G),
Equal (group_inverse group_hom f x) (group_inverse G' (f x)).
Proof.
(* Goal: forall (f : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group group_hom))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid G)))), @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) (group_inverse (abelian_group_group group_hom) f))) x) (group_inverse (abelian_group_group G') (@Ap (sgroup_set (monoid_sgroup (group_monoid G))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group G')))) (@sgroup_map (monoid_sgroup (group_monoid G)) (monoid_sgroup (group_monoid (abelian_group_group G'))) (@monoid_sgroup_hom (group_monoid G) (group_monoid (abelian_group_group G')) f)) x)) *)
simpl in |- *; auto with algebra.
Qed.
End Def.
Hint Resolve group_hom_law_prop group_hom_unit_prop group_hom_inv_prop:
algebra. |
Require Import List.
Require Import syntax.
Require Import environments.
Require Import typecheck.
Require Import rename.
Definition OScons (v : vari) (t : ty) (e : tm) (A : OS_env) := (v, t, e) :: A.
Inductive Ap (a : tm) : tm -> OS_env -> tm -> vari -> ty -> Prop :=
| Ap_abs :
forall (nv v : vari) (t : ty) (e ne : tm) (A : OS_env),
~ member vari nv (OS_Dom A) ->
rename nv v e ne -> Ap a (abs v t e) A ne nv t
| Ap_clos :
forall (n v : vari) (s t : ty) (e ne e1 : tm) (A : OS_env),
Ap a e (OScons v s e1 A) ne n t ->
Ap a (clos e v s e1) A (clos ne v s e1) n t.
Goal
forall (a fun_ b : tm) (A : OS_env) (n : vari) (t : ty),
Ap a fun_ A b n t -> ~ member vari n (OS_Dom A).
simple induction 1; intros.
assumption.
red in |- *; intro; apply H1; simpl in |- *.
right; assumption.
Save ApNewVar.
Inductive OSred : config -> config -> Prop :=
| OS_C0 : forall A : OS_env, OSred (cfg o A) (cfg o A)
| OS_CT : forall A : OS_env, OSred (cfg ttt A) (cfg ttt A)
| OS_CF : forall A : OS_env, OSred (cfg fff A) (cfg fff A)
| OS_L :
forall (A : OS_env) (e : tm) (t : ty) (x : vari),
OSred (cfg (abs x t e) A) (cfg (abs x t e) A)
| OS_P0 :
forall (A A' : OS_env) (e : tm),
OSred (cfg e A) (cfg o A') -> OSred (cfg (prd e) A) (cfg o A')
| OS_P :
forall (A A' : OS_env) (e e1 : tm),
OSred (cfg e A) (cfg (succ e1) A') -> OSred (cfg (prd e) A) (cfg e1 A')
| OS_ZT :
forall (A A' : OS_env) (e : tm),
OSred (cfg e A) (cfg o A') -> OSred (cfg (is_o e) A) (cfg ttt A')
| OS_ZF :
forall (A A' : OS_env) (e e1 : tm),
OSred (cfg e A) (cfg (succ e1) A') ->
OSred (cfg (is_o e) A) (cfg fff A')
| OS_S :
forall (A A' : OS_env) (e e1 : tm),
OSred (cfg e A) (cfg e1 A') ->
OSred (cfg (succ e) A) (cfg (succ e1) A')
| OS_Var1 :
forall (A A' : OS_env) (e en : tm) (t : ty) (x : vari),
~ member vari x (OS_Dom A) ->
OSred (cfg e A) (cfg en A') ->
OSred (cfg (var x) (OScons x t e A)) (cfg en (OScons x t en A'))
| OS_Var2 :
forall (A A' : OS_env) (e en : tm) (t : ty) (x y : vari),
x <> y ->
~ member vari x (OS_Dom A) ->
OSred (cfg (var y) A) (cfg en A') ->
OSred (cfg (var y) (OScons x t e A)) (cfg en (OScons x t e A'))
| OS_Appl :
forall (A A' A'' : OS_env) (e1 e2 en en' enf : tm) (n : vari) (t : ty),
OSred (cfg e1 A) (cfg en A') ->
Ap e2 en A en' n t ->
OSred (cfg (clos en' n t e2) A') (cfg enf A'') ->
OSred (cfg (appl e1 e2) A) (cfg enf A'')
| OS_IfTrue :
forall (A A' A'' : OS_env) (e1 e2 e3 en : tm),
OSred (cfg e1 A) (cfg ttt A') ->
OSred (cfg e2 A') (cfg en A'') ->
OSred (cfg (cond e1 e2 e3) A) (cfg en A'')
| OS_IfFalse :
forall (A A' A'' : OS_env) (e1 e2 e3 en : tm),
OSred (cfg e1 A) (cfg fff A') ->
OSred (cfg e3 A') (cfg en A'') ->
OSred (cfg (cond e1 e2 e3) A) (cfg en A'')
| OS_Fix :
forall (A A' : OS_env) (e e' en : tm) (x nx : vari) (t : ty),
~ member vari nx (OS_Dom A) ->
rename nx x e e' ->
OSred (cfg (clos e' nx t (Fix x t e)) A) (cfg en A') ->
OSred (cfg (Fix x t e) A) (cfg en A')
| OS_CL :
forall (A A' : OS_env) (e e1 en e1' : tm) (x : vari) (t : ty),
OSred (cfg e (OScons x t e1 A)) (cfg en (OScons x t e1' A')) ->
forall s : ty,
TC (OS_Dom_ty (OScons x t e1 A)) en s ->
~ (s = nat_ty \/ s = bool_ty) ->
OSred (cfg (clos e x t e1) A) (cfg (clos en x t e1') A')
| OS_CL' :
forall (A A' : OS_env) (e e1 en e1' : tm) (x : vari) (t : ty),
OSred (cfg e (OScons x t e1 A)) (cfg en (OScons x t e1' A')) ->
forall s : ty,
TC (OS_Dom_ty (OScons x t e1 A)) en s ->
s = nat_ty \/ s = bool_ty -> OSred (cfg (clos e x t e1) A) (cfg en A').
|
Require Import Arith.
Require Import ZArith.
Require Import lemmas.
Require Import natZ.
Require Import dec.
Require Import list.
Require Import exp.
Require Import divides.
Require Import prime.
Require Import modulo.
Require Import modprime.
Definition nodoubles (p : nat) (l : Zlist) : Prop :=
forall x : Z,
inlist Z x l -> forall y : Z, inlist Z y (zdrop x l) -> ~ Mod x y p.
Lemma nodoubles_nil : forall p : nat, nodoubles p (Nil Z).
Proof.
(* Goal: forall p : nat, nodoubles p (Nil Z) *)
unfold nodoubles in |- *.
(* Goal: forall (p : nat) (x : Z) (_ : inlist Z x (Nil Z)) (y : Z) (_ : inlist Z y (zdrop x (Nil Z))), not (Mod x y p) *)
simpl in |- *.
(* Goal: forall (p : nat) (x : Z) (_ : inlist Z x (Nil Z)) (y : Z) (_ : inlist Z y (Nil Z)), not (Mod x y p) *)
intros.
(* Goal: not (Mod x y p) *)
elim H0.
Qed.
Lemma nodoubles_drop :
forall (p : nat) (l : Zlist) (x : Z),
nodoubles p l -> nodoubles p (zdrop x l).
Proof.
(* Goal: forall (p : nat) (l : Zlist) (x : Z) (_ : nodoubles p l), nodoubles p (zdrop x l) *)
unfold nodoubles in |- *.
(* Goal: forall (p : nat) (l : Zlist) (x : Z) (_ : forall (x0 : Z) (_ : inlist Z x0 l) (y : Z) (_ : inlist Z y (zdrop x0 l)), not (Mod x0 y p)) (x0 : Z) (_ : inlist Z x0 (zdrop x l)) (y : Z) (_ : inlist Z y (zdrop x0 (zdrop x l))), not (Mod x0 y p) *)
intros.
(* Goal: not (Mod x0 y p) *)
apply H.
(* Goal: inlist Z y (zdrop x0 l) *)
(* Goal: inlist Z x0 l *)
apply zdrop_inlist_weak with x.
(* Goal: inlist Z y (zdrop x0 l) *)
(* Goal: inlist Z x0 (zdrop x l) *)
assumption.
(* Goal: inlist Z y (zdrop x0 l) *)
apply zdrop_inlist_weak with x.
(* Goal: inlist Z y (zdrop x (zdrop x0 l)) *)
rewrite zdrop_swap.
(* Goal: inlist Z y (zdrop x0 (zdrop x l)) *)
assumption.
Qed.
Lemma nodoubles_ind :
forall (p : nat) (h : Z) (t : Zlist),
(forall x : Z, inlist Z x t -> ~ Mod h x p) ->
nodoubles p t -> nodoubles p (Cons Z h t).
Proof.
(* Goal: forall (p : nat) (h : Z) (t : Zlist) (_ : forall (x : Z) (_ : inlist Z x t), not (Mod h x p)) (_ : nodoubles p t), nodoubles p (Cons Z h t) *)
intros.
(* Goal: nodoubles p (Cons Z h t) *)
unfold nodoubles in |- *.
(* Goal: forall (x : Z) (_ : inlist Z x (Cons Z h t)) (y : Z) (_ : inlist Z y (zdrop x (Cons Z h t))), not (Mod x y p) *)
intros.
(* Goal: not (Mod x y p) *)
elim (zeqdec x h).
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
(* Goal: forall _ : @eq Z x h, not (Mod x y p) *)
intro.
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
(* Goal: not (Mod x y p) *)
rewrite zdrop_head_eq in H2.
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
(* Goal: @eq Z x h *)
(* Goal: not (Mod x y p) *)
rewrite H3.
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
(* Goal: @eq Z x h *)
(* Goal: not (Mod h y p) *)
apply (H y).
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
(* Goal: @eq Z x h *)
(* Goal: inlist Z y t *)
assumption.
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
(* Goal: @eq Z x h *)
assumption.
(* Goal: forall _ : not (@eq Z x h), not (Mod x y p) *)
intro.
(* Goal: not (Mod x y p) *)
rewrite zdrop_head_neq in H2.
(* Goal: not (@eq Z x h) *)
(* Goal: not (Mod x y p) *)
elim (zeqdec y h).
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: forall _ : @eq Z y h, not (Mod x y p) *)
intro.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: not (Mod x y p) *)
rewrite H4.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: not (Mod x h p) *)
intro.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: False *)
elim (H x).
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod h x p *)
(* Goal: inlist Z x t *)
elim (inlist_head_neq Z x h t).
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod h x p *)
(* Goal: not (@eq Z x h) *)
(* Goal: forall (_ : forall _ : inlist Z x (Cons Z h t), inlist Z x t) (_ : forall _ : inlist Z x t, inlist Z x (Cons Z h t)), inlist Z x t *)
intros.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod h x p *)
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z x t *)
apply H6.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod h x p *)
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z x (Cons Z h t) *)
assumption.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod h x p *)
(* Goal: not (@eq Z x h) *)
assumption.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod h x p *)
apply mod_sym.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
(* Goal: Mod x h p *)
assumption.
(* Goal: not (@eq Z x h) *)
(* Goal: forall _ : not (@eq Z y h), not (Mod x y p) *)
intro.
(* Goal: not (@eq Z x h) *)
(* Goal: not (Mod x y p) *)
unfold nodoubles in H0.
(* Goal: not (@eq Z x h) *)
(* Goal: not (Mod x y p) *)
apply (H0 x).
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z y (zdrop x t) *)
(* Goal: inlist Z x t *)
elim (inlist_head_neq Z x h t).
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z y (zdrop x t) *)
(* Goal: not (@eq Z x h) *)
(* Goal: forall (_ : forall _ : inlist Z x (Cons Z h t), inlist Z x t) (_ : forall _ : inlist Z x t, inlist Z x (Cons Z h t)), inlist Z x t *)
intros.
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z y (zdrop x t) *)
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z x t *)
apply H5.
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z y (zdrop x t) *)
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z x (Cons Z h t) *)
assumption.
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z y (zdrop x t) *)
(* Goal: not (@eq Z x h) *)
assumption.
(* Goal: not (@eq Z x h) *)
(* Goal: inlist Z y (zdrop x t) *)
elim (inlist_head_neq Z y h (zdrop x t)).
(* Goal: not (@eq Z x h) *)
(* Goal: not (@eq Z y h) *)
(* Goal: forall (_ : forall _ : inlist Z y (Cons Z h (zdrop x t)), inlist Z y (zdrop x t)) (_ : forall _ : inlist Z y (zdrop x t), inlist Z y (Cons Z h (zdrop x t))), inlist Z y (zdrop x t) *)
intros.
(* Goal: not (@eq Z x h) *)
(* Goal: not (@eq Z y h) *)
(* Goal: inlist Z y (zdrop x t) *)
apply H5.
(* Goal: not (@eq Z x h) *)
(* Goal: not (@eq Z y h) *)
(* Goal: inlist Z y (Cons Z h (zdrop x t)) *)
assumption.
(* Goal: not (@eq Z x h) *)
(* Goal: not (@eq Z y h) *)
assumption.
(* Goal: not (@eq Z x h) *)
assumption.
Qed.
Definition allex (p : nat) (l0 l1 : Zlist) : Prop :=
forall x : Z, inlist Z x l0 -> exists y : Z, inlist Z y l1 /\ Mod x y p.
Lemma allex_nodoubles_drop :
forall (p : nat) (l0 l1 : Zlist) (x0 x1 : Z),
Prime p ->
Mod x0 x1 p ->
inlist Z x0 l0 ->
inlist Z x1 l1 ->
nodoubles p l0 -> allex p l0 l1 -> allex p (zdrop x0 l0) (zdrop x1 l1).
Proof.
(* Goal: forall (p : nat) (l0 l1 : Zlist) (x0 x1 : Z) (_ : Prime p) (_ : Mod x0 x1 p) (_ : inlist Z x0 l0) (_ : inlist Z x1 l1) (_ : nodoubles p l0) (_ : allex p l0 l1), allex p (zdrop x0 l0) (zdrop x1 l1) *)
intros.
(* Goal: allex p (zdrop x0 l0) (zdrop x1 l1) *)
unfold allex in |- *.
(* Goal: forall (x : Z) (_ : inlist Z x (zdrop x0 l0)), @ex Z (fun y : Z => and (inlist Z y (zdrop x1 l1)) (Mod x y p)) *)
intros x Hx.
(* Goal: @ex Z (fun y : Z => and (inlist Z y (zdrop x1 l1)) (Mod x y p)) *)
elim (H4 x).
(* Goal: inlist Z x l0 *)
(* Goal: forall (x0 : Z) (_ : and (inlist Z x0 l1) (Mod x x0 p)), @ex Z (fun y : Z => and (inlist Z y (zdrop x1 l1)) (Mod x y p)) *)
intros y Hy.
(* Goal: inlist Z x l0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (zdrop x1 l1)) (Mod x y p)) *)
elim Hy.
(* Goal: inlist Z x l0 *)
(* Goal: forall (_ : inlist Z y l1) (_ : Mod x y p), @ex Z (fun y : Z => and (inlist Z y (zdrop x1 l1)) (Mod x y p)) *)
intros.
(* Goal: inlist Z x l0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (zdrop x1 l1)) (Mod x y p)) *)
split with y.
(* Goal: inlist Z x l0 *)
(* Goal: and (inlist Z y (zdrop x1 l1)) (Mod x y p) *)
split.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y (zdrop x1 l1) *)
apply zdrop_neq_inlist.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: not (@eq Z y x1) *)
intro.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: False *)
rewrite H7 in H6.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: False *)
elim H3 with x x0.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x x0 p *)
(* Goal: inlist Z x0 (zdrop x l0) *)
(* Goal: inlist Z x l0 *)
apply zdrop_inlist_weak with x0.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x x0 p *)
(* Goal: inlist Z x0 (zdrop x l0) *)
(* Goal: inlist Z x (zdrop x0 l0) *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x x0 p *)
(* Goal: inlist Z x0 (zdrop x l0) *)
apply zdrop_inlist_swap.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x x0 p *)
(* Goal: inlist Z x (zdrop x0 l0) *)
(* Goal: inlist Z x0 l0 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x x0 p *)
(* Goal: inlist Z x (zdrop x0 l0) *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x x0 p *)
apply mod_trans with x1.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x1 x0 p *)
(* Goal: Mod x x1 p *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x1 x0 p *)
apply mod_sym.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x0 x1 p *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: inlist Z y l1 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
assumption.
(* Goal: inlist Z x l0 *)
apply zdrop_inlist_weak with x0.
(* Goal: inlist Z x (zdrop x0 l0) *)
assumption.
Qed.
Fixpoint until (n : nat) : Zlist :=
match n with
| O => Nil Z
| S n => Cons Z (Z_of_nat (S n)) (until n)
end.
Lemma until_ok :
forall (n : nat) (x : Z), (0 < x <= Z_of_nat n)%Z -> inlist Z x (until n).
Proof.
(* Goal: forall (n : nat) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n) *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat O))), inlist Z x (until O) *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x Z0)), inlist Z x (Nil Z) *)
intros.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: inlist Z x (Nil Z) *)
elim H.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: forall (_ : Z.lt Z0 x) (_ : Z.le x Z0), inlist Z x (Nil Z) *)
intros.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: inlist Z x (Nil Z) *)
elim (Zle_not_lt x 0).
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: Z.lt Z0 x *)
(* Goal: Z.le x Z0 *)
assumption.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat n))), inlist Z x (until n)) (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S n)))), inlist Z x (until (S n)) *)
intros m IH.
(* Goal: forall (x : Z) (_ : and (Z.lt Z0 x) (Z.le x (Z.of_nat (S m)))), inlist Z x (until (S m)) *)
intros.
(* Goal: inlist Z x (until (S m)) *)
elim H.
(* Goal: forall (_ : Z.lt Z0 x) (_ : Z.le x (Z.of_nat (S m))), inlist Z x (until (S m)) *)
intros.
(* Goal: inlist Z x (until (S m)) *)
elim (Zle_lt_or_eq x (Z_of_nat (S m))).
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: forall _ : Z.lt x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
intros.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: inlist Z x (until (S m)) *)
unfold inlist in |- *.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: exlist Z (fun b : Z => @eq Z x b) (until (S m)) *)
simpl in |- *.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: or (@eq Z x (Zpos (Pos.of_succ_nat m))) (exlist Z (fun b : Z => @eq Z x b) (until m)) *)
right.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: exlist Z (fun b : Z => @eq Z x b) (until m) *)
unfold inlist in IH.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: exlist Z (fun b : Z => @eq Z x b) (until m) *)
apply IH.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: and (Z.lt Z0 x) (Z.le x (Z.of_nat m)) *)
split.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: Z.le x (Z.of_nat m) *)
(* Goal: Z.lt Z0 x *)
assumption.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: Z.le x (Z.of_nat m) *)
apply Zlt_succ_le.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: Z.lt x (Z.succ (Z.of_nat m)) *)
rewrite <- Znat.inj_S.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
(* Goal: Z.lt x (Z.of_nat (S m)) *)
assumption.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Z.of_nat (S m)), inlist Z x (until (S m)) *)
intro.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: inlist Z x (until (S m)) *)
rewrite H2.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: inlist Z (Z.of_nat (S m)) (until (S m)) *)
unfold inlist in |- *.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: exlist Z (fun b : Z => @eq Z (Z.of_nat (S m)) b) (until (S m)) *)
simpl in |- *.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: or (@eq Z (Zpos (Pos.of_succ_nat m)) (Zpos (Pos.of_succ_nat m))) (exlist Z (fun b : Z => @eq Z (Zpos (Pos.of_succ_nat m)) b) (until m)) *)
left.
(* Goal: Z.le x (Z.of_nat (S m)) *)
(* Goal: @eq Z (Zpos (Pos.of_succ_nat m)) (Zpos (Pos.of_succ_nat m)) *)
reflexivity.
(* Goal: Z.le x (Z.of_nat (S m)) *)
assumption.
Qed.
Lemma until_mod_all :
forall (p : nat) (x : Z),
0 < p ->
~ Mod x 0 p -> exists y : Z, inlist Z y (until (pred p)) /\ Mod x y p.
Proof.
(* Goal: forall (p : nat) (x : Z) (_ : lt O p) (_ : not (Mod x Z0 p)), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intros.
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
elim (zdiv_rem (Z_of_nat p) x).
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (x0 : Z) (_ : @ex Z (fun r : Z => and (and (Z.le Z0 r) (Z.lt r (Z.of_nat p))) (@eq Z x (Z.add (Z.mul x0 (Z.of_nat p)) r)))), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intro q.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall _ : @ex Z (fun r : Z => and (and (Z.le Z0 r) (Z.lt r (Z.of_nat p))) (@eq Z x (Z.add (Z.mul q (Z.of_nat p)) r))), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intros.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
elim H1.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (x0 : Z) (_ : and (and (Z.le Z0 x0) (Z.lt x0 (Z.of_nat p))) (@eq Z x (Z.add (Z.mul q (Z.of_nat p)) x0))), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intro r.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall _ : and (and (Z.le Z0 r) (Z.lt r (Z.of_nat p))) (@eq Z x (Z.add (Z.mul q (Z.of_nat p)) r)), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intros.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
elim H2.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (_ : and (Z.le Z0 r) (Z.lt r (Z.of_nat p))) (_ : @eq Z x (Z.add (Z.mul q (Z.of_nat p)) r)), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intros.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
elim H3.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (_ : Z.le Z0 r) (_ : Z.lt r (Z.of_nat p)), @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intros.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
elim (Zle_lt_or_eq 0 r).
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: forall _ : Z.lt Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intro.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
split with r.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: and (inlist Z r (until (Init.Nat.pred p))) (Mod x r p) *)
split.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: inlist Z r (until (Init.Nat.pred p)) *)
apply until_ok.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: and (Z.lt Z0 r) (Z.le r (Z.of_nat (Init.Nat.pred p))) *)
split.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.lt Z0 r *)
assumption.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
apply Zlt_succ_le.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: Z.lt r (Z.succ (Z.of_nat (Init.Nat.pred p))) *)
rewrite <- Znat.inj_S.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: Z.lt r (Z.of_nat (S (Init.Nat.pred p))) *)
rewrite <- (S_pred p 0).
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: lt O p *)
(* Goal: Z.lt r (Z.of_nat p) *)
assumption.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
(* Goal: lt O p *)
assumption.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: Mod x r p *)
split with q.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: @eq Z x (Z.add r (Z.mul (Z.of_nat p) q)) *)
rewrite Zplus_comm.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: @eq Z x (Z.add (Z.mul (Z.of_nat p) q) r) *)
rewrite Zmult_comm.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
(* Goal: @eq Z x (Z.add (Z.mul q (Z.of_nat p)) r) *)
assumption.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
intro.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (until (Init.Nat.pred p))) (Mod x y p)) *)
elim H0.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod x Z0 p *)
split with q.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z x (Z.add Z0 (Z.mul (Z.of_nat p) q)) *)
rewrite H7.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z x (Z.add r (Z.mul (Z.of_nat p) q)) *)
rewrite Zplus_comm.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z x (Z.add (Z.mul (Z.of_nat p) q) r) *)
rewrite Zmult_comm.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z x (Z.add (Z.mul q (Z.of_nat p)) r) *)
assumption.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Z.le Z0 r *)
assumption.
(* Goal: Z.gt (Z.of_nat p) Z0 *)
change (Z_of_nat p > Z_of_nat 0)%Z in |- *.
(* Goal: Z.gt (Z.of_nat p) (Z.of_nat O) *)
apply Znat.inj_gt.
(* Goal: gt p O *)
assumption.
Qed.
Lemma until_pos : forall (n : nat) (x : Z), inlist Z x (until n) -> (0 < x)%Z.
Proof.
(* Goal: forall (n : nat) (x : Z) (_ : inlist Z x (until n)), Z.lt Z0 x *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.lt Z0 x) (x : Z) (_ : inlist Z x (until (S n))), Z.lt Z0 x *)
(* Goal: forall (x : Z) (_ : inlist Z x (until O)), Z.lt Z0 x *)
unfold inlist in |- *.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.lt Z0 x) (x : Z) (_ : inlist Z x (until (S n))), Z.lt Z0 x *)
(* Goal: forall (x : Z) (_ : exlist Z (fun b : Z => @eq Z x b) (until O)), Z.lt Z0 x *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.lt Z0 x) (x : Z) (_ : inlist Z x (until (S n))), Z.lt Z0 x *)
(* Goal: forall (x : Z) (_ : False), Z.lt Z0 x *)
intros.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.lt Z0 x) (x : Z) (_ : inlist Z x (until (S n))), Z.lt Z0 x *)
(* Goal: Z.lt Z0 x *)
elim H.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.lt Z0 x) (x : Z) (_ : inlist Z x (until (S n))), Z.lt Z0 x *)
intros m IH.
(* Goal: forall (x : Z) (_ : inlist Z x (until (S m))), Z.lt Z0 x *)
intros.
(* Goal: Z.lt Z0 x *)
unfold inlist in H.
(* Goal: Z.lt Z0 x *)
simpl in H.
(* Goal: Z.lt Z0 x *)
elim H.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.lt Z0 x *)
(* Goal: forall _ : @eq Z x (Zpos (Pos.of_succ_nat m)), Z.lt Z0 x *)
intros.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.lt Z0 x *)
(* Goal: Z.lt Z0 x *)
rewrite H0.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.lt Z0 x *)
(* Goal: Z.lt Z0 (Zpos (Pos.of_succ_nat m)) *)
unfold Zlt in |- *.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.lt Z0 x *)
(* Goal: @eq comparison (Z.compare Z0 (Zpos (Pos.of_succ_nat m))) Lt *)
simpl in |- *.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.lt Z0 x *)
(* Goal: @eq comparison Lt Lt *)
reflexivity.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.lt Z0 x *)
intros.
(* Goal: Z.lt Z0 x *)
apply IH.
(* Goal: inlist Z x (until m) *)
assumption.
Qed.
Lemma until_le_n :
forall (n : nat) (x : Z), inlist Z x (until n) -> (x <= Z_of_nat n)%Z.
Proof.
(* Goal: forall (n : nat) (x : Z) (_ : inlist Z x (until n)), Z.le x (Z.of_nat n) *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.le x (Z.of_nat n)) (x : Z) (_ : inlist Z x (until (S n))), Z.le x (Z.of_nat (S n)) *)
(* Goal: forall (x : Z) (_ : inlist Z x (until O)), Z.le x (Z.of_nat O) *)
unfold inlist in |- *.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.le x (Z.of_nat n)) (x : Z) (_ : inlist Z x (until (S n))), Z.le x (Z.of_nat (S n)) *)
(* Goal: forall (x : Z) (_ : exlist Z (fun b : Z => @eq Z x b) (until O)), Z.le x (Z.of_nat O) *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.le x (Z.of_nat n)) (x : Z) (_ : inlist Z x (until (S n))), Z.le x (Z.of_nat (S n)) *)
(* Goal: forall (x : Z) (_ : False), Z.le x Z0 *)
intros.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.le x (Z.of_nat n)) (x : Z) (_ : inlist Z x (until (S n))), Z.le x (Z.of_nat (S n)) *)
(* Goal: Z.le x Z0 *)
elim H.
(* Goal: forall (n : nat) (_ : forall (x : Z) (_ : inlist Z x (until n)), Z.le x (Z.of_nat n)) (x : Z) (_ : inlist Z x (until (S n))), Z.le x (Z.of_nat (S n)) *)
intros m IH.
(* Goal: forall (x : Z) (_ : inlist Z x (until (S m))), Z.le x (Z.of_nat (S m)) *)
intros.
(* Goal: Z.le x (Z.of_nat (S m)) *)
unfold inlist in H.
(* Goal: Z.le x (Z.of_nat (S m)) *)
simpl in H.
(* Goal: Z.le x (Z.of_nat (S m)) *)
elim H.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.le x (Z.of_nat (S m)) *)
(* Goal: forall _ : @eq Z x (Zpos (Pos.of_succ_nat m)), Z.le x (Z.of_nat (S m)) *)
intros.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.le x (Z.of_nat (S m)) *)
(* Goal: Z.le x (Z.of_nat (S m)) *)
rewrite H0.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.le x (Z.of_nat (S m)) *)
(* Goal: Z.le (Zpos (Pos.of_succ_nat m)) (Z.of_nat (S m)) *)
apply Zle_refl.
(* Goal: forall _ : exlist Z (fun b : Z => @eq Z x b) (until m), Z.le x (Z.of_nat (S m)) *)
intros.
(* Goal: Z.le x (Z.of_nat (S m)) *)
apply Zle_trans with (Z_of_nat m).
(* Goal: Z.le (Z.of_nat m) (Z.of_nat (S m)) *)
(* Goal: Z.le x (Z.of_nat m) *)
apply IH.
(* Goal: Z.le (Z.of_nat m) (Z.of_nat (S m)) *)
(* Goal: inlist Z x (until m) *)
assumption.
(* Goal: Z.le (Z.of_nat m) (Z.of_nat (S m)) *)
apply Znat.inj_le.
(* Goal: le m (S m) *)
apply le_S.
(* Goal: le m m *)
apply le_n.
Qed.
Lemma until_not_0mod :
forall (p : nat) (x : Z),
0 < p -> inlist Z x (until (pred p)) -> ~ Mod x 0 p.
Proof.
(* Goal: forall (p : nat) (x : Z) (_ : lt O p) (_ : inlist Z x (until (Init.Nat.pred p))), not (Mod x Z0 p) *)
intros.
(* Goal: not (Mod x Z0 p) *)
apply mod_repr_non_0.
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
split.
(* Goal: Z.lt x (Z.of_nat p) *)
(* Goal: Z.lt Z0 x *)
apply (until_pos (pred p) x).
(* Goal: Z.lt x (Z.of_nat p) *)
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
assumption.
(* Goal: Z.lt x (Z.of_nat p) *)
rewrite (S_pred p 0).
(* Goal: lt O p *)
(* Goal: Z.lt x (Z.of_nat (S (Init.Nat.pred p))) *)
rewrite Znat.inj_S.
(* Goal: lt O p *)
(* Goal: Z.lt x (Z.succ (Z.of_nat (Init.Nat.pred p))) *)
apply Zle_lt_succ.
(* Goal: lt O p *)
(* Goal: Z.le x (Z.of_nat (Init.Nat.pred p)) *)
apply until_le_n.
(* Goal: lt O p *)
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
assumption.
(* Goal: lt O p *)
assumption.
Qed.
Lemma untiln_prod_not_0modp :
forall p n : nat,
0 < n -> n < p -> Prime p -> ~ Mod (zproduct (until n)) 0 p.
Proof.
(* Goal: forall (p n : nat) (_ : lt O n) (_ : lt n p) (_ : Prime p), not (Mod (zproduct (until n)) Z0 p) *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (_ : lt O n) (_ : lt n p) (_ : Prime p), not (Mod (zproduct (until n)) Z0 p)) (_ : lt O (S n)) (_ : lt (S n) p) (_ : Prime p), not (Mod (zproduct (until (S n))) Z0 p) *)
(* Goal: forall (_ : lt O O) (_ : lt O p) (_ : Prime p), not (Mod (zproduct (until O)) Z0 p) *)
intro.
(* Goal: forall (n : nat) (_ : forall (_ : lt O n) (_ : lt n p) (_ : Prime p), not (Mod (zproduct (until n)) Z0 p)) (_ : lt O (S n)) (_ : lt (S n) p) (_ : Prime p), not (Mod (zproduct (until (S n))) Z0 p) *)
(* Goal: forall (_ : lt O p) (_ : Prime p), not (Mod (zproduct (until O)) Z0 p) *)
elim (lt_irrefl 0).
(* Goal: forall (n : nat) (_ : forall (_ : lt O n) (_ : lt n p) (_ : Prime p), not (Mod (zproduct (until n)) Z0 p)) (_ : lt O (S n)) (_ : lt (S n) p) (_ : Prime p), not (Mod (zproduct (until (S n))) Z0 p) *)
(* Goal: lt O O *)
assumption.
(* Goal: forall (n : nat) (_ : forall (_ : lt O n) (_ : lt n p) (_ : Prime p), not (Mod (zproduct (until n)) Z0 p)) (_ : lt O (S n)) (_ : lt (S n) p) (_ : Prime p), not (Mod (zproduct (until (S n))) Z0 p) *)
intros m IH H0m Hmp Hp.
(* Goal: not (Mod (zproduct (until (S m))) Z0 p) *)
change (~ Mod (Z_of_nat (S m) * zproduct (until m)) 0 p) in |- *.
(* Goal: not (Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p) *)
intro.
(* Goal: False *)
elim (mod_mult_0 p (Z_of_nat (S m)) (zproduct (until m))).
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: forall _ : Mod (Z.of_nat (S m)) Z0 p, False *)
intro.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: False *)
elim (mod_repr_non_0 p (Z_of_nat (S m))).
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
split.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
(* Goal: Z.lt Z0 (Z.of_nat (S m)) *)
change (Z_of_nat 0 < Z_of_nat (S m))%Z in |- *.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
(* Goal: Z.lt (Z.of_nat O) (Z.of_nat (S m)) *)
apply Znat.inj_lt.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
(* Goal: lt O (S m) *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
apply Znat.inj_lt.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
(* Goal: lt (S m) p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
(* Goal: Mod (Z.of_nat (S m)) Z0 p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: forall _ : Mod (zproduct (until m)) Z0 p, False *)
intro.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: False *)
elim (le_lt_or_eq 0 m).
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: forall _ : lt O m, False *)
intro.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: False *)
elim IH.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: Mod (zproduct (until m)) Z0 p *)
(* Goal: Prime p *)
(* Goal: lt m p *)
(* Goal: lt O m *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: Mod (zproduct (until m)) Z0 p *)
(* Goal: Prime p *)
(* Goal: lt m p *)
apply lt_trans with (S m).
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: Mod (zproduct (until m)) Z0 p *)
(* Goal: Prime p *)
(* Goal: lt (S m) p *)
(* Goal: lt m (S m) *)
apply lt_n_Sn.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: Mod (zproduct (until m)) Z0 p *)
(* Goal: Prime p *)
(* Goal: lt (S m) p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: Mod (zproduct (until m)) Z0 p *)
(* Goal: Prime p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
(* Goal: Mod (zproduct (until m)) Z0 p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: forall _ : @eq nat O m, False *)
intro.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: False *)
rewrite <- H1 in H.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: False *)
simpl in H.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: False *)
elim mod_0not1 with p.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: Mod Z0 (Zpos xH) p *)
(* Goal: gt p (S O) *)
elim Hp.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: Mod Z0 (Zpos xH) p *)
(* Goal: forall (_ : gt p (S O)) (_ : forall (q : nat) (_ : Divides q p), or (@eq nat q (S O)) (@eq nat q p)), gt p (S O) *)
intros.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: Mod Z0 (Zpos xH) p *)
(* Goal: gt p (S O) *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: Mod Z0 (Zpos xH) p *)
apply mod_sym.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
(* Goal: Mod (Zpos xH) Z0 p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
(* Goal: le O m *)
apply le_O_n.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
(* Goal: Prime p *)
assumption.
(* Goal: Mod (Z.mul (Z.of_nat (S m)) (zproduct (until m))) Z0 p *)
assumption.
Qed.
Lemma until_prod_not_0mod :
forall p : nat, Prime p -> ~ Mod (zproduct (until (pred p))) 0 p.
Proof.
(* Goal: forall (p : nat) (_ : Prime p), not (Mod (zproduct (until (Init.Nat.pred p))) Z0 p) *)
intros.
(* Goal: not (Mod (zproduct (until (Init.Nat.pred p))) Z0 p) *)
elim H.
(* Goal: forall (_ : gt p (S O)) (_ : forall (q : nat) (_ : Divides q p), or (@eq nat q (S O)) (@eq nat q p)), not (Mod (zproduct (until (Init.Nat.pred p))) Z0 p) *)
intros.
(* Goal: not (Mod (zproduct (until (Init.Nat.pred p))) Z0 p) *)
apply untiln_prod_not_0modp; auto with arith.
Qed.
Lemma until_mapmult_exp :
forall (a : Z) (n : nat),
zproduct (mapmult a (until n)) = (Exp a n * zproduct (until n))%Z.
Proof.
(* Goal: forall (a : Z) (n : nat), @eq Z (zproduct (mapmult a (until n))) (Z.mul (Exp a n) (zproduct (until n))) *)
simple induction n.
(* Goal: forall (n : nat) (_ : @eq Z (zproduct (mapmult a (until n))) (Z.mul (Exp a n) (zproduct (until n)))), @eq Z (zproduct (mapmult a (until (S n)))) (Z.mul (Exp a (S n)) (zproduct (until (S n)))) *)
(* Goal: @eq Z (zproduct (mapmult a (until O))) (Z.mul (Exp a O) (zproduct (until O))) *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : @eq Z (zproduct (mapmult a (until n))) (Z.mul (Exp a n) (zproduct (until n)))), @eq Z (zproduct (mapmult a (until (S n)))) (Z.mul (Exp a (S n)) (zproduct (until (S n)))) *)
(* Goal: @eq Z (Zpos xH) (Zpos xH) *)
reflexivity.
(* Goal: forall (n : nat) (_ : @eq Z (zproduct (mapmult a (until n))) (Z.mul (Exp a n) (zproduct (until n)))), @eq Z (zproduct (mapmult a (until (S n)))) (Z.mul (Exp a (S n)) (zproduct (until (S n)))) *)
intros m IH.
(* Goal: @eq Z (zproduct (mapmult a (until (S m)))) (Z.mul (Exp a (S m)) (zproduct (until (S m)))) *)
replace (mapmult a (until (S m))) with (Cons Z (a * Z_of_nat (S m))%Z (mapmult a (until m))).
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) (Z.mul (Exp a (S m)) (zproduct (until (S m)))) *)
rewrite exp_S.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
replace (zproduct (Cons Z (a * Z_of_nat (S m))%Z (mapmult a (until m)))) with (a * Z_of_nat (S m) * zproduct (mapmult a (until m)))%Z.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
rewrite IH.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (Z.mul (Exp a m) (zproduct (until m)))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
rewrite Zmult_assoc_reverse.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul a (Z.mul (Z.of_nat (S m)) (Z.mul (Exp a m) (zproduct (until m))))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
rewrite (Zmult_assoc (Z_of_nat (S m)) (Exp a m)).
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul a (Z.mul (Z.mul (Z.of_nat (S m)) (Exp a m)) (zproduct (until m)))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
rewrite (Zmult_comm (Z_of_nat (S m))).
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul a (Z.mul (Z.mul (Exp a m) (Z.of_nat (S m))) (zproduct (until m)))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
rewrite Zmult_assoc.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.mul (Exp a m) (Z.of_nat (S m)))) (zproduct (until m))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
rewrite Zmult_assoc.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.mul (Z.mul a (Exp a m)) (Z.of_nat (S m))) (zproduct (until m))) (Z.mul (Z.mul a (Exp a m)) (zproduct (until (S m)))) *)
replace (zproduct (until (S m))) with (Z_of_nat (S m) * zproduct (until m))%Z.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.of_nat (S m)) (zproduct (until m))) (zproduct (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul (Z.mul a (Exp a m)) (Z.of_nat (S m))) (zproduct (until m))) (Z.mul (Z.mul a (Exp a m)) (Z.mul (Z.of_nat (S m)) (zproduct (until m)))) *)
rewrite Zmult_assoc.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.of_nat (S m)) (zproduct (until m))) (zproduct (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul (Z.mul a (Exp a m)) (Z.of_nat (S m))) (zproduct (until m))) (Z.mul (Z.mul (Z.mul a (Exp a m)) (Z.of_nat (S m))) (zproduct (until m))) *)
reflexivity.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
(* Goal: @eq Z (Z.mul (Z.of_nat (S m)) (zproduct (until m))) (zproduct (until (S m))) *)
reflexivity.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
(* Goal: @eq Z (Z.mul (Z.mul a (Z.of_nat (S m))) (zproduct (mapmult a (until m)))) (zproduct (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m)))) *)
reflexivity.
(* Goal: @eq (list Z) (Cons Z (Z.mul a (Z.of_nat (S m))) (mapmult a (until m))) (mapmult a (until (S m))) *)
reflexivity.
Qed.
Lemma until_mapmult_allex :
forall (p : nat) (a : Z),
Prime p ->
~ Mod a 0 p -> allex p (until (pred p)) (mapmult a (until (pred p))).
Proof.
(* Goal: forall (p : nat) (a : Z) (_ : Prime p) (_ : not (Mod a Z0 p)), allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
unfold allex in |- *.
(* Goal: forall (p : nat) (a : Z) (_ : Prime p) (_ : not (Mod a Z0 p)) (x : Z) (_ : inlist Z x (until (Init.Nat.pred p))), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros p a Hprime Ha0 x Hx.
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
elim Hprime.
(* Goal: forall (_ : gt p (S O)) (_ : forall (q : nat) (_ : Divides q p), or (@eq nat q (S O)) (@eq nat q p)), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros Hp Hp1.
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
elim (mod_mult_inv_r a p).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: forall (x0 : Z) (_ : Mod (Z.mul a x0) (Zpos xH) p), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros ra Hra.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
elim (zdiv_rem (Z_of_nat p) (ra * x)).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (x0 : Z) (_ : @ex Z (fun r : Z => and (and (Z.le Z0 r) (Z.lt r (Z.of_nat p))) (@eq Z (Z.mul ra x) (Z.add (Z.mul x0 (Z.of_nat p)) r)))), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros q Hq.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
elim Hq.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (x0 : Z) (_ : and (and (Z.le Z0 x0) (Z.lt x0 (Z.of_nat p))) (@eq Z (Z.mul ra x) (Z.add (Z.mul q (Z.of_nat p)) x0))), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros r Hr.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
elim Hr.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (_ : and (Z.le Z0 r) (Z.lt r (Z.of_nat p))) (_ : @eq Z (Z.mul ra x) (Z.add (Z.mul q (Z.of_nat p)) r)), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
elim H.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: forall (_ : Z.le Z0 r) (_ : Z.lt r (Z.of_nat p)), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
split with (a * r)%Z.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: and (inlist Z (Z.mul a r) (mapmult a (until (Init.Nat.pred p)))) (Mod x (Z.mul a r) p) *)
split.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: inlist Z (Z.mul a r) (mapmult a (until (Init.Nat.pred p))) *)
apply mapmult_image.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: inlist Z r (until (Init.Nat.pred p)) *)
apply until_ok.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: and (Z.lt Z0 r) (Z.le r (Z.of_nat (Init.Nat.pred p))) *)
split.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.lt Z0 r *)
elim (Zle_lt_or_eq 0 r).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, Z.lt Z0 r *)
(* Goal: forall _ : Z.lt Z0 r, Z.lt Z0 r *)
intro.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, Z.lt Z0 r *)
(* Goal: Z.lt Z0 r *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: forall _ : @eq Z Z0 r, Z.lt Z0 r *)
intro.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Z.lt Z0 r *)
rewrite <- H3 in H0.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Z.lt Z0 r *)
rewrite <- Zplus_0_r_reverse in H0.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Z.lt Z0 r *)
elim until_not_0mod with p x.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod x Z0 p *)
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
(* Goal: lt O p *)
apply lt_trans with 1.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod x Z0 p *)
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
(* Goal: lt (S O) p *)
(* Goal: lt O (S O) *)
apply lt_n_Sn.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod x Z0 p *)
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
(* Goal: lt (S O) p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod x Z0 p *)
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod x Z0 p *)
apply mod_mult_cancel_r with (a * ra)%Z.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: not (Mod (Z.mul a ra) Z0 p) *)
(* Goal: Prime p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: not (Mod (Z.mul a ra) Z0 p) *)
intro.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: False *)
elim mod_0not1 with p.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: Mod Z0 (Zpos xH) p *)
(* Goal: gt p (S O) *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: Mod Z0 (Zpos xH) p *)
apply mod_trans with (a * ra)%Z.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: Mod (Z.mul a ra) (Zpos xH) p *)
(* Goal: Mod Z0 (Z.mul a ra) p *)
apply mod_sym.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: Mod (Z.mul a ra) (Zpos xH) p *)
(* Goal: Mod (Z.mul a ra) Z0 p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
(* Goal: Mod (Z.mul a ra) (Zpos xH) p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul a ra)) (Z.mul Z0 (Z.mul a ra)) p *)
rewrite (Zmult_comm a ra).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul x (Z.mul ra a)) (Z.mul Z0 (Z.mul ra a)) p *)
rewrite Zmult_assoc.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul (Z.mul x ra) a) (Z.mul Z0 (Z.mul ra a)) p *)
rewrite (Zmult_comm x ra).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul (Z.mul ra x) a) (Z.mul Z0 (Z.mul ra a)) p *)
rewrite H0.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul (Z.mul q (Z.of_nat p)) a) (Z.mul Z0 (Z.mul ra a)) p *)
simpl in |- *.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: Mod (Z.mul (Z.mul q (Z.of_nat p)) a) Z0 p *)
unfold Mod in |- *.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: @ex Z (fun q0 : Z => @eq Z (Z.mul (Z.mul q (Z.of_nat p)) a) (Z.add Z0 (Z.mul (Z.of_nat p) q0))) *)
split with (q * a)%Z.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z (Z.mul (Z.mul q (Z.of_nat p)) a) (Z.add Z0 (Z.mul (Z.of_nat p) (Z.mul q a))) *)
simpl in |- *.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z (Z.mul (Z.mul q (Z.of_nat p)) a) (Z.mul (Z.of_nat p) (Z.mul q a)) *)
rewrite Zmult_assoc.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z (Z.mul (Z.mul q (Z.of_nat p)) a) (Z.mul (Z.mul (Z.of_nat p) q) a) *)
rewrite (Zmult_comm q).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
(* Goal: @eq Z (Z.mul (Z.mul (Z.of_nat p) q) a) (Z.mul (Z.mul (Z.of_nat p) q) a) *)
reflexivity.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
(* Goal: Z.le Z0 r *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.le r (Z.of_nat (Init.Nat.pred p)) *)
apply Zlt_succ_le.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.lt r (Z.succ (Z.of_nat (Init.Nat.pred p))) *)
rewrite <- Znat.inj_S.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: Z.lt r (Z.of_nat (S (Init.Nat.pred p))) *)
rewrite <- (S_pred p 1).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: lt (S O) p *)
(* Goal: Z.lt r (Z.of_nat p) *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
(* Goal: lt (S O) p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod x (Z.mul a r) p *)
apply mod_mult_cancel_r with ra.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: not (Mod ra Z0 p) *)
(* Goal: Prime p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: not (Mod ra Z0 p) *)
intro.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: False *)
elim mod_0not1 with p.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod Z0 (Zpos xH) p *)
(* Goal: gt p (S O) *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod Z0 (Zpos xH) p *)
apply mod_trans with (ra * a)%Z.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul ra a) (Zpos xH) p *)
(* Goal: Mod Z0 (Z.mul ra a) p *)
change (Mod (0 * a) (ra * a) p) in |- *.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul ra a) (Zpos xH) p *)
(* Goal: Mod (Z.mul Z0 a) (Z.mul ra a) p *)
apply mod_mult_compat.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul ra a) (Zpos xH) p *)
(* Goal: Mod a a p *)
(* Goal: Mod Z0 ra p *)
apply mod_sym.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul ra a) (Zpos xH) p *)
(* Goal: Mod a a p *)
(* Goal: Mod ra Z0 p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul ra a) (Zpos xH) p *)
(* Goal: Mod a a p *)
apply mod_refl.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul ra a) (Zpos xH) p *)
rewrite (Zmult_comm ra a).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
(* Goal: Mod (Z.mul a ra) (Zpos xH) p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul x ra) (Z.mul (Z.mul a r) ra) p *)
rewrite (Zmult_comm x ra).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul ra x) (Z.mul (Z.mul a r) ra) p *)
rewrite H0.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.add (Z.mul q (Z.of_nat p)) r) (Z.mul (Z.mul a r) ra) p *)
rewrite (Zmult_comm a r).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.add (Z.mul q (Z.of_nat p)) r) (Z.mul (Z.mul r a) ra) p *)
rewrite (Zmult_assoc_reverse r a ra).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.add (Z.mul q (Z.of_nat p)) r) (Z.mul r (Z.mul a ra)) p *)
apply mod_trans with r.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod r (Z.mul r (Z.mul a ra)) p *)
(* Goal: Mod (Z.add (Z.mul q (Z.of_nat p)) r) r p *)
split with q.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod r (Z.mul r (Z.mul a ra)) p *)
(* Goal: @eq Z (Z.add (Z.mul q (Z.of_nat p)) r) (Z.add r (Z.mul (Z.of_nat p) q)) *)
rewrite Zplus_comm.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod r (Z.mul r (Z.mul a ra)) p *)
(* Goal: @eq Z (Z.add r (Z.mul q (Z.of_nat p))) (Z.add r (Z.mul (Z.of_nat p) q)) *)
rewrite Zmult_comm.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod r (Z.mul r (Z.mul a ra)) p *)
(* Goal: @eq Z (Z.add r (Z.mul (Z.of_nat p) q)) (Z.add r (Z.mul (Z.of_nat p) q)) *)
reflexivity.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod r (Z.mul r (Z.mul a ra)) p *)
pattern r at 1 in |- *.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: (fun z : Z => Mod z (Z.mul r (Z.mul a ra)) p) r *)
rewrite <- Zmult_1_l with r.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul (Zpos xH) r) (Z.mul r (Z.mul a ra)) p *)
rewrite (Zmult_comm 1 r).
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul r (Zpos xH)) (Z.mul r (Z.mul a ra)) p *)
apply mod_mult_compat.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Zpos xH) (Z.mul a ra) p *)
(* Goal: Mod r r p *)
apply mod_refl.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Zpos xH) (Z.mul a ra) p *)
apply mod_sym.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
(* Goal: Mod (Z.mul a ra) (Zpos xH) p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) Z0 *)
change (Z_of_nat p > Z_of_nat 0)%Z in |- *.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: Z.gt (Z.of_nat p) (Z.of_nat O) *)
apply Znat.inj_gt.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: gt p O *)
apply gt_trans with 1.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: gt (S O) O *)
(* Goal: gt p (S O) *)
assumption.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
(* Goal: gt (S O) O *)
apply gt_Sn_n.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
assumption.
Qed.
Lemma until_nodoubles1 :
forall p : nat, Prime p -> forall n : nat, n < p -> nodoubles p (until n).
Proof.
(* Goal: forall (p : nat) (_ : Prime p) (n : nat) (_ : lt n p), nodoubles p (until n) *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall _ : lt n p, nodoubles p (until n)) (_ : lt (S n) p), nodoubles p (until (S n)) *)
(* Goal: forall _ : lt O p, nodoubles p (until O) *)
intros.
(* Goal: forall (n : nat) (_ : forall _ : lt n p, nodoubles p (until n)) (_ : lt (S n) p), nodoubles p (until (S n)) *)
(* Goal: nodoubles p (until O) *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : forall _ : lt n p, nodoubles p (until n)) (_ : lt (S n) p), nodoubles p (until (S n)) *)
(* Goal: nodoubles p (Nil Z) *)
apply nodoubles_nil.
(* Goal: forall (n : nat) (_ : forall _ : lt n p, nodoubles p (until n)) (_ : lt (S n) p), nodoubles p (until (S n)) *)
intros m IH Hb.
(* Goal: nodoubles p (until (S m)) *)
change (nodoubles p (Cons Z (Z_of_nat (S m)) (until m))) in |- *.
(* Goal: nodoubles p (Cons Z (Z.of_nat (S m)) (until m)) *)
apply nodoubles_ind.
(* Goal: nodoubles p (until m) *)
(* Goal: forall (x : Z) (_ : inlist Z x (until m)), not (Mod (Z.of_nat (S m)) x p) *)
intros.
(* Goal: nodoubles p (until m) *)
(* Goal: not (Mod (Z.of_nat (S m)) x p) *)
intro.
(* Goal: nodoubles p (until m) *)
(* Goal: False *)
elim (Zlt_not_le x (Z_of_nat (S m))).
(* Goal: nodoubles p (until m) *)
(* Goal: Z.le (Z.of_nat (S m)) x *)
(* Goal: Z.lt x (Z.of_nat (S m)) *)
rewrite Znat.inj_S.
(* Goal: nodoubles p (until m) *)
(* Goal: Z.le (Z.of_nat (S m)) x *)
(* Goal: Z.lt x (Z.succ (Z.of_nat m)) *)
apply Zle_lt_succ.
(* Goal: nodoubles p (until m) *)
(* Goal: Z.le (Z.of_nat (S m)) x *)
(* Goal: Z.le x (Z.of_nat m) *)
apply until_le_n.
(* Goal: nodoubles p (until m) *)
(* Goal: Z.le (Z.of_nat (S m)) x *)
(* Goal: inlist Z x (until m) *)
assumption.
(* Goal: nodoubles p (until m) *)
(* Goal: Z.le (Z.of_nat (S m)) x *)
apply Zeq_le.
(* Goal: nodoubles p (until m) *)
(* Goal: @eq Z (Z.of_nat (S m)) x *)
apply mod_repr_eq with p.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
(* Goal: lt O p *)
elim H.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
(* Goal: forall (_ : gt p (S O)) (_ : forall (q : nat) (_ : Divides q p), or (@eq nat q (S O)) (@eq nat q p)), lt O p *)
intros.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
(* Goal: lt O p *)
apply lt_trans with 1.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
(* Goal: lt (S O) p *)
(* Goal: lt O (S O) *)
apply lt_n_Sn.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
(* Goal: lt (S O) p *)
assumption.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: and (Z.lt Z0 (Z.of_nat (S m))) (Z.lt (Z.of_nat (S m)) (Z.of_nat p)) *)
split.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
(* Goal: Z.lt Z0 (Z.of_nat (S m)) *)
change (Z_of_nat 0 < Z_of_nat (S m))%Z in |- *.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
(* Goal: Z.lt (Z.of_nat O) (Z.of_nat (S m)) *)
apply Znat.inj_lt.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
(* Goal: lt O (S m) *)
apply lt_O_Sn.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: Z.lt (Z.of_nat (S m)) (Z.of_nat p) *)
apply Znat.inj_lt.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
(* Goal: lt (S m) p *)
assumption.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: and (Z.lt Z0 x) (Z.lt x (Z.of_nat p)) *)
split.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: Z.lt x (Z.of_nat p) *)
(* Goal: Z.lt Z0 x *)
apply until_pos with m.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: Z.lt x (Z.of_nat p) *)
(* Goal: inlist Z x (until m) *)
assumption.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: Z.lt x (Z.of_nat p) *)
apply Zle_lt_trans with (Z_of_nat m).
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: Z.lt (Z.of_nat m) (Z.of_nat p) *)
(* Goal: Z.le x (Z.of_nat m) *)
apply until_le_n.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: Z.lt (Z.of_nat m) (Z.of_nat p) *)
(* Goal: inlist Z x (until m) *)
assumption.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: Z.lt (Z.of_nat m) (Z.of_nat p) *)
apply Znat.inj_lt.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: lt m p *)
apply le_lt_trans with (S m).
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: lt (S m) p *)
(* Goal: le m (S m) *)
apply le_n_Sn.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
(* Goal: lt (S m) p *)
assumption.
(* Goal: nodoubles p (until m) *)
(* Goal: Mod (Z.of_nat (S m)) x p *)
assumption.
(* Goal: nodoubles p (until m) *)
apply IH.
(* Goal: lt m p *)
apply le_lt_trans with (S m).
(* Goal: lt (S m) p *)
(* Goal: le m (S m) *)
apply le_n_Sn.
(* Goal: lt (S m) p *)
assumption.
Qed.
Lemma until_nodoubles :
forall p : nat, Prime p -> nodoubles p (until (pred p)).
Proof.
(* Goal: forall (p : nat) (_ : Prime p), nodoubles p (until (Init.Nat.pred p)) *)
intros.
(* Goal: nodoubles p (until (Init.Nat.pred p)) *)
apply until_nodoubles1.
(* Goal: lt (Init.Nat.pred p) p *)
(* Goal: Prime p *)
assumption.
(* Goal: lt (Init.Nat.pred p) p *)
apply lt_pred_n_n.
(* Goal: lt O p *)
apply lt_trans with 1.
(* Goal: lt (S O) p *)
(* Goal: lt O (S O) *)
apply lt_n_Sn.
(* Goal: lt (S O) p *)
elim H.
(* Goal: forall (_ : gt p (S O)) (_ : forall (q : nat) (_ : Divides q p), or (@eq nat q (S O)) (@eq nat q p)), lt (S O) p *)
intros.
(* Goal: lt (S O) p *)
assumption.
Qed.
Fixpoint permmod (p : nat) (l1 : Zlist) {struct l1} :
Zlist -> Prop :=
fun l2 : Zlist =>
match l1 with
| Nil => l2 = Nil Z
| Cons x t =>
exists y : Z, inlist Z y l2 /\ Mod x y p /\ permmod p t (zdrop y l2)
end.
Lemma permmod_nil : forall p : nat, permmod p (Nil Z) (Nil Z).
Proof.
(* Goal: forall p : nat, permmod p (Nil Z) (Nil Z) *)
simpl in |- *.
(* Goal: forall _ : nat, @eq Zlist (Nil Z) (Nil Z) *)
intro.
(* Goal: @eq Zlist (Nil Z) (Nil Z) *)
reflexivity.
Qed.
Lemma permmod_drop :
forall (p : nat) (x1 x2 : Z) (l1 l2 : Zlist),
Mod x1 x2 p ->
inlist Z x1 l1 ->
inlist Z x2 l2 -> permmod p (zdrop x1 l1) (zdrop x2 l2) -> permmod p l1 l2.
Proof.
(* Goal: forall (p : nat) (x1 x2 : Z) (l1 l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 l1) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 l1) (zdrop x2 l2)), permmod p l1 l2 *)
simple induction l1.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 l) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 l) (zdrop x2 l2)), permmod p l l2) (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Cons Z a l)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z a l)) (zdrop x2 l2)), permmod p (Cons Z a l) l2 *)
(* Goal: forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Nil Z)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Nil Z)) (zdrop x2 l2)), permmod p (Nil Z) l2 *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 l) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 l) (zdrop x2 l2)), permmod p l l2) (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Cons Z a l)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z a l)) (zdrop x2 l2)), permmod p (Cons Z a l) l2 *)
(* Goal: forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Nil Z)) (_ : inlist Z x2 l2) (_ : @eq Zlist (zdrop x2 l2) (Nil Z)), @eq Zlist l2 (Nil Z) *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 l) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 l) (zdrop x2 l2)), permmod p l l2) (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Cons Z a l)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z a l)) (zdrop x2 l2)), permmod p (Cons Z a l) l2 *)
(* Goal: @eq Zlist l2 (Nil Z) *)
elim H0.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 l) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 l) (zdrop x2 l2)), permmod p l l2) (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Cons Z a l)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z a l)) (zdrop x2 l2)), permmod p (Cons Z a l) l2 *)
intros h t IH.
(* Goal: forall (l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
intros l2 Hm.
(* Goal: forall (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
elim (zeqdec x1 h).
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: forall (_ : @eq Z x1 h) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
intros.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: permmod p (Cons Z h t) l2 *)
simpl in |- *.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y l2) (and (Mod h y p) (permmod p t (zdrop y l2)))) *)
split with x2.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: and (inlist Z x2 l2) (and (Mod h x2 p) (permmod p t (zdrop x2 l2))) *)
split.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: and (Mod h x2 p) (permmod p t (zdrop x2 l2)) *)
(* Goal: inlist Z x2 l2 *)
assumption.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: and (Mod h x2 p) (permmod p t (zdrop x2 l2)) *)
split.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: permmod p t (zdrop x2 l2) *)
(* Goal: Mod h x2 p *)
rewrite <- H.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: permmod p t (zdrop x2 l2) *)
(* Goal: Mod x1 x2 p *)
assumption.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: permmod p t (zdrop x2 l2) *)
rewrite H in H2.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: permmod p t (zdrop x2 l2) *)
rewrite zdrop_head_eq in H2.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: @eq Z h h *)
(* Goal: permmod p t (zdrop x2 l2) *)
assumption.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
(* Goal: @eq Z h h *)
reflexivity.
(* Goal: forall (_ : not (@eq Z x1 h)) (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
intro.
(* Goal: forall (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (zdrop x1 (Cons Z h t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
rewrite zdrop_head_neq.
(* Goal: not (@eq Z x1 h) *)
(* Goal: forall (_ : inlist Z x1 (Cons Z h t)) (_ : inlist Z x2 l2) (_ : permmod p (Cons Z h (zdrop x1 t)) (zdrop x2 l2)), permmod p (Cons Z h t) l2 *)
intros.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (Cons Z h t) l2 *)
elim H2.
(* Goal: not (@eq Z x1 h) *)
(* Goal: forall (x : Z) (_ : and (inlist Z x (zdrop x2 l2)) (and (Mod h x p) (permmod p (zdrop x1 t) (zdrop x (zdrop x2 l2))))), permmod p (Cons Z h t) l2 *)
intros y Hy.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (Cons Z h t) l2 *)
elim Hy.
(* Goal: not (@eq Z x1 h) *)
(* Goal: forall (_ : inlist Z y (zdrop x2 l2)) (_ : and (Mod h y p) (permmod p (zdrop x1 t) (zdrop y (zdrop x2 l2)))), permmod p (Cons Z h t) l2 *)
intros.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (Cons Z h t) l2 *)
elim H4.
(* Goal: not (@eq Z x1 h) *)
(* Goal: forall (_ : Mod h y p) (_ : permmod p (zdrop x1 t) (zdrop y (zdrop x2 l2))), permmod p (Cons Z h t) l2 *)
intros.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (Cons Z h t) l2 *)
split with y.
(* Goal: not (@eq Z x1 h) *)
(* Goal: and (inlist Z y l2) (and (Mod h y p) (permmod p t (zdrop y l2))) *)
split.
(* Goal: not (@eq Z x1 h) *)
(* Goal: and (Mod h y p) (permmod p t (zdrop y l2)) *)
(* Goal: inlist Z y l2 *)
apply zdrop_inlist_weak with x2.
(* Goal: not (@eq Z x1 h) *)
(* Goal: and (Mod h y p) (permmod p t (zdrop y l2)) *)
(* Goal: inlist Z y (zdrop x2 l2) *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: and (Mod h y p) (permmod p t (zdrop y l2)) *)
split.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p t (zdrop y l2) *)
(* Goal: Mod h y p *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p t (zdrop y l2) *)
rewrite zdrop_swap in H6.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p t (zdrop y l2) *)
apply IH.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
(* Goal: inlist Z x1 t *)
(* Goal: Mod x1 x2 p *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
(* Goal: inlist Z x1 t *)
elim (inlist_head_neq Z x1 h t).
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
(* Goal: not (@eq Z x1 h) *)
(* Goal: forall (_ : forall _ : inlist Z x1 (Cons Z h t), inlist Z x1 t) (_ : forall _ : inlist Z x1 t, inlist Z x1 (Cons Z h t)), inlist Z x1 t *)
intros.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
(* Goal: not (@eq Z x1 h) *)
(* Goal: inlist Z x1 t *)
apply H7.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
(* Goal: not (@eq Z x1 h) *)
(* Goal: inlist Z x1 (Cons Z h t) *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
(* Goal: not (@eq Z x1 h) *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
elim (zeqdec x2 y).
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: forall _ : not (@eq Z x2 y), inlist Z x2 (zdrop y l2) *)
(* Goal: forall _ : @eq Z x2 y, inlist Z x2 (zdrop y l2) *)
intro.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: forall _ : not (@eq Z x2 y), inlist Z x2 (zdrop y l2) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
rewrite H7.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: forall _ : not (@eq Z x2 y), inlist Z x2 (zdrop y l2) *)
(* Goal: inlist Z y (zdrop y l2) *)
rewrite H7 in H3.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: forall _ : not (@eq Z x2 y), inlist Z x2 (zdrop y l2) *)
(* Goal: inlist Z y (zdrop y l2) *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: forall _ : not (@eq Z x2 y), inlist Z x2 (zdrop y l2) *)
intro.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 (zdrop y l2) *)
apply zdrop_neq_inlist.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 l2 *)
(* Goal: not (@eq Z x2 y) *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
(* Goal: inlist Z x2 l2 *)
assumption.
(* Goal: not (@eq Z x1 h) *)
(* Goal: permmod p (zdrop x1 t) (zdrop x2 (zdrop y l2)) *)
assumption.
(* Goal: not (@eq Z x1 h) *)
assumption.
Qed.
Lemma permmod_drop_cons :
forall (p : nat) (x1 x2 : Z) (t1 l2 : Zlist),
Mod x1 x2 p ->
inlist Z x2 l2 -> permmod p t1 (zdrop x2 l2) -> permmod p (Cons Z x1 t1) l2.
Proof.
(* Goal: forall (p : nat) (x1 x2 : Z) (t1 l2 : Zlist) (_ : Mod x1 x2 p) (_ : inlist Z x2 l2) (_ : permmod p t1 (zdrop x2 l2)), permmod p (Cons Z x1 t1) l2 *)
intros.
(* Goal: permmod p (Cons Z x1 t1) l2 *)
apply permmod_drop with x1 x2.
(* Goal: permmod p (zdrop x1 (Cons Z x1 t1)) (zdrop x2 l2) *)
(* Goal: inlist Z x2 l2 *)
(* Goal: inlist Z x1 (Cons Z x1 t1) *)
(* Goal: Mod x1 x2 p *)
assumption.
(* Goal: permmod p (zdrop x1 (Cons Z x1 t1)) (zdrop x2 l2) *)
(* Goal: inlist Z x2 l2 *)
(* Goal: inlist Z x1 (Cons Z x1 t1) *)
apply inlist_head_eq.
(* Goal: permmod p (zdrop x1 (Cons Z x1 t1)) (zdrop x2 l2) *)
(* Goal: inlist Z x2 l2 *)
(* Goal: @eq Z x1 x1 *)
reflexivity.
(* Goal: permmod p (zdrop x1 (Cons Z x1 t1)) (zdrop x2 l2) *)
(* Goal: inlist Z x2 l2 *)
assumption.
(* Goal: permmod p (zdrop x1 (Cons Z x1 t1)) (zdrop x2 l2) *)
rewrite zdrop_head_eq.
(* Goal: @eq Z x1 x1 *)
(* Goal: permmod p t1 (zdrop x2 l2) *)
assumption.
(* Goal: @eq Z x1 x1 *)
reflexivity.
Qed.
Lemma permmod_cons_extend :
forall (p : nat) (x1 x2 : Z) (l1 l2 : Zlist),
permmod p l1 l2 -> Mod x1 x2 p -> permmod p (Cons Z x1 l1) (Cons Z x2 l2).
Proof.
(* Goal: forall (p : nat) (x1 x2 : Z) (l1 l2 : Zlist) (_ : permmod p l1 l2) (_ : Mod x1 x2 p), permmod p (Cons Z x1 l1) (Cons Z x2 l2) *)
intros.
(* Goal: permmod p (Cons Z x1 l1) (Cons Z x2 l2) *)
apply permmod_drop with x1 x2.
(* Goal: permmod p (zdrop x1 (Cons Z x1 l1)) (zdrop x2 (Cons Z x2 l2)) *)
(* Goal: inlist Z x2 (Cons Z x2 l2) *)
(* Goal: inlist Z x1 (Cons Z x1 l1) *)
(* Goal: Mod x1 x2 p *)
assumption.
(* Goal: permmod p (zdrop x1 (Cons Z x1 l1)) (zdrop x2 (Cons Z x2 l2)) *)
(* Goal: inlist Z x2 (Cons Z x2 l2) *)
(* Goal: inlist Z x1 (Cons Z x1 l1) *)
apply inlist_head_eq.
(* Goal: permmod p (zdrop x1 (Cons Z x1 l1)) (zdrop x2 (Cons Z x2 l2)) *)
(* Goal: inlist Z x2 (Cons Z x2 l2) *)
(* Goal: @eq Z x1 x1 *)
reflexivity.
(* Goal: permmod p (zdrop x1 (Cons Z x1 l1)) (zdrop x2 (Cons Z x2 l2)) *)
(* Goal: inlist Z x2 (Cons Z x2 l2) *)
apply inlist_head_eq.
(* Goal: permmod p (zdrop x1 (Cons Z x1 l1)) (zdrop x2 (Cons Z x2 l2)) *)
(* Goal: @eq Z x2 x2 *)
reflexivity.
(* Goal: permmod p (zdrop x1 (Cons Z x1 l1)) (zdrop x2 (Cons Z x2 l2)) *)
rewrite zdrop_head_eq.
(* Goal: @eq Z x1 x1 *)
(* Goal: permmod p l1 (zdrop x2 (Cons Z x2 l2)) *)
rewrite zdrop_head_eq.
(* Goal: @eq Z x1 x1 *)
(* Goal: @eq Z x2 x2 *)
(* Goal: permmod p l1 l2 *)
assumption.
(* Goal: @eq Z x1 x1 *)
(* Goal: @eq Z x2 x2 *)
reflexivity.
(* Goal: @eq Z x1 x1 *)
reflexivity.
Qed.
Lemma permmod_length :
forall (p : nat) (l1 l2 : Zlist),
permmod p l1 l2 -> length Z l1 = length Z l2.
Proof.
(* Goal: forall (p : nat) (l1 l2 : Zlist) (_ : permmod p l1 l2), @eq nat (length Z l1) (length Z l2) *)
simple induction l1.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), @eq nat (length Z l) (length Z l2)) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), @eq nat (length Z (Cons Z a l)) (length Z l2) *)
(* Goal: forall (l2 : Zlist) (_ : permmod p (Nil Z) l2), @eq nat (length Z (Nil Z)) (length Z l2) *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), @eq nat (length Z l) (length Z l2)) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), @eq nat (length Z (Cons Z a l)) (length Z l2) *)
(* Goal: forall (l2 : Zlist) (_ : @eq Zlist l2 (Nil Z)), @eq nat O (length Z l2) *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), @eq nat (length Z l) (length Z l2)) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), @eq nat (length Z (Cons Z a l)) (length Z l2) *)
(* Goal: @eq nat O (length Z l2) *)
rewrite H.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), @eq nat (length Z l) (length Z l2)) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), @eq nat (length Z (Cons Z a l)) (length Z l2) *)
(* Goal: @eq nat O (length Z (Nil Z)) *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), @eq nat (length Z l) (length Z l2)) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), @eq nat (length Z (Cons Z a l)) (length Z l2) *)
(* Goal: @eq nat O O *)
reflexivity.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), @eq nat (length Z l) (length Z l2)) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), @eq nat (length Z (Cons Z a l)) (length Z l2) *)
intros h t IH.
(* Goal: forall (l2 : Zlist) (_ : permmod p (Cons Z h t) l2), @eq nat (length Z (Cons Z h t)) (length Z l2) *)
simpl in |- *.
(* Goal: forall (l2 : Zlist) (_ : @ex Z (fun y : Z => and (inlist Z y l2) (and (Mod h y p) (permmod p t (zdrop y l2))))), @eq nat (S (length Z t)) (length Z l2) *)
intros.
(* Goal: @eq nat (S (length Z t)) (length Z l2) *)
elim H.
(* Goal: forall (x : Z) (_ : and (inlist Z x l2) (and (Mod h x p) (permmod p t (zdrop x l2)))), @eq nat (S (length Z t)) (length Z l2) *)
intros y Hy.
(* Goal: @eq nat (S (length Z t)) (length Z l2) *)
elim Hy.
(* Goal: forall (_ : inlist Z y l2) (_ : and (Mod h y p) (permmod p t (zdrop y l2))), @eq nat (S (length Z t)) (length Z l2) *)
intros.
(* Goal: @eq nat (S (length Z t)) (length Z l2) *)
elim H1.
(* Goal: forall (_ : Mod h y p) (_ : permmod p t (zdrop y l2)), @eq nat (S (length Z t)) (length Z l2) *)
intros.
(* Goal: @eq nat (S (length Z t)) (length Z l2) *)
rewrite (IH (zdrop y l2)).
(* Goal: permmod p t (zdrop y l2) *)
(* Goal: @eq nat (S (length Z (zdrop y l2))) (length Z l2) *)
rewrite zdrop_length with y l2.
(* Goal: permmod p t (zdrop y l2) *)
(* Goal: inlist Z y l2 *)
(* Goal: @eq nat (length Z l2) (length Z l2) *)
reflexivity.
(* Goal: permmod p t (zdrop y l2) *)
(* Goal: inlist Z y l2 *)
assumption.
(* Goal: permmod p t (zdrop y l2) *)
assumption.
Qed.
Lemma permmod_refl : forall (p : nat) (l : Zlist), permmod p l l.
Proof.
(* Goal: forall (p : nat) (l : Zlist), permmod p l l *)
simple induction l.
(* Goal: forall (a : Z) (l : list Z) (_ : permmod p l l), permmod p (Cons Z a l) (Cons Z a l) *)
(* Goal: permmod p (Nil Z) (Nil Z) *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : permmod p l l), permmod p (Cons Z a l) (Cons Z a l) *)
(* Goal: @eq Zlist (Nil Z) (Nil Z) *)
reflexivity.
(* Goal: forall (a : Z) (l : list Z) (_ : permmod p l l), permmod p (Cons Z a l) (Cons Z a l) *)
intros h t IH.
(* Goal: permmod p (Cons Z h t) (Cons Z h t) *)
split with h.
(* Goal: and (inlist Z h (Cons Z h t)) (and (Mod h h p) (permmod p t (zdrop h (Cons Z h t)))) *)
split.
(* Goal: and (Mod h h p) (permmod p t (zdrop h (Cons Z h t))) *)
(* Goal: inlist Z h (Cons Z h t) *)
apply inlist_head_eq.
(* Goal: and (Mod h h p) (permmod p t (zdrop h (Cons Z h t))) *)
(* Goal: @eq Z h h *)
reflexivity.
(* Goal: and (Mod h h p) (permmod p t (zdrop h (Cons Z h t))) *)
split.
(* Goal: permmod p t (zdrop h (Cons Z h t)) *)
(* Goal: Mod h h p *)
apply mod_refl.
(* Goal: permmod p t (zdrop h (Cons Z h t)) *)
rewrite zdrop_head_eq.
(* Goal: @eq Z h h *)
(* Goal: permmod p t t *)
assumption.
(* Goal: @eq Z h h *)
reflexivity.
Qed.
Lemma permmod_sym :
forall (p : nat) (l1 l2 : Zlist), permmod p l1 l2 -> permmod p l2 l1.
Proof.
(* Goal: forall (p : nat) (l1 l2 : Zlist) (_ : permmod p l1 l2), permmod p l2 l1 *)
simple induction l1.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), permmod p l2 l) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), permmod p l2 (Cons Z a l) *)
(* Goal: forall (l2 : Zlist) (_ : permmod p (Nil Z) l2), permmod p l2 (Nil Z) *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), permmod p l2 l) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), permmod p l2 (Cons Z a l) *)
(* Goal: forall (l2 : Zlist) (_ : @eq Zlist l2 (Nil Z)), permmod p l2 (Nil Z) *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), permmod p l2 l) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), permmod p l2 (Cons Z a l) *)
(* Goal: permmod p l2 (Nil Z) *)
rewrite H.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), permmod p l2 l) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), permmod p l2 (Cons Z a l) *)
(* Goal: permmod p (Nil Z) (Nil Z) *)
apply permmod_nil.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l2 : Zlist) (_ : permmod p l l2), permmod p l2 l) (l2 : Zlist) (_ : permmod p (Cons Z a l) l2), permmod p l2 (Cons Z a l) *)
intros h1 t1 IH1.
(* Goal: forall (l2 : Zlist) (_ : permmod p (Cons Z h1 t1) l2), permmod p l2 (Cons Z h1 t1) *)
intros.
(* Goal: permmod p l2 (Cons Z h1 t1) *)
elim H.
(* Goal: forall (x : Z) (_ : and (inlist Z x l2) (and (Mod h1 x p) (permmod p t1 (zdrop x l2)))), permmod p l2 (Cons Z h1 t1) *)
intros y Hy.
(* Goal: permmod p l2 (Cons Z h1 t1) *)
elim Hy.
(* Goal: forall (_ : inlist Z y l2) (_ : and (Mod h1 y p) (permmod p t1 (zdrop y l2))), permmod p l2 (Cons Z h1 t1) *)
intros.
(* Goal: permmod p l2 (Cons Z h1 t1) *)
elim H1.
(* Goal: forall (_ : Mod h1 y p) (_ : permmod p t1 (zdrop y l2)), permmod p l2 (Cons Z h1 t1) *)
intros.
(* Goal: permmod p l2 (Cons Z h1 t1) *)
apply permmod_drop with y h1.
(* Goal: permmod p (zdrop y l2) (zdrop h1 (Cons Z h1 t1)) *)
(* Goal: inlist Z h1 (Cons Z h1 t1) *)
(* Goal: inlist Z y l2 *)
(* Goal: Mod y h1 p *)
apply mod_sym.
(* Goal: permmod p (zdrop y l2) (zdrop h1 (Cons Z h1 t1)) *)
(* Goal: inlist Z h1 (Cons Z h1 t1) *)
(* Goal: inlist Z y l2 *)
(* Goal: Mod h1 y p *)
assumption.
(* Goal: permmod p (zdrop y l2) (zdrop h1 (Cons Z h1 t1)) *)
(* Goal: inlist Z h1 (Cons Z h1 t1) *)
(* Goal: inlist Z y l2 *)
assumption.
(* Goal: permmod p (zdrop y l2) (zdrop h1 (Cons Z h1 t1)) *)
(* Goal: inlist Z h1 (Cons Z h1 t1) *)
apply inlist_head_eq.
(* Goal: permmod p (zdrop y l2) (zdrop h1 (Cons Z h1 t1)) *)
(* Goal: @eq Z h1 h1 *)
reflexivity.
(* Goal: permmod p (zdrop y l2) (zdrop h1 (Cons Z h1 t1)) *)
rewrite zdrop_head_eq.
(* Goal: @eq Z h1 h1 *)
(* Goal: permmod p (zdrop y l2) t1 *)
apply IH1.
(* Goal: @eq Z h1 h1 *)
(* Goal: permmod p t1 (zdrop y l2) *)
assumption.
(* Goal: @eq Z h1 h1 *)
reflexivity.
Qed.
Lemma permmod_product :
forall (l0 l1 : Zlist) (p : nat),
permmod p l0 l1 -> Mod (zproduct l0) (zproduct l1) p.
Proof.
(* Goal: forall (l0 l1 : Zlist) (p : nat) (_ : permmod p l0 l1), Mod (zproduct l0) (zproduct l1) p *)
simple induction l0.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (p : nat) (_ : permmod p l l1), Mod (zproduct l) (zproduct l1) p) (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z a l) l1), Mod (zproduct (Cons Z a l)) (zproduct l1) p *)
(* Goal: forall (l1 : Zlist) (p : nat) (_ : permmod p (Nil Z) l1), Mod (zproduct (Nil Z)) (zproduct l1) p *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (p : nat) (_ : permmod p l l1), Mod (zproduct l) (zproduct l1) p) (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z a l) l1), Mod (zproduct (Cons Z a l)) (zproduct l1) p *)
(* Goal: forall (l1 : Zlist) (p : nat) (_ : @eq Zlist l1 (Nil Z)), Mod (Zpos xH) (zproduct l1) p *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (p : nat) (_ : permmod p l l1), Mod (zproduct l) (zproduct l1) p) (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z a l) l1), Mod (zproduct (Cons Z a l)) (zproduct l1) p *)
(* Goal: Mod (Zpos xH) (zproduct l1) p *)
rewrite H.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (p : nat) (_ : permmod p l l1), Mod (zproduct l) (zproduct l1) p) (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z a l) l1), Mod (zproduct (Cons Z a l)) (zproduct l1) p *)
(* Goal: Mod (Zpos xH) (zproduct (Nil Z)) p *)
simpl in |- *.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (p : nat) (_ : permmod p l l1), Mod (zproduct l) (zproduct l1) p) (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z a l) l1), Mod (zproduct (Cons Z a l)) (zproduct l1) p *)
(* Goal: Mod (Zpos xH) (Zpos xH) p *)
apply mod_refl.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (p : nat) (_ : permmod p l l1), Mod (zproduct l) (zproduct l1) p) (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z a l) l1), Mod (zproduct (Cons Z a l)) (zproduct l1) p *)
intros h t IH.
(* Goal: forall (l1 : Zlist) (p : nat) (_ : permmod p (Cons Z h t) l1), Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
intros.
(* Goal: Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
elim H.
(* Goal: forall (x : Z) (_ : and (inlist Z x l1) (and (Mod h x p) (permmod p t (zdrop x l1)))), Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
intros.
(* Goal: Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
elim H0.
(* Goal: forall (_ : inlist Z x l1) (_ : and (Mod h x p) (permmod p t (zdrop x l1))), Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
intros.
(* Goal: Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
elim H2.
(* Goal: forall (_ : Mod h x p) (_ : permmod p t (zdrop x l1)), Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
intros.
(* Goal: Mod (zproduct (Cons Z h t)) (zproduct l1) p *)
simpl in |- *.
(* Goal: Mod (Z.mul h (zproduct t)) (zproduct l1) p *)
rewrite <- zdrop_product with x l1.
(* Goal: inlist Z x l1 *)
(* Goal: Mod (Z.mul h (zproduct t)) (Z.mul x (zproduct (zdrop x l1))) p *)
apply mod_mult_compat.
(* Goal: inlist Z x l1 *)
(* Goal: Mod (zproduct t) (zproduct (zdrop x l1)) p *)
(* Goal: Mod h x p *)
assumption.
(* Goal: inlist Z x l1 *)
(* Goal: Mod (zproduct t) (zproduct (zdrop x l1)) p *)
apply IH.
(* Goal: inlist Z x l1 *)
(* Goal: permmod p t (zdrop x l1) *)
assumption.
(* Goal: inlist Z x l1 *)
assumption.
Qed.
Lemma allex_permmod :
forall (p : nat) (l0 l1 : Zlist),
length Z l0 = length Z l1 ->
(forall x0 : Z,
inlist Z x0 l0 ->
exists x1 : Z,
inlist Z x1 l1 /\ Mod x0 x1 p /\ permmod p (zdrop x0 l0) (zdrop x1 l1)) ->
permmod p l0 l1.
Proof.
(* Goal: forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat (length Z l0) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l1))))), permmod p l0 l1 *)
simple induction l0.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : @eq nat (length Z l) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l) (zdrop x1 l1))))), permmod p l l1) (l1 : Zlist) (_ : @eq nat (length Z (Cons Z a l)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z a l)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z a l)) (zdrop x1 l1))))), permmod p (Cons Z a l) l1 *)
(* Goal: forall (l1 : Zlist) (_ : @eq nat (length Z (Nil Z)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 l1))))), permmod p (Nil Z) l1 *)
simple induction l1.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : @eq nat (length Z l) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l) (zdrop x1 l1))))), permmod p l l1) (l1 : Zlist) (_ : @eq nat (length Z (Cons Z a l)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z a l)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z a l)) (zdrop x1 l1))))), permmod p (Cons Z a l) l1 *)
(* Goal: forall (a : Z) (l : list Z) (_ : forall (_ : @eq nat (length Z (Nil Z)) (length Z l)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 l) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 l))))), permmod p (Nil Z) l) (_ : @eq nat (length Z (Nil Z)) (length Z (Cons Z a l))) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 (Cons Z a l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 (Cons Z a l)))))), permmod p (Nil Z) (Cons Z a l) *)
(* Goal: forall (_ : @eq nat (length Z (Nil Z)) (length Z (Nil Z))) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 (Nil Z)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 (Nil Z)))))), permmod p (Nil Z) (Nil Z) *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : @eq nat (length Z l) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l) (zdrop x1 l1))))), permmod p l l1) (l1 : Zlist) (_ : @eq nat (length Z (Cons Z a l)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z a l)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z a l)) (zdrop x1 l1))))), permmod p (Cons Z a l) l1 *)
(* Goal: forall (a : Z) (l : list Z) (_ : forall (_ : @eq nat (length Z (Nil Z)) (length Z l)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 l) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 l))))), permmod p (Nil Z) l) (_ : @eq nat (length Z (Nil Z)) (length Z (Cons Z a l))) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 (Cons Z a l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 (Cons Z a l)))))), permmod p (Nil Z) (Cons Z a l) *)
(* Goal: permmod p (Nil Z) (Nil Z) *)
apply permmod_nil.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : @eq nat (length Z l) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l) (zdrop x1 l1))))), permmod p l l1) (l1 : Zlist) (_ : @eq nat (length Z (Cons Z a l)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z a l)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z a l)) (zdrop x1 l1))))), permmod p (Cons Z a l) l1 *)
(* Goal: forall (a : Z) (l : list Z) (_ : forall (_ : @eq nat (length Z (Nil Z)) (length Z l)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 l) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 l))))), permmod p (Nil Z) l) (_ : @eq nat (length Z (Nil Z)) (length Z (Cons Z a l))) (_ : forall (x0 : Z) (_ : inlist Z x0 (Nil Z)), @ex Z (fun x1 : Z => and (inlist Z x1 (Cons Z a l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Nil Z)) (zdrop x1 (Cons Z a l)))))), permmod p (Nil Z) (Cons Z a l) *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : @eq nat (length Z l) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l) (zdrop x1 l1))))), permmod p l l1) (l1 : Zlist) (_ : @eq nat (length Z (Cons Z a l)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z a l)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z a l)) (zdrop x1 l1))))), permmod p (Cons Z a l) l1 *)
(* Goal: permmod p (Nil Z) (Cons Z a l) *)
discriminate H0.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : @eq nat (length Z l) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 l), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l) (zdrop x1 l1))))), permmod p l l1) (l1 : Zlist) (_ : @eq nat (length Z (Cons Z a l)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z a l)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z a l)) (zdrop x1 l1))))), permmod p (Cons Z a l) l1 *)
intros h0 t0 IH0.
(* Goal: forall (l1 : Zlist) (_ : @eq nat (length Z (Cons Z h0 t0)) (length Z l1)) (_ : forall (x0 : Z) (_ : inlist Z x0 (Cons Z h0 t0)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 (Cons Z h0 t0)) (zdrop x1 l1))))), permmod p (Cons Z h0 t0) l1 *)
intros.
(* Goal: permmod p (Cons Z h0 t0) l1 *)
elim (H0 h0).
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: forall (x : Z) (_ : and (inlist Z x l1) (and (Mod h0 x p) (permmod p (zdrop h0 (Cons Z h0 t0)) (zdrop x l1)))), permmod p (Cons Z h0 t0) l1 *)
intro x1.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: forall _ : and (inlist Z x1 l1) (and (Mod h0 x1 p) (permmod p (zdrop h0 (Cons Z h0 t0)) (zdrop x1 l1))), permmod p (Cons Z h0 t0) l1 *)
intros.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: permmod p (Cons Z h0 t0) l1 *)
elim H1.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: forall (_ : inlist Z x1 l1) (_ : and (Mod h0 x1 p) (permmod p (zdrop h0 (Cons Z h0 t0)) (zdrop x1 l1))), permmod p (Cons Z h0 t0) l1 *)
intros.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: permmod p (Cons Z h0 t0) l1 *)
elim H3.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: forall (_ : Mod h0 x1 p) (_ : permmod p (zdrop h0 (Cons Z h0 t0)) (zdrop x1 l1)), permmod p (Cons Z h0 t0) l1 *)
intros.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: permmod p (Cons Z h0 t0) l1 *)
rewrite zdrop_head_eq in H5.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: @eq Z h0 h0 *)
(* Goal: permmod p (Cons Z h0 t0) l1 *)
apply permmod_drop_cons with x1.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: @eq Z h0 h0 *)
(* Goal: permmod p t0 (zdrop x1 l1) *)
(* Goal: inlist Z x1 l1 *)
(* Goal: Mod h0 x1 p *)
assumption.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: @eq Z h0 h0 *)
(* Goal: permmod p t0 (zdrop x1 l1) *)
(* Goal: inlist Z x1 l1 *)
assumption.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: @eq Z h0 h0 *)
(* Goal: permmod p t0 (zdrop x1 l1) *)
assumption.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
(* Goal: @eq Z h0 h0 *)
reflexivity.
(* Goal: inlist Z h0 (Cons Z h0 t0) *)
apply inlist_head_eq.
(* Goal: @eq Z h0 h0 *)
reflexivity.
Qed.
Lemma permmod_allex :
forall (p : nat) (l0 l1 : Zlist),
permmod p l0 l1 ->
forall x : Z,
inlist Z x l0 ->
exists y : Z,
inlist Z y l1 /\ Mod x y p /\ permmod p (zdrop x l0) (zdrop y l1).
Proof.
(* Goal: forall (p : nat) (l0 l1 : Zlist) (_ : permmod p l0 l1) (x : Z) (_ : inlist Z x l0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x l0) (zdrop y l1)))) *)
simple induction l0.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : permmod p l l1) (x : Z) (_ : inlist Z x l), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x l) (zdrop y l1))))) (l1 : Zlist) (_ : permmod p (Cons Z a l) l1) (x : Z) (_ : inlist Z x (Cons Z a l)), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z a l)) (zdrop y l1)))) *)
(* Goal: forall (l1 : Zlist) (_ : permmod p (Nil Z) l1) (x : Z) (_ : inlist Z x (Nil Z)), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Nil Z)) (zdrop y l1)))) *)
intros.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : permmod p l l1) (x : Z) (_ : inlist Z x l), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x l) (zdrop y l1))))) (l1 : Zlist) (_ : permmod p (Cons Z a l) l1) (x : Z) (_ : inlist Z x (Cons Z a l)), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z a l)) (zdrop y l1)))) *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Nil Z)) (zdrop y l1)))) *)
elim H0.
(* Goal: forall (a : Z) (l : list Z) (_ : forall (l1 : Zlist) (_ : permmod p l l1) (x : Z) (_ : inlist Z x l), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x l) (zdrop y l1))))) (l1 : Zlist) (_ : permmod p (Cons Z a l) l1) (x : Z) (_ : inlist Z x (Cons Z a l)), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z a l)) (zdrop y l1)))) *)
intros h0 t0 IH0.
(* Goal: forall (l1 : Zlist) (_ : permmod p (Cons Z h0 t0) l1) (x : Z) (_ : inlist Z x (Cons Z h0 t0)), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros.
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim H.
(* Goal: forall (x0 : Z) (_ : and (inlist Z x0 l1) (and (Mod h0 x0 p) (permmod p t0 (zdrop x0 l1)))), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros h1 Hh1.
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim Hh1.
(* Goal: forall (_ : inlist Z h1 l1) (_ : and (Mod h0 h1 p) (permmod p t0 (zdrop h1 l1))), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros.
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim H2.
(* Goal: forall (_ : Mod h0 h1 p) (_ : permmod p t0 (zdrop h1 l1)), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros.
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim (zeqdec x h0).
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: forall _ : @eq Z x h0, @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intro.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
split with h1.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: and (inlist Z h1 l1) (and (Mod x h1 p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop h1 l1))) *)
split.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: and (Mod x h1 p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop h1 l1)) *)
(* Goal: inlist Z h1 l1 *)
assumption.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: and (Mod x h1 p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop h1 l1)) *)
split.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: permmod p (zdrop x (Cons Z h0 t0)) (zdrop h1 l1) *)
(* Goal: Mod x h1 p *)
rewrite H5.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: permmod p (zdrop x (Cons Z h0 t0)) (zdrop h1 l1) *)
(* Goal: Mod h0 h1 p *)
assumption.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: permmod p (zdrop x (Cons Z h0 t0)) (zdrop h1 l1) *)
rewrite zdrop_head_eq.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: @eq Z x h0 *)
(* Goal: permmod p t0 (zdrop h1 l1) *)
assumption.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
(* Goal: @eq Z x h0 *)
assumption.
(* Goal: forall _ : not (@eq Z x h0), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intro.
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim (IH0 (zdrop h1 l1) H4 x).
(* Goal: inlist Z x t0 *)
(* Goal: forall (x0 : Z) (_ : and (inlist Z x0 (zdrop h1 l1)) (and (Mod x x0 p) (permmod p (zdrop x t0) (zdrop x0 (zdrop h1 l1))))), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros y Hy.
(* Goal: inlist Z x t0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim Hy.
(* Goal: inlist Z x t0 *)
(* Goal: forall (_ : inlist Z y (zdrop h1 l1)) (_ : and (Mod x y p) (permmod p (zdrop x t0) (zdrop y (zdrop h1 l1)))), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros.
(* Goal: inlist Z x t0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
elim H7.
(* Goal: inlist Z x t0 *)
(* Goal: forall (_ : Mod x y p) (_ : permmod p (zdrop x t0) (zdrop y (zdrop h1 l1))), @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
intros.
(* Goal: inlist Z x t0 *)
(* Goal: @ex Z (fun y : Z => and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)))) *)
split with y.
(* Goal: inlist Z x t0 *)
(* Goal: and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1))) *)
split.
(* Goal: inlist Z x t0 *)
(* Goal: and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)) *)
(* Goal: inlist Z y l1 *)
apply zdrop_inlist_weak with h1.
(* Goal: inlist Z x t0 *)
(* Goal: and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)) *)
(* Goal: inlist Z y (zdrop h1 l1) *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: and (Mod x y p) (permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1)) *)
split.
(* Goal: inlist Z x t0 *)
(* Goal: permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1) *)
(* Goal: Mod x y p *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: permmod p (zdrop x (Cons Z h0 t0)) (zdrop y l1) *)
rewrite zdrop_head_neq.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: permmod p (Cons Z h0 (zdrop x t0)) (zdrop y l1) *)
split with h1.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (inlist Z h1 (zdrop y l1)) (and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1)))) *)
split.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: inlist Z h1 (zdrop y l1) *)
elim (zeqdec h1 y).
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: forall _ : not (@eq Z h1 y), inlist Z h1 (zdrop y l1) *)
(* Goal: forall _ : @eq Z h1 y, inlist Z h1 (zdrop y l1) *)
intro.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: forall _ : not (@eq Z h1 y), inlist Z h1 (zdrop y l1) *)
(* Goal: inlist Z h1 (zdrop y l1) *)
rewrite H10 in H6.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: forall _ : not (@eq Z h1 y), inlist Z h1 (zdrop y l1) *)
(* Goal: inlist Z h1 (zdrop y l1) *)
rewrite H10.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: forall _ : not (@eq Z h1 y), inlist Z h1 (zdrop y l1) *)
(* Goal: inlist Z y (zdrop y l1) *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: forall _ : not (@eq Z h1 y), inlist Z h1 (zdrop y l1) *)
intro.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: inlist Z h1 (zdrop y l1) *)
apply zdrop_neq_inlist.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: inlist Z h1 l1 *)
(* Goal: not (@eq Z h1 y) *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
(* Goal: inlist Z h1 l1 *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: and (Mod h0 h1 p) (permmod p (zdrop x t0) (zdrop h1 (zdrop y l1))) *)
split.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: permmod p (zdrop x t0) (zdrop h1 (zdrop y l1)) *)
(* Goal: Mod h0 h1 p *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: permmod p (zdrop x t0) (zdrop h1 (zdrop y l1)) *)
rewrite zdrop_swap.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
(* Goal: permmod p (zdrop x t0) (zdrop y (zdrop h1 l1)) *)
assumption.
(* Goal: inlist Z x t0 *)
(* Goal: not (@eq Z x h0) *)
assumption.
(* Goal: inlist Z x t0 *)
elim (inlist_head_neq Z x h0 t0).
(* Goal: not (@eq Z x h0) *)
(* Goal: forall (_ : forall _ : inlist Z x (Cons Z h0 t0), inlist Z x t0) (_ : forall _ : inlist Z x t0, inlist Z x (Cons Z h0 t0)), inlist Z x t0 *)
intros.
(* Goal: not (@eq Z x h0) *)
(* Goal: inlist Z x t0 *)
apply H6.
(* Goal: not (@eq Z x h0) *)
(* Goal: inlist Z x (Cons Z h0 t0) *)
assumption.
(* Goal: not (@eq Z x h0) *)
assumption.
Qed.
Lemma permmod_trans1 :
forall (n p : nat) (l0 l1 l2 : Zlist),
length Z l0 = n ->
length Z l1 = n ->
length Z l2 = n -> permmod p l0 l1 -> permmod p l1 l2 -> permmod p l0 l2.
Proof.
(* Goal: forall (n p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
(* Goal: forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) O) (_ : @eq nat (length Z l1) O) (_ : @eq nat (length Z l2) O) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
intros.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
(* Goal: permmod p l0 l2 *)
rewrite length_0 with Z l0.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: permmod p (Nil Z) l2 *)
rewrite length_0 with Z l2.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: @eq nat (length Z l2) O *)
(* Goal: permmod p (Nil Z) (Nil Z) *)
apply permmod_nil.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: @eq nat (length Z l2) O *)
assumption.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
(* Goal: @eq nat (length Z l0) O *)
assumption.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) n) (_ : @eq nat (length Z l1) n) (_ : @eq nat (length Z l2) n) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2) (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S n)) (_ : @eq nat (length Z l1) (S n)) (_ : @eq nat (length Z l2) (S n)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
intros m IH.
(* Goal: forall (p : nat) (l0 l1 l2 : Zlist) (_ : @eq nat (length Z l0) (S m)) (_ : @eq nat (length Z l1) (S m)) (_ : @eq nat (length Z l2) (S m)) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
intros p l0 l1 l2 Hl0 Hl1 Hl2 H01 H12.
(* Goal: permmod p l0 l2 *)
apply allex_permmod.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
(* Goal: @eq nat (length Z l0) (length Z l2) *)
transitivity (length Z l1).
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
(* Goal: @eq nat (length Z l1) (length Z l2) *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
apply permmod_length with p.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
(* Goal: @eq nat (length Z l1) (length Z l2) *)
(* Goal: permmod p l0 l1 *)
assumption.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
(* Goal: @eq nat (length Z l1) (length Z l2) *)
apply permmod_length with p.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
(* Goal: permmod p l1 l2 *)
assumption.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros x0 Hx0.
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
elim (permmod_allex p l0 l1 H01 x0).
(* Goal: inlist Z x0 l0 *)
(* Goal: forall (x : Z) (_ : and (inlist Z x l1) (and (Mod x0 x p) (permmod p (zdrop x0 l0) (zdrop x l1)))), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros x1 H0.
(* Goal: inlist Z x0 l0 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
elim H0.
(* Goal: inlist Z x0 l0 *)
(* Goal: forall (_ : inlist Z x1 l1) (_ : and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l1))), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros Hx1 H1.
(* Goal: inlist Z x0 l0 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
elim H1.
(* Goal: inlist Z x0 l0 *)
(* Goal: forall (_ : Mod x0 x1 p) (_ : permmod p (zdrop x0 l0) (zdrop x1 l1)), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros Hm01 Hd01.
(* Goal: inlist Z x0 l0 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
elim (permmod_allex p l1 l2 H12 x1).
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: forall (x : Z) (_ : and (inlist Z x l2) (and (Mod x1 x p) (permmod p (zdrop x1 l1) (zdrop x l2)))), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros x2 H2.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
elim H2.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: forall (_ : inlist Z x2 l2) (_ : and (Mod x1 x2 p) (permmod p (zdrop x1 l1) (zdrop x2 l2))), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros Hx2 H3.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
elim H3.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: forall (_ : Mod x1 x2 p) (_ : permmod p (zdrop x1 l1) (zdrop x2 l2)), @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
intros Hm12 Hd12.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l2) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l2)))) *)
split with x2.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: and (inlist Z x2 l2) (and (Mod x0 x2 p) (permmod p (zdrop x0 l0) (zdrop x2 l2))) *)
split.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: and (Mod x0 x2 p) (permmod p (zdrop x0 l0) (zdrop x2 l2)) *)
(* Goal: inlist Z x2 l2 *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: and (Mod x0 x2 p) (permmod p (zdrop x0 l0) (zdrop x2 l2)) *)
split.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x2 l2) *)
(* Goal: Mod x0 x2 p *)
apply mod_trans with x1.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x2 l2) *)
(* Goal: Mod x1 x2 p *)
(* Goal: Mod x0 x1 p *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x2 l2) *)
(* Goal: Mod x1 x2 p *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x2 l2) *)
apply IH with (zdrop x1 l1).
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: @eq nat (length Z (zdrop x1 l1)) m *)
(* Goal: @eq nat (length Z (zdrop x0 l0)) m *)
apply S_inj.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: @eq nat (length Z (zdrop x1 l1)) m *)
(* Goal: @eq nat (S (length Z (zdrop x0 l0))) (S m) *)
rewrite zdrop_length.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: @eq nat (length Z (zdrop x1 l1)) m *)
(* Goal: inlist Z x0 l0 *)
(* Goal: @eq nat (length Z l0) (S m) *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: @eq nat (length Z (zdrop x1 l1)) m *)
(* Goal: inlist Z x0 l0 *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: @eq nat (length Z (zdrop x1 l1)) m *)
apply S_inj.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: @eq nat (S (length Z (zdrop x1 l1))) (S m) *)
rewrite zdrop_length.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: inlist Z x1 l1 *)
(* Goal: @eq nat (length Z l1) (S m) *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
(* Goal: inlist Z x1 l1 *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (length Z (zdrop x2 l2)) m *)
apply S_inj.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: @eq nat (S (length Z (zdrop x2 l2))) (S m) *)
rewrite zdrop_length.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: inlist Z x2 l2 *)
(* Goal: @eq nat (length Z l2) (S m) *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
(* Goal: inlist Z x2 l2 *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: permmod p (zdrop x1 l1) (zdrop x2 l2) *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
assumption.
(* Goal: inlist Z x0 l0 *)
assumption.
Qed.
Lemma permmod_trans :
forall (p : nat) (l0 l1 l2 : Zlist),
permmod p l0 l1 -> permmod p l1 l2 -> permmod p l0 l2.
Proof.
(* Goal: forall (p : nat) (l0 l1 l2 : Zlist) (_ : permmod p l0 l1) (_ : permmod p l1 l2), permmod p l0 l2 *)
intros.
(* Goal: permmod p l0 l2 *)
apply permmod_trans1 with (length Z l0) l1.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l2) (length Z l0) *)
(* Goal: @eq nat (length Z l1) (length Z l0) *)
(* Goal: @eq nat (length Z l0) (length Z l0) *)
reflexivity.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l2) (length Z l0) *)
(* Goal: @eq nat (length Z l1) (length Z l0) *)
symmetry in |- *.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l2) (length Z l0) *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
apply permmod_length with p.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l2) (length Z l0) *)
(* Goal: permmod p l0 l1 *)
assumption.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l2) (length Z l0) *)
symmetry in |- *.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l0) (length Z l2) *)
transitivity (length Z l1).
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l1) (length Z l2) *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
apply permmod_length with p.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l1) (length Z l2) *)
(* Goal: permmod p l0 l1 *)
assumption.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: @eq nat (length Z l1) (length Z l2) *)
apply permmod_length with p.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
(* Goal: permmod p l1 l2 *)
assumption.
(* Goal: permmod p l1 l2 *)
(* Goal: permmod p l0 l1 *)
assumption.
(* Goal: permmod p l1 l2 *)
assumption.
Qed.
Lemma permmod_drop_drop1 :
forall (n p : nat) (x y : Z) (l : Zlist),
n = length Z l ->
Mod x y p ->
inlist Z x l -> inlist Z y l -> permmod p (zdrop x l) (zdrop y l).
Proof.
(* Goal: forall (n p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat O (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
intros.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: permmod p (zdrop x l) (zdrop y l) *)
rewrite length_0 with Z l.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: @eq nat (length Z l) O *)
(* Goal: permmod p (zdrop x (Nil Z)) (zdrop y (Nil Z)) *)
simpl in |- *.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: @eq nat (length Z l) O *)
(* Goal: @eq Zlist (Nil Z) (Nil Z) *)
reflexivity.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: @eq nat (length Z l) O *)
symmetry in |- *.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: @eq nat O (length Z l) *)
assumption.
(* Goal: forall (n : nat) (_ : forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat n (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l)) (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S n) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
intros m IH.
(* Goal: forall (p : nat) (x y : Z) (l : Zlist) (_ : @eq nat (S m) (length Z l)) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
intros.
(* Goal: permmod p (zdrop x l) (zdrop y l) *)
elim (zeqdec x y).
(* Goal: forall _ : not (@eq Z x y), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: forall _ : @eq Z x y, permmod p (zdrop x l) (zdrop y l) *)
intro.
(* Goal: forall _ : not (@eq Z x y), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: permmod p (zdrop x l) (zdrop y l) *)
rewrite H3.
(* Goal: forall _ : not (@eq Z x y), permmod p (zdrop x l) (zdrop y l) *)
(* Goal: permmod p (zdrop y l) (zdrop y l) *)
apply permmod_refl.
(* Goal: forall _ : not (@eq Z x y), permmod p (zdrop x l) (zdrop y l) *)
intro.
(* Goal: permmod p (zdrop x l) (zdrop y l) *)
apply allex_permmod.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: @eq nat (length Z (zdrop x l)) (length Z (zdrop y l)) *)
apply S_inj.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: @eq nat (S (length Z (zdrop x l))) (S (length Z (zdrop y l))) *)
rewrite zdrop_length.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: inlist Z x l *)
(* Goal: @eq nat (length Z l) (S (length Z (zdrop y l))) *)
rewrite zdrop_length.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: inlist Z x l *)
(* Goal: inlist Z y l *)
(* Goal: @eq nat (length Z l) (length Z l) *)
reflexivity.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: inlist Z x l *)
(* Goal: inlist Z y l *)
assumption.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: inlist Z x l *)
assumption.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 (zdrop x l)), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod x0 x1 p) (permmod p (zdrop x0 (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
intros z Hz.
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
elim (zeqdec y z).
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: forall _ : @eq Z y z, @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
intro.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
split with x.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: and (inlist Z x (zdrop y l)) (and (Mod z x p) (permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l)))) *)
split.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: and (Mod z x p) (permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l))) *)
(* Goal: inlist Z x (zdrop y l) *)
apply zdrop_neq_inlist.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: and (Mod z x p) (permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l))) *)
(* Goal: inlist Z x l *)
(* Goal: not (@eq Z x y) *)
assumption.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: and (Mod z x p) (permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l))) *)
(* Goal: inlist Z x l *)
assumption.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: and (Mod z x p) (permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l))) *)
split.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l)) *)
(* Goal: Mod z x p *)
rewrite <- H4.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l)) *)
(* Goal: Mod y x p *)
apply mod_sym.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l)) *)
(* Goal: Mod x y p *)
assumption.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop y l)) *)
rewrite H4.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop x (zdrop z l)) *)
rewrite zdrop_swap.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
(* Goal: permmod p (zdrop x (zdrop z l)) (zdrop x (zdrop z l)) *)
apply permmod_refl.
(* Goal: forall _ : not (@eq Z y z), @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
intro.
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 (zdrop y l)) (and (Mod z x1 p) (permmod p (zdrop z (zdrop x l)) (zdrop x1 (zdrop y l))))) *)
split with z.
(* Goal: and (inlist Z z (zdrop y l)) (and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l)))) *)
split.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z (zdrop y l) *)
apply zdrop_neq_inlist.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z l *)
(* Goal: not (@eq Z z y) *)
intro.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z l *)
(* Goal: False *)
apply H4.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z l *)
(* Goal: @eq Z y z *)
symmetry in |- *.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z l *)
(* Goal: @eq Z z y *)
assumption.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z l *)
apply zdrop_inlist_weak with x.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
(* Goal: inlist Z z (zdrop x l) *)
assumption.
(* Goal: and (Mod z z p) (permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l))) *)
split.
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l)) *)
(* Goal: Mod z z p *)
apply mod_refl.
(* Goal: permmod p (zdrop z (zdrop x l)) (zdrop z (zdrop y l)) *)
rewrite (zdrop_swap z).
(* Goal: permmod p (zdrop x (zdrop z l)) (zdrop z (zdrop y l)) *)
rewrite (zdrop_swap z).
(* Goal: permmod p (zdrop x (zdrop z l)) (zdrop y (zdrop z l)) *)
apply (IH p x y (zdrop z l)).
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
(* Goal: Mod x y p *)
(* Goal: @eq nat m (length Z (zdrop z l)) *)
apply S_inj.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
(* Goal: Mod x y p *)
(* Goal: @eq nat (S m) (S (length Z (zdrop z l))) *)
rewrite zdrop_length.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
(* Goal: Mod x y p *)
(* Goal: inlist Z z l *)
(* Goal: @eq nat (S m) (length Z l) *)
assumption.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
(* Goal: Mod x y p *)
(* Goal: inlist Z z l *)
apply zdrop_inlist_weak with x.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
(* Goal: Mod x y p *)
(* Goal: inlist Z z (zdrop x l) *)
assumption.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
(* Goal: Mod x y p *)
assumption.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z x (zdrop z l) *)
apply zdrop_inlist_swap.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z z (zdrop x l) *)
(* Goal: inlist Z x l *)
assumption.
(* Goal: inlist Z y (zdrop z l) *)
(* Goal: inlist Z z (zdrop x l) *)
assumption.
(* Goal: inlist Z y (zdrop z l) *)
apply zdrop_neq_inlist.
(* Goal: inlist Z y l *)
(* Goal: not (@eq Z y z) *)
assumption.
(* Goal: inlist Z y l *)
assumption.
Qed.
Lemma permmod_drop_drop :
forall (p : nat) (x y : Z) (l : Zlist),
Mod x y p ->
inlist Z x l -> inlist Z y l -> permmod p (zdrop x l) (zdrop y l).
Proof.
(* Goal: forall (p : nat) (x y : Z) (l : Zlist) (_ : Mod x y p) (_ : inlist Z x l) (_ : inlist Z y l), permmod p (zdrop x l) (zdrop y l) *)
intros.
(* Goal: permmod p (zdrop x l) (zdrop y l) *)
apply permmod_drop_drop1 with (length Z l).
(* Goal: inlist Z y l *)
(* Goal: inlist Z x l *)
(* Goal: Mod x y p *)
(* Goal: @eq nat (length Z l) (length Z l) *)
reflexivity.
(* Goal: inlist Z y l *)
(* Goal: inlist Z x l *)
(* Goal: Mod x y p *)
assumption.
(* Goal: inlist Z y l *)
(* Goal: inlist Z x l *)
assumption.
(* Goal: inlist Z y l *)
assumption.
Qed.
Lemma permmod_drop_rev :
forall (p : nat) (l0 l1 : Zlist) (x0 x1 : Z),
Mod x0 x1 p ->
inlist Z x0 l0 ->
inlist Z x1 l1 -> permmod p l0 l1 -> permmod p (zdrop x0 l0) (zdrop x1 l1).
Proof.
(* Goal: forall (p : nat) (l0 l1 : Zlist) (x0 x1 : Z) (_ : Mod x0 x1 p) (_ : inlist Z x0 l0) (_ : inlist Z x1 l1) (_ : permmod p l0 l1), permmod p (zdrop x0 l0) (zdrop x1 l1) *)
intros.
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
elim (permmod_allex p l0 l1 H2 x0).
(* Goal: inlist Z x0 l0 *)
(* Goal: forall (x : Z) (_ : and (inlist Z x l1) (and (Mod x0 x p) (permmod p (zdrop x0 l0) (zdrop x l1)))), permmod p (zdrop x0 l0) (zdrop x1 l1) *)
intros y Hy.
(* Goal: inlist Z x0 l0 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
elim Hy.
(* Goal: inlist Z x0 l0 *)
(* Goal: forall (_ : inlist Z y l1) (_ : and (Mod x0 y p) (permmod p (zdrop x0 l0) (zdrop y l1))), permmod p (zdrop x0 l0) (zdrop x1 l1) *)
intros.
(* Goal: inlist Z x0 l0 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
elim H4.
(* Goal: inlist Z x0 l0 *)
(* Goal: forall (_ : Mod x0 y p) (_ : permmod p (zdrop x0 l0) (zdrop y l1)), permmod p (zdrop x0 l0) (zdrop x1 l1) *)
intros.
(* Goal: inlist Z x0 l0 *)
(* Goal: permmod p (zdrop x0 l0) (zdrop x1 l1) *)
apply permmod_trans with (zdrop y l1).
(* Goal: inlist Z x0 l0 *)
(* Goal: permmod p (zdrop y l1) (zdrop x1 l1) *)
(* Goal: permmod p (zdrop x0 l0) (zdrop y l1) *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: permmod p (zdrop y l1) (zdrop x1 l1) *)
apply permmod_drop_drop.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod y x1 p *)
apply mod_trans with x0.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x0 x1 p *)
(* Goal: Mod y x0 p *)
apply mod_sym.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x0 x1 p *)
(* Goal: Mod x0 y p *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: inlist Z y l1 *)
(* Goal: Mod x0 x1 p *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
(* Goal: inlist Z y l1 *)
assumption.
(* Goal: inlist Z x0 l0 *)
(* Goal: inlist Z x1 l1 *)
assumption.
(* Goal: inlist Z x0 l0 *)
assumption.
Qed.
Lemma nodoubles_allex_permmod1 :
forall (n p : nat) (l0 l1 : Zlist),
n = length Z l0 ->
n = length Z l1 ->
Prime p ->
length Z l0 = length Z l1 ->
nodoubles p l0 -> allex p l0 l1 -> permmod p l0 l1.
Proof.
(* Goal: forall (n p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
simple induction n.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat O (length Z l0)) (_ : @eq nat O (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
intros.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: permmod p l0 l1 *)
rewrite length_0 with Z l0.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: permmod p (Nil Z) l1 *)
rewrite length_0 with Z l1.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: @eq nat (length Z l1) O *)
(* Goal: permmod p (Nil Z) (Nil Z) *)
apply permmod_nil.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: @eq nat (length Z l1) O *)
symmetry in |- *.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: @eq nat (length Z l0) O *)
(* Goal: @eq nat O (length Z l1) *)
assumption.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: @eq nat (length Z l0) O *)
symmetry in |- *.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
(* Goal: @eq nat O (length Z l0) *)
assumption.
(* Goal: forall (n : nat) (_ : forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat n (length Z l0)) (_ : @eq nat n (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1) (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S n) (length Z l0)) (_ : @eq nat (S n) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
intros m IH.
(* Goal: forall (p : nat) (l0 l1 : Zlist) (_ : @eq nat (S m) (length Z l0)) (_ : @eq nat (S m) (length Z l1)) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
intros.
(* Goal: permmod p l0 l1 *)
apply allex_permmod.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l1)))) *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
assumption.
(* Goal: forall (x0 : Z) (_ : inlist Z x0 l0), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x0 x1 p) (permmod p (zdrop x0 l0) (zdrop x1 l1)))) *)
intros x Hx.
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x x1 p) (permmod p (zdrop x l0) (zdrop x1 l1)))) *)
elim H4 with x.
(* Goal: inlist Z x l0 *)
(* Goal: forall (x0 : Z) (_ : and (inlist Z x0 l1) (Mod x x0 p)), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x x1 p) (permmod p (zdrop x l0) (zdrop x1 l1)))) *)
intros y Hy.
(* Goal: inlist Z x l0 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x x1 p) (permmod p (zdrop x l0) (zdrop x1 l1)))) *)
elim Hy.
(* Goal: inlist Z x l0 *)
(* Goal: forall (_ : inlist Z y l1) (_ : Mod x y p), @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x x1 p) (permmod p (zdrop x l0) (zdrop x1 l1)))) *)
intros.
(* Goal: inlist Z x l0 *)
(* Goal: @ex Z (fun x1 : Z => and (inlist Z x1 l1) (and (Mod x x1 p) (permmod p (zdrop x l0) (zdrop x1 l1)))) *)
split with y.
(* Goal: inlist Z x l0 *)
(* Goal: and (inlist Z y l1) (and (Mod x y p) (permmod p (zdrop x l0) (zdrop y l1))) *)
split.
(* Goal: inlist Z x l0 *)
(* Goal: and (Mod x y p) (permmod p (zdrop x l0) (zdrop y l1)) *)
(* Goal: inlist Z y l1 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: and (Mod x y p) (permmod p (zdrop x l0) (zdrop y l1)) *)
split.
(* Goal: inlist Z x l0 *)
(* Goal: permmod p (zdrop x l0) (zdrop y l1) *)
(* Goal: Mod x y p *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: permmod p (zdrop x l0) (zdrop y l1) *)
apply IH.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: @eq nat m (length Z (zdrop y l1)) *)
(* Goal: @eq nat m (length Z (zdrop x l0)) *)
apply S_inj.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: @eq nat m (length Z (zdrop y l1)) *)
(* Goal: @eq nat (S m) (S (length Z (zdrop x l0))) *)
rewrite zdrop_length.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: @eq nat m (length Z (zdrop y l1)) *)
(* Goal: inlist Z x l0 *)
(* Goal: @eq nat (S m) (length Z l0) *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: @eq nat m (length Z (zdrop y l1)) *)
(* Goal: inlist Z x l0 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: @eq nat m (length Z (zdrop y l1)) *)
apply S_inj.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: @eq nat (S m) (S (length Z (zdrop y l1))) *)
rewrite zdrop_length.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: inlist Z y l1 *)
(* Goal: @eq nat (S m) (length Z l1) *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
(* Goal: inlist Z y l1 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
(* Goal: Prime p *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (length Z (zdrop x l0)) (length Z (zdrop y l1)) *)
apply S_inj.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: @eq nat (S (length Z (zdrop x l0))) (S (length Z (zdrop y l1))) *)
rewrite zdrop_length.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: inlist Z x l0 *)
(* Goal: @eq nat (length Z l0) (S (length Z (zdrop y l1))) *)
rewrite zdrop_length.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: inlist Z x l0 *)
(* Goal: inlist Z y l1 *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: inlist Z x l0 *)
(* Goal: inlist Z y l1 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
(* Goal: inlist Z x l0 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p (zdrop x l0) *)
apply nodoubles_drop.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
(* Goal: nodoubles p l0 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p (zdrop x l0) (zdrop y l1) *)
apply allex_nodoubles_drop.
(* Goal: inlist Z x l0 *)
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: inlist Z y l1 *)
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
(* Goal: Prime p *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: inlist Z y l1 *)
(* Goal: inlist Z x l0 *)
(* Goal: Mod x y p *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: inlist Z y l1 *)
(* Goal: inlist Z x l0 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: inlist Z y l1 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
assumption.
(* Goal: inlist Z x l0 *)
(* Goal: allex p l0 l1 *)
assumption.
(* Goal: inlist Z x l0 *)
assumption.
Qed.
Lemma nodoubles_allex_permmod :
forall (p : nat) (l0 l1 : Zlist),
Prime p ->
length Z l0 = length Z l1 ->
nodoubles p l0 -> allex p l0 l1 -> permmod p l0 l1.
Proof.
(* Goal: forall (p : nat) (l0 l1 : Zlist) (_ : Prime p) (_ : @eq nat (length Z l0) (length Z l1)) (_ : nodoubles p l0) (_ : allex p l0 l1), permmod p l0 l1 *)
intros.
(* Goal: permmod p l0 l1 *)
apply nodoubles_allex_permmod1 with (length Z l0).
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
(* Goal: Prime p *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
(* Goal: @eq nat (length Z l0) (length Z l0) *)
reflexivity.
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
(* Goal: Prime p *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
assumption.
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
(* Goal: Prime p *)
assumption.
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
(* Goal: @eq nat (length Z l0) (length Z l1) *)
assumption.
(* Goal: allex p l0 l1 *)
(* Goal: nodoubles p l0 *)
assumption.
(* Goal: allex p l0 l1 *)
assumption.
Qed.
Lemma until_mapmult_permmod :
forall (p : nat) (a : Z),
Prime p ->
~ Mod a 0 p -> permmod p (until (pred p)) (mapmult a (until (pred p))).
Proof.
(* Goal: forall (p : nat) (a : Z) (_ : Prime p) (_ : not (Mod a Z0 p)), permmod p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
intros.
(* Goal: permmod p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
apply nodoubles_allex_permmod.
(* Goal: allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
(* Goal: nodoubles p (until (Init.Nat.pred p)) *)
(* Goal: @eq nat (length Z (until (Init.Nat.pred p))) (length Z (mapmult a (until (Init.Nat.pred p)))) *)
(* Goal: Prime p *)
assumption.
(* Goal: allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
(* Goal: nodoubles p (until (Init.Nat.pred p)) *)
(* Goal: @eq nat (length Z (until (Init.Nat.pred p))) (length Z (mapmult a (until (Init.Nat.pred p)))) *)
unfold mapmult in |- *.
(* Goal: allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
(* Goal: nodoubles p (until (Init.Nat.pred p)) *)
(* Goal: @eq nat (length Z (until (Init.Nat.pred p))) (length Z (map Z Z (fun x : Z => Z.mul a x) (until (Init.Nat.pred p)))) *)
apply map_length.
(* Goal: allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
(* Goal: nodoubles p (until (Init.Nat.pred p)) *)
apply until_nodoubles.
(* Goal: allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
(* Goal: Prime p *)
assumption.
(* Goal: allex p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
unfold allex in |- *.
(* Goal: forall (x : Z) (_ : inlist Z x (until (Init.Nat.pred p))), @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
intros.
(* Goal: @ex Z (fun y : Z => and (inlist Z y (mapmult a (until (Init.Nat.pred p)))) (Mod x y p)) *)
apply (until_mapmult_allex p a H H0).
(* Goal: inlist Z x (until (Init.Nat.pred p)) *)
assumption.
Qed.
Theorem flt :
forall (a : Z) (p : nat), Prime p -> ~ Mod a 0 p -> Mod (Exp a (pred p)) 1 p.
Proof.
(* Goal: forall (a : Z) (p : nat) (_ : Prime p) (_ : not (Mod a Z0 p)), Mod (Exp a (Init.Nat.pred p)) (Zpos xH) p *)
intros.
(* Goal: Mod (Exp a (Init.Nat.pred p)) (Zpos xH) p *)
apply mod_sym.
(* Goal: Mod (Zpos xH) (Exp a (Init.Nat.pred p)) p *)
apply mod_mult_cancel_r with (zproduct (until (pred p))).
(* Goal: Mod (Z.mul (Zpos xH) (zproduct (until (Init.Nat.pred p)))) (Z.mul (Exp a (Init.Nat.pred p)) (zproduct (until (Init.Nat.pred p)))) p *)
(* Goal: not (Mod (zproduct (until (Init.Nat.pred p))) Z0 p) *)
(* Goal: Prime p *)
assumption.
(* Goal: Mod (Z.mul (Zpos xH) (zproduct (until (Init.Nat.pred p)))) (Z.mul (Exp a (Init.Nat.pred p)) (zproduct (until (Init.Nat.pred p)))) p *)
(* Goal: not (Mod (zproduct (until (Init.Nat.pred p))) Z0 p) *)
apply until_prod_not_0mod.
(* Goal: Mod (Z.mul (Zpos xH) (zproduct (until (Init.Nat.pred p)))) (Z.mul (Exp a (Init.Nat.pred p)) (zproduct (until (Init.Nat.pred p)))) p *)
(* Goal: Prime p *)
assumption.
(* Goal: Mod (Z.mul (Zpos xH) (zproduct (until (Init.Nat.pred p)))) (Z.mul (Exp a (Init.Nat.pred p)) (zproduct (until (Init.Nat.pred p)))) p *)
rewrite <- until_mapmult_exp.
(* Goal: Mod (Z.mul (Zpos xH) (zproduct (until (Init.Nat.pred p)))) (zproduct (mapmult a (until (Init.Nat.pred p)))) p *)
rewrite Zmult_1_l.
(* Goal: Mod (zproduct (until (Init.Nat.pred p))) (zproduct (mapmult a (until (Init.Nat.pred p)))) p *)
apply permmod_product.
(* Goal: permmod p (until (Init.Nat.pred p)) (mapmult a (until (Init.Nat.pred p))) *)
apply until_mapmult_permmod.
(* Goal: not (Mod a Z0 p) *)
(* Goal: Prime p *)
assumption.
(* Goal: not (Mod a Z0 p) *)
assumption.
Qed.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinear5.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_NChelper :
forall A B C P Q,
nCol A B C -> Col A B P -> Col A B Q -> neq P Q ->
nCol P Q C.
Proof.
(* Goal: forall (A B C P Q : @Point Ax0) (_ : @nCol Ax0 A B C) (_ : @Col Ax0 A B P) (_ : @Col Ax0 A B Q) (_ : @neq Ax0 P Q), @nCol Ax0 P Q C *)
intros.
(* Goal: @nCol Ax0 P Q C *)
assert (~ eq A B).
(* Goal: @nCol Ax0 P Q C *)
(* Goal: not (@eq Ax0 A B) *)
{
(* Goal: not (@eq Ax0 A B) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @nCol Ax0 P Q C *)
}
(* Goal: @nCol Ax0 P Q C *)
assert (Col B P Q) by (conclude lemma_collinear4).
(* Goal: @nCol Ax0 P Q C *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: @nCol Ax0 P Q C *)
assert (Col B A P) by (forward_using lemma_collinearorder).
(* Goal: @nCol Ax0 P Q C *)
assert (Col B A Q) by (forward_using lemma_collinearorder).
(* Goal: @nCol Ax0 P Q C *)
assert (Col A P Q) by (conclude lemma_collinear4).
(* Goal: @nCol Ax0 P Q C *)
assert (Col P Q A) by (forward_using lemma_collinearorder).
(* Goal: @nCol Ax0 P Q C *)
assert (Col P Q B) by (forward_using lemma_collinearorder).
(* Goal: @nCol Ax0 P Q C *)
assert (~ Col P Q C).
(* Goal: @nCol Ax0 P Q C *)
(* Goal: not (@Col Ax0 P Q C) *)
{
(* Goal: not (@Col Ax0 P Q C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude lemma_collinear5).
(* Goal: False *)
contradict.
(* BG Goal: @nCol Ax0 P Q C *)
}
(* Goal: @nCol Ax0 P Q C *)
close.
Qed.
End Euclid.
|
Require Export Qquadratic_sign_properties.
Require Export Qquadratic_Qpositive_to_Qpositive.
Require Export homographicAcc_Qhomographic_sign.
Definition qnew_a (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(fst
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero)))).
Definition qnew_b (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(snd
(fst
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero))))).
Definition qnew_c (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(snd
(snd
(fst
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero)))))).
Definition qnew_d (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
snd
(snd
(snd
(fst
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero)))))).
Definition qnew_e (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(snd
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero)))).
Definition qnew_f (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(snd
(snd
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero))))).
Definition qnew_g (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(snd
(snd
(snd
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero)))))).
Definition qnew_h (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
snd
(snd
(snd
(snd
(fst
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero)))))).
Definition qnew_p1 (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
fst
(snd
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero))).
Definition qnew_p2 (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) :=
snd
(snd
(snd
(Qquadratic_sign a b c d e f g h p1 p2
H_Qquadratic_sg_denom_nonzero))).
Lemma Qquadratic_Qpositive_to_Q_quadraticAcc_pos_1 :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2),
~ same_ratio a b c d e f g h ->
q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero = 1%Z ->
Z.sgn
Proof.
(* Goal: forall (a b c d e f g h : Z) (p1 p2 : Qpositive) (H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) (_ : not (same_ratio a b c d e f g h)) (_ : @eq Z (q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (Zpos xH)) (_ : @eq Z (Z.sgn (Z.add (Z.add (Z.add (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero))) (Zpos xH)), quadraticAcc (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_e a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_f a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_g a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_h a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_p1 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_p2 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) *)
intros a b c d e f g h p1 p2 H_qsign not_same_ratio_abcdefgh l1_eq_one na_nb_nc_nd_eq_one.
(* Goal: quadraticAcc (qnew_a a b c d e f g h p1 p2 H_qsign) (qnew_b a b c d e f g h p1 p2 H_qsign) (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (na := qnew_a a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na (qnew_b a b c d e f g h p1 p2 H_qsign) (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nb := qnew_b a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nc := qnew_c a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc (qnew_d a b c d e f g h p1 p2 H_qsign) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nd := qnew_d a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ne := qnew_e a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd ne (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nf := qnew_f a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd ne nf (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ng := qnew_g a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd ne nf ng (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nh := qnew_h a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np1 := qnew_p1 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np2 := qnew_p2 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
assert (H : Qquadratic_sign a b c d e f g h p1 p2 H_qsign = (1%Z, (na, (nb, (nc, nd)), (ne, (nf, (ng, nh))), (np1, np2)))).
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zpos xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) na (@pair Z (prod Z Z) nb (@pair Z Z nc nd))) (@pair Z (prod Z (prod Z Z)) ne (@pair Z (prod Z Z) nf (@pair Z Z ng nh)))) (@pair Qpositive Qpositive np1 np2))) *)
unfold na, nb, nc, nd, ne, nf, ng, nh, np1, np2 in |- *.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zpos xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
rewrite <- l1_eq_one.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
unfold qnew_a, qnew_b, qnew_c, qnew_d, qnew_e, qnew_f, qnew_g, qnew_h, qnew_p1, qnew_p2 in |- *.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))))))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))))))) (@pair Qpositive Qpositive (@fst Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))) (@snd Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) *)
replace (q_sign a b c d e f g h p1 p2 H_qsign) with (fst (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)); [ idtac | reflexivity ]; repeat rewrite <- pair_1; reflexivity.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
generalize (Qquadratic_sign_pos_1 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh np1 np2 H).
(* Goal: forall _ : sumbool (and (Z.lt Z0 (Z.add (Z.add (Z.add na nb) nc) nd)) (Z.lt Z0 (Z.add (Z.add (Z.add ne nf) ng) nh))) (and (Z.lt (Z.add (Z.add (Z.add na nb) nc) nd) Z0) (Z.lt (Z.add (Z.add (Z.add ne nf) ng) nh) Z0)), quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
intros [(H_nabcd, H_nefgh)| (H1, _)]; [ idtac | apply False_ind; generalize (Zsgn_9 _ na_nb_nc_nd_eq_one); apply Zlt_asym; assumption ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh np1 np2 *)
destruct np1 as [p| p| ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) np2 *)
destruct np2 as [p0| p0| ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) One *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) (dL p0) *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) (nR p0) *)
apply quadraticAcc_wf; solve [ assumption | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (nR p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) One *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) (dL p0) *)
apply quadraticAcc_wf; solve [ assumption | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (dL p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (nR p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add ne nf) (Z.add ng nh) (nR p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (nR p) One) *)
discriminate.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add ne nf) (Z.add ng nh) (nR p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add ne nf) (Z.add ng nh) (nR p) *)
apply homographicAcc_wf; solve [ rewrite Zplus_assoc; assumption | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply Zplus_le_0_compat; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zle_resp_neg; assumption ] ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) np2 *)
destruct np2 as [p0| p0| ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) One *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) (dL p0) *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) (nR p0) *)
apply quadraticAcc_wf; solve [ assumption | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (nR p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) One *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) (dL p0) *)
apply quadraticAcc_wf; solve [ assumption | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (dL p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: quadraticAcc na nb nc nd ne nf ng nh (dL p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add ne nf) (Z.add ng nh) (dL p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (dL p) One) *)
discriminate.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add ne nf) (Z.add ng nh) (dL p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add ne nf) (Z.add ng nh) (dL p) *)
apply homographicAcc_wf; solve [ rewrite Zplus_assoc; assumption | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply Zplus_le_0_compat; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zle_resp_neg; assumption ] ].
(* Goal: quadraticAcc na nb nc nd ne nf ng nh One np2 *)
apply quadraticacc0.
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) np2 *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) np2 *)
destruct np2 as [p| p| ].
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) One *)
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) (dL p) *)
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) (nR p) *)
apply homographicAcc_wf; first [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (nR p) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, H_discriminate_me)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply Zplus_le_0_compat; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; omega | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) One *)
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) (dL p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (dL p) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, H_discriminate_me)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply Zplus_le_0_compat; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; omega | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add ne ng) (Z.add nf nh) One *)
apply homographicacc0; reflexivity || omega.
Qed.
Lemma Qquadratic_Qpositive_to_Q_quadraticAcc_pos_2 :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2),
~ same_ratio a b c d e f g h ->
q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero = 1%Z ->
Z.sgn
Proof.
(* Goal: forall (a b c d e f g h : Z) (p1 p2 : Qpositive) (H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) (_ : not (same_ratio a b c d e f g h)) (_ : @eq Z (q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (Zpos xH)) (_ : @eq Z (Z.sgn (Z.add (Z.add (Z.add (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero))) (Zneg xH)), quadraticAcc (Z.opp (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_e a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_p1 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_p2 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) *)
intros a b c d e f g h p1 p2 H_qsign not_same_ratio_abcdefgh l1_eq_one na_nb_nc_nd_eq_minus_one.
(* Goal: quadraticAcc (Z.opp (qnew_a a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_b a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_c a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (na := qnew_a a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp (qnew_b a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_c a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nb := qnew_b a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp (qnew_c a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nc := qnew_c a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nd := qnew_d a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ne := qnew_e a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nf := qnew_f a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ng := qnew_g a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nh := qnew_h a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np1 := qnew_p1 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np2 := qnew_p2 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
assert (H : Qquadratic_sign a b c d e f g h p1 p2 H_qsign = (1%Z, (na, (nb, (nc, nd)), (ne, (nf, (ng, nh))), (np1, np2)))).
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zpos xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) na (@pair Z (prod Z Z) nb (@pair Z Z nc nd))) (@pair Z (prod Z (prod Z Z)) ne (@pair Z (prod Z Z) nf (@pair Z Z ng nh)))) (@pair Qpositive Qpositive np1 np2))) *)
unfold na, nb, nc, nd, ne, nf, ng, nh, np1, np2 in |- *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zpos xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
rewrite <- l1_eq_one.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
unfold qnew_a, qnew_b, qnew_c, qnew_d, qnew_e, qnew_f, qnew_g, qnew_h, qnew_p1, qnew_p2 in |- *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))))))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))))))) (@pair Qpositive Qpositive (@fst Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))) (@snd Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) *)
replace (q_sign a b c d e f g h p1 p2 H_qsign) with (fst (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)); [ idtac | reflexivity ]; repeat rewrite <- pair_1; reflexivity.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
generalize (Qquadratic_sign_pos_1 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh np1 np2 H).
(* Goal: forall _ : sumbool (and (Z.lt Z0 (Z.add (Z.add (Z.add na nb) nc) nd)) (Z.lt Z0 (Z.add (Z.add (Z.add ne nf) ng) nh))) (and (Z.lt (Z.add (Z.add (Z.add na nb) nc) nd) Z0) (Z.lt (Z.add (Z.add (Z.add ne nf) ng) nh) Z0)), quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
intros [(H1, _)| (H_nabcd, H_nefgh)]; [ apply False_ind; generalize (Zsgn_10 _ na_nb_nc_nd_eq_minus_one); apply Zlt_asym; assumption | idtac ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
destruct np1 as [p| p| ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) np2 *)
destruct np2 as [p0| p0| ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) One *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) (dL p0) *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) (nR p0) *)
apply quadraticAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (nR p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) One *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) (dL p0) *)
apply quadraticAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (dL p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (nR p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (nR p) One) *)
discriminate.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (nR p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (nR p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | omega | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zplus_le_0_compat; assumption | omega ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
destruct np2 as [p0| p0| ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) One *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) (dL p0) *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) (nR p0) *)
apply quadraticAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (nR p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) One *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) (dL p0) *)
apply quadraticAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (dL p0) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (dL p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (dL p) One) *)
discriminate.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (dL p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (dL p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | omega | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zplus_le_0_compat; assumption | omega ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
apply quadraticacc0.
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) np2 *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) np2 *)
destruct np2 as [p| p| ].
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) One *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) (dL p) *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) (nR p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (nR p) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, H_discriminate_me)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zplus_le_0_compat; apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; omega | rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) One *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) (dL p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_pos_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (dL p) H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, H_discriminate_me)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zplus_le_0_compat; apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; omega | rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ].
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) One *)
apply homographicacc0; reflexivity || omega.
Qed.
Lemma Qquadratic_Qpositive_to_Q_quadraticAcc_neg_1 :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2),
~ same_ratio a b c d e f g h ->
q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero = (-1)%Z ->
Z.sgn
Proof.
(* Goal: forall (a b c d e f g h : Z) (p1 p2 : Qpositive) (H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) (_ : not (same_ratio a b c d e f g h)) (_ : @eq Z (q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (Zneg xH)) (_ : @eq Z (Z.sgn (Z.add (Z.add (Z.add (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero))) (Zpos xH)), quadraticAcc (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (Z.opp (qnew_e a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_p1 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_p2 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) *)
intros a b c d e f g h p1 p2 H_qsign not_same_ratio_abcdefgh l1_eq_min_one na_nb_nc_nd_eq_one.
(* Goal: quadraticAcc (qnew_a a b c d e f g h p1 p2 H_qsign) (qnew_b a b c d e f g h p1 p2 H_qsign) (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (na := qnew_a a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na (qnew_b a b c d e f g h p1 p2 H_qsign) (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nb := qnew_b a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nc := qnew_c a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc (qnew_d a b c d e f g h p1 p2 H_qsign) (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nd := qnew_d a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp (qnew_e a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ne := qnew_e a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp (qnew_f a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nf := qnew_f a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp (qnew_g a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ng := qnew_g a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp (qnew_h a b c d e f g h p1 p2 H_qsign)) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nh := qnew_h a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np1 := qnew_p1 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np2 := qnew_p2 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
assert (H : Qquadratic_sign a b c d e f g h p1 p2 H_qsign = ((-1)%Z, (na, (nb, (nc, nd)), (ne, (nf, (ng, nh))), (np1, np2)))).
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zneg xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) na (@pair Z (prod Z Z) nb (@pair Z Z nc nd))) (@pair Z (prod Z (prod Z Z)) ne (@pair Z (prod Z Z) nf (@pair Z Z ng nh)))) (@pair Qpositive Qpositive np1 np2))) *)
unfold na, nb, nc, nd, ne, nf, ng, nh, np1, np2 in |- *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zneg xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
rewrite <- l1_eq_min_one.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
unfold qnew_a, qnew_b, qnew_c, qnew_d, qnew_e, qnew_f, qnew_g, qnew_h, qnew_p1, qnew_p2 in |- *.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))))))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))))))) (@pair Qpositive Qpositive (@fst Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))) (@snd Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) *)
replace (q_sign a b c d e f g h p1 p2 H_qsign) with (fst (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)); [ idtac | reflexivity ]; repeat rewrite <- pair_1; reflexivity.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
generalize (Qquadratic_sign_neg_1 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh np1 np2 H).
(* Goal: forall _ : sumbool (and (Z.lt Z0 (Z.add (Z.add (Z.add na nb) nc) nd)) (Z.lt (Z.add (Z.add (Z.add ne nf) ng) nh) Z0)) (and (Z.lt (Z.add (Z.add (Z.add na nb) nc) nd) Z0) (Z.lt Z0 (Z.add (Z.add (Z.add ne nf) ng) nh))), quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
intros [(H_nabcd, H_nefgh)| (H1, _)]; [ idtac | apply False_ind; generalize (Zsgn_9 _ na_nb_nc_nd_eq_one); apply Zlt_asym; assumption ].
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) np1 np2 *)
destruct np1 as [p| p| ].
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) np2 *)
let T_local := (apply quadraticAcc_wf; solve [ assumption | omega | match goal with | id1:(?X1 = (?X2, (?X3, (?X4, nR ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (nR p0) H) | id1:(?X1 = (?X2, (?X3, (?X4, dL ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (dL p0) H) end; intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ try apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ]) in (destruct np2 as [p0| p0| ]; [ T_local | T_local | idtac ]).
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (nR p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (nR p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (nR p) One) *)
discriminate.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (nR p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (nR p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply Zplus_le_0_compat; try apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | assumption || (rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption) | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zle_resp_neg; assumption ] ].
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) np2 *)
let T_local := (apply quadraticAcc_wf; solve [ assumption | omega | match goal with | id1:(?X1 = (?X2, (?X3, (?X4, nR ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (nR p0) H) | id1:(?X1 = (?X2, (?X3, (?X4, dL ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (dL p0) H) end; intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ try apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ]) in (destruct np2 as [p0| p0| ]; [ T_local | T_local | idtac ]).
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) (dL p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (dL p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (dL p) One) *)
discriminate.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (dL p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
(* Goal: homographicAcc (Z.add na nb) (Z.add nc nd) (Z.add (Z.opp ne) (Z.opp nf)) (Z.add (Z.opp ng) (Z.opp nh)) (dL p) *)
apply homographicAcc_wf; solve [ rewrite Zplus_assoc; assumption || omega | generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply Zplus_le_0_compat; try apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | assumption || (rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption) | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zle_resp_neg; assumption ] ].
(* Goal: quadraticAcc na nb nc nd (Z.opp ne) (Z.opp nf) (Z.opp ng) (Z.opp nh) One np2 *)
apply quadraticacc0.
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) np2 *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: homographicAcc (Z.add na nc) (Z.add nb nd) (Z.add (Z.opp ne) (Z.opp ng)) (Z.add (Z.opp nf) (Z.opp nh)) np2 *)
let T_local := (apply homographicAcc_wf; solve [ omega | match goal with | id1:(?X1 = (?X2, (?X3, (?X4, nR ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (nR p) H) | id1:(?X1 = (?X2, (?X3, (?X4, dL ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (dL p) H) end; intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, H_discriminate_me)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply Zplus_le_0_compat; try apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zle_resp_neg; assumption | assumption || (rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption) | apply False_ind; generalize H_nabcd; apply Zle_not_lt; omega | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ]) in (destruct np2 as [p| p| ]; [ T_local | T_local | apply homographicacc0; reflexivity || omega ]).
Qed.
Lemma Qquadratic_Qpositive_to_Q_quadraticAcc_neg_2 :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive)
(H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2),
~ same_ratio a b c d e f g h ->
q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero = (-1)%Z ->
Z.sgn
Proof.
(* Goal: forall (a b c d e f g h : Z) (p1 p2 : Qpositive) (H_Qquadratic_sg_denom_nonzero : Qquadratic_sg_denom_nonzero e f g h p1 p2) (_ : not (same_ratio a b c d e f g h)) (_ : @eq Z (q_sign a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (Zneg xH)) (_ : @eq Z (Z.sgn (Z.add (Z.add (Z.add (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero))) (Zneg xH)), quadraticAcc (Z.opp (qnew_a a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_b a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_c a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero)) (qnew_e a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_f a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_g a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_h a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_p1 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) (qnew_p2 a b c d e f g h p1 p2 H_Qquadratic_sg_denom_nonzero) *)
intros a b c d e f g h p1 p2 H_qsign not_same_ratio_abcdefgh l1_eq_min_one na_nb_nc_nd_eq_minus_one.
(* Goal: quadraticAcc (Z.opp (qnew_a a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_b a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_c a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (na := qnew_a a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp (qnew_b a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_c a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nb := qnew_b a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp (qnew_c a b c d e f g h p1 p2 H_qsign)) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nc := qnew_c a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp (qnew_d a b c d e f g h p1 p2 H_qsign)) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nd := qnew_d a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) (qnew_e a b c d e f g h p1 p2 H_qsign) (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ne := qnew_e a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne (qnew_f a b c d e f g h p1 p2 H_qsign) (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nf := qnew_f a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (ng := qnew_g a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng (qnew_h a b c d e f g h p1 p2 H_qsign) (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (nh := qnew_h a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np1 := qnew_p1 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 (qnew_p2 a b c d e f g h p1 p2 H_qsign) *)
set (np2 := qnew_p2 a b c d e f g h p1 p2 H_qsign) in *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
assert (H : Qquadratic_sign a b c d e f g h p1 p2 H_qsign = ((-1)%Z, (na, (nb, (nc, nd)), (ne, (nf, (ng, nh))), (np1, np2)))).
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zneg xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) na (@pair Z (prod Z Z) nb (@pair Z Z nc nd))) (@pair Z (prod Z (prod Z Z)) ne (@pair Z (prod Z Z) nf (@pair Z Z ng nh)))) (@pair Qpositive Qpositive np1 np2))) *)
unfold na, nb, nc, nd, ne, nf, ng, nh, np1, np2 in |- *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Zneg xH) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
rewrite <- l1_eq_min_one.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (qnew_a a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_b a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_c a b c d e f g h p1 p2 H_qsign) (qnew_d a b c d e f g h p1 p2 H_qsign)))) (@pair Z (prod Z (prod Z Z)) (qnew_e a b c d e f g h p1 p2 H_qsign) (@pair Z (prod Z Z) (qnew_f a b c d e f g h p1 p2 H_qsign) (@pair Z Z (qnew_g a b c d e f g h p1 p2 H_qsign) (qnew_h a b c d e f g h p1 p2 H_qsign))))) (@pair Qpositive Qpositive (qnew_p1 a b c d e f g h p1 p2 H_qsign) (qnew_p2 a b c d e f g h p1 p2 H_qsign)))) *)
unfold qnew_a, qnew_b, qnew_c, qnew_d, qnew_e, qnew_f, qnew_g, qnew_h, qnew_p1, qnew_p2 in |- *.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
(* Goal: @eq (prod Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive))) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign) (@pair Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (q_sign a b c d e f g h p1 p2 H_qsign) (@pair (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@pair (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@fst (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))))))) (@pair Z (prod Z (prod Z Z)) (@fst Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))) (@pair Z (prod Z Z) (@fst Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))))) (@pair Z Z (@fst Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) (@snd Z Z (@snd Z (prod Z Z) (@snd Z (prod Z (prod Z Z)) (@snd (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z))) (@fst (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))))))) (@pair Qpositive Qpositive (@fst Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)))) (@snd Qpositive Qpositive (@snd (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive) (@snd Z (prod (prod (prod Z (prod Z (prod Z Z))) (prod Z (prod Z (prod Z Z)))) (prod Qpositive Qpositive)) (Qquadratic_sign a b c d e f g h p1 p2 H_qsign))))))) *)
replace (q_sign a b c d e f g h p1 p2 H_qsign) with (fst (Qquadratic_sign a b c d e f g h p1 p2 H_qsign)); [ idtac | reflexivity ]; repeat rewrite <- pair_1; reflexivity.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
generalize (Qquadratic_sign_neg_1 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh np1 np2 H).
(* Goal: forall _ : sumbool (and (Z.lt Z0 (Z.add (Z.add (Z.add na nb) nc) nd)) (Z.lt (Z.add (Z.add (Z.add ne nf) ng) nh) Z0)) (and (Z.lt (Z.add (Z.add (Z.add na nb) nc) nd) Z0) (Z.lt Z0 (Z.add (Z.add (Z.add ne nf) ng) nh))), quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
intros [(H1, _)| (H_nabcd, H_nefgh)]; [ apply False_ind; generalize (Zsgn_10 _ na_nb_nc_nd_eq_minus_one); apply Zlt_asym; assumption | idtac ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh np1 np2 *)
destruct np1 as [p| p| ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (nR p) np2 *)
let T_local := (apply quadraticAcc_wf; solve [ assumption || omega | match goal with | id1:(?X1 = (?X2, (?X3, (?X4, nR ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (nR p0) H) | id1:(?X1 = (?X2, (?X3, (?X4, dL ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) (dL p0) H) end; intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | try apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ]) in (destruct np2 as [p0| p0| ]; [ T_local | T_local | idtac ]).
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (nR p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add ne nf) (Z.add ng nh) (nR p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (nR p) One) *)
discriminate.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add ne nf) (Z.add ng nh) (nR p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add ne nf) (Z.add ng nh) (nR p) *)
apply homographicAcc_wf; solve [ omega | generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (nR p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zplus_le_0_compat; try apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zplus_le_0_compat; assumption | assumption || (rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption) ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) np2 *)
let T_local := (apply quadraticAcc_wf; solve [ assumption || omega | match goal with | id1:(?X1 = (?X2, (?X3, (?X4, nR ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (nR p0) H) | id1:(?X1 = (?X2, (?X3, (?X4, dL ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) (dL p0) H) end; intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | try apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ]) in (destruct np2 as [p0| p0| ]; [ T_local | T_local | idtac ]).
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh (dL p) One *)
apply quadraticacc0'.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add ne nf) (Z.add ng nh) (dL p) *)
(* Goal: @eq Qpositive One One *)
(* Goal: not (@eq Qpositive (dL p) One) *)
discriminate.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add ne nf) (Z.add ng nh) (dL p) *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nb)) (Z.add (Z.opp nc) (Z.opp nd)) (Z.add ne nf) (Z.add ng nh) (dL p) *)
apply homographicAcc_wf; solve [ rewrite Zplus_assoc; assumption || omega | generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh (dL p) One H); intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (H_discriminate_me, _)]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]| (_, (_, (Hab, (Hcd, (Hef, Hgh)))))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zplus_le_0_compat; try apply Zle_neg_opp; assumption | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me | apply False_ind; generalize H_nabcd; apply Zle_not_lt; rewrite <- Zplus_assoc; apply Zplus_le_0_compat; assumption | assumption || (rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption) ] ].
(* Goal: quadraticAcc (Z.opp na) (Z.opp nb) (Z.opp nc) (Z.opp nd) ne nf ng nh One np2 *)
apply quadraticacc0.
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add ne ng) (Z.add nf nh) np2 *)
(* Goal: @eq Qpositive One One *)
reflexivity.
(* Goal: homographicAcc (Z.add (Z.opp na) (Z.opp nc)) (Z.add (Z.opp nb) (Z.opp nd)) (Z.add ne ng) (Z.add nf nh) np2 *)
let T_local := (apply homographicAcc_wf; try solve [ omega | match goal with | id1:(?X1 = (?X2, (?X3, (?X4, nR ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (nR p) H) | id1:(?X1 = (?X2, (?X3, (?X4, dL ?X5)))) |- ?X6 => generalize (Qquadratic_sign_neg_2 a b c d e f g h p1 p2 H_qsign na nb nc nd ne nf ng nh One (dL p) H) end; intros [[[[[[(Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))| (Ha, (Hb, (Hc, (Hd, (He, (Hf, (Hg, Hh)))))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, (Hab, (Hcd, (Hef, Hgh))))]| (_, H_discriminate_me)]| (_, (H_discriminate_me,_))]| (_, (H_discriminate_me,_))]; [ apply False_ind; generalize H_nabcd; apply Zle_not_lt; repeat apply Zplus_le_0_compat; assumption | apply Zplus_le_0_compat; try apply Zle_neg_opp; assumption | apply False_ind; generalize H_nabcd; apply Zle_not_lt; omega | assumption || (rewrite <- Zopp_plus_distr; apply Zle_neg_opp; assumption) | discriminate H_discriminate_me | discriminate H_discriminate_me | discriminate H_discriminate_me ] ]) in (destruct np2 as [p| p| ]; [ T_local | T_local | apply homographicacc0; reflexivity || omega ]).
Qed.
|
Require Export Lib_Plus.
Lemma plus_mult : forall n : nat, n + n = 2 * n.
Proof.
(* Goal: forall n : nat, @eq nat (Init.Nat.add n n) (Init.Nat.mul (S (S O)) n) *)
intros n; simpl in |- *; elim plus_n_O; auto with arith.
Qed.
Hint Resolve plus_mult.
Lemma lt_mult_lt_O : forall n m : nat, 0 < n * m -> 0 < m -> 0 < n.
Proof.
(* Goal: forall (n m : nat) (_ : lt O (Init.Nat.mul n m)) (_ : lt O m), lt O n *)
simple induction n; auto with arith.
Qed.
Lemma le_mult_cst : forall x y a : nat, x <= y -> a * x <= a * y.
Proof.
(* Goal: forall (x y a : nat) (_ : le x y), le (Init.Nat.mul a x) (Init.Nat.mul a y) *)
auto with arith.
Qed.
Lemma le_mult_csts : forall a b c d : nat, a <= b -> c <= d -> a * c <= b * d.
Proof.
(* Goal: forall (a b c d : nat) (_ : le a b) (_ : le c d), le (Init.Nat.mul a c) (Init.Nat.mul b d) *)
intros.
(* Goal: le (Init.Nat.mul a c) (Init.Nat.mul b d) *)
apply le_trans with (a * d).
(* Goal: le (Init.Nat.mul a d) (Init.Nat.mul b d) *)
(* Goal: le (Init.Nat.mul a c) (Init.Nat.mul a d) *)
apply le_mult_cst; assumption.
(* Goal: le (Init.Nat.mul a d) (Init.Nat.mul b d) *)
elim mult_comm; elim mult_comm with d b.
(* Goal: le (Nat.mul d a) (Nat.mul d b) *)
apply le_mult_cst; assumption.
Qed.
Hint Resolve le_mult_csts.
Lemma lt_mult_n_Sn : forall n m : nat, 0 < m -> n * m < S n * m.
Proof.
(* Goal: forall (n m : nat) (_ : lt O m), lt (Init.Nat.mul n m) (Init.Nat.mul (S n) m) *)
simple induction n; simple induction m; auto with arith.
(* Goal: forall (n : nat) (_ : forall _ : lt O n, lt (Init.Nat.mul (S n0) n) (Init.Nat.mul (S (S n0)) n)) (_ : lt O (S n)), lt (Init.Nat.mul (S n0) (S n)) (Init.Nat.mul (S (S n0)) (S n)) *)
(* Goal: forall _ : lt O O, lt (Init.Nat.mul (S n0) O) (Init.Nat.mul (S (S n0)) O) *)
(* Goal: forall (n : nat) (_ : forall _ : lt O n, lt (Init.Nat.mul O n) (Init.Nat.mul (S O) n)) (_ : lt O (S n)), lt (Init.Nat.mul O (S n)) (Init.Nat.mul (S O) (S n)) *)
intros; simpl in |- *.
(* Goal: forall (n : nat) (_ : forall _ : lt O n, lt (Init.Nat.mul (S n0) n) (Init.Nat.mul (S (S n0)) n)) (_ : lt O (S n)), lt (Init.Nat.mul (S n0) (S n)) (Init.Nat.mul (S (S n0)) (S n)) *)
(* Goal: forall _ : lt O O, lt (Init.Nat.mul (S n0) O) (Init.Nat.mul (S (S n0)) O) *)
(* Goal: lt O (S (Init.Nat.add n0 O)) *)
elim plus_n_O; auto with arith.
(* Goal: forall (n : nat) (_ : forall _ : lt O n, lt (Init.Nat.mul (S n0) n) (Init.Nat.mul (S (S n0)) n)) (_ : lt O (S n)), lt (Init.Nat.mul (S n0) (S n)) (Init.Nat.mul (S (S n0)) (S n)) *)
(* Goal: forall _ : lt O O, lt (Init.Nat.mul (S n0) O) (Init.Nat.mul (S (S n0)) O) *)
intro.
(* Goal: forall (n : nat) (_ : forall _ : lt O n, lt (Init.Nat.mul (S n0) n) (Init.Nat.mul (S (S n0)) n)) (_ : lt O (S n)), lt (Init.Nat.mul (S n0) (S n)) (Init.Nat.mul (S (S n0)) (S n)) *)
(* Goal: lt (Init.Nat.mul (S n0) O) (Init.Nat.mul (S (S n0)) O) *)
elim mult_n_O; elim mult_n_O; auto with arith.
(* Goal: forall (n : nat) (_ : forall _ : lt O n, lt (Init.Nat.mul (S n0) n) (Init.Nat.mul (S (S n0)) n)) (_ : lt O (S n)), lt (Init.Nat.mul (S n0) (S n)) (Init.Nat.mul (S (S n0)) (S n)) *)
intros; simpl in |- *; apply lt_n_S; auto with arith.
Qed.
Hint Resolve lt_mult_n_Sn.
Lemma lt_mult_cst : forall x y a : nat, x < y -> 0 < a -> a * x < a * y.
Proof.
(* Goal: forall (x y a : nat) (_ : lt x y) (_ : lt O a), lt (Init.Nat.mul a x) (Init.Nat.mul a y) *)
intros.
(* Goal: lt (Init.Nat.mul a x) (Init.Nat.mul a y) *)
elim H.
(* Goal: forall (m : nat) (_ : le (S x) m) (_ : lt (Init.Nat.mul a x) (Init.Nat.mul a m)), lt (Init.Nat.mul a x) (Init.Nat.mul a (S m)) *)
(* Goal: lt (Init.Nat.mul a x) (Init.Nat.mul a (S x)) *)
elim mult_comm; elim mult_comm with (S x) a.
(* Goal: forall (m : nat) (_ : le (S x) m) (_ : lt (Init.Nat.mul a x) (Init.Nat.mul a m)), lt (Init.Nat.mul a x) (Init.Nat.mul a (S m)) *)
(* Goal: lt (Nat.mul x a) (Nat.mul (S x) a) *)
apply lt_mult_n_Sn; assumption.
(* Goal: forall (m : nat) (_ : le (S x) m) (_ : lt (Init.Nat.mul a x) (Init.Nat.mul a m)), lt (Init.Nat.mul a x) (Init.Nat.mul a (S m)) *)
intros.
(* Goal: lt (Init.Nat.mul a x) (Init.Nat.mul a (S m)) *)
apply lt_trans with (a * m).
(* Goal: lt (Init.Nat.mul a m) (Init.Nat.mul a (S m)) *)
(* Goal: lt (Init.Nat.mul a x) (Init.Nat.mul a m) *)
assumption.
(* Goal: lt (Init.Nat.mul a m) (Init.Nat.mul a (S m)) *)
elim mult_comm; elim mult_comm with (S m) a.
(* Goal: lt (Nat.mul m a) (Nat.mul (S m) a) *)
apply lt_mult_n_Sn; assumption.
Qed.
Hint Resolve lt_mult_cst.
Lemma lt_mult_csts : forall a b c d : nat, a < b -> c < d -> a * c < b * d.
Proof.
(* Goal: forall (a b c d : nat) (_ : lt a b) (_ : lt c d), lt (Init.Nat.mul a c) (Init.Nat.mul b d) *)
intros.
(* Goal: lt (Init.Nat.mul a c) (Init.Nat.mul b d) *)
apply le_lt_trans with (a * d).
(* Goal: lt (Init.Nat.mul a d) (Init.Nat.mul b d) *)
(* Goal: le (Init.Nat.mul a c) (Init.Nat.mul a d) *)
apply le_mult_cst.
(* Goal: lt (Init.Nat.mul a d) (Init.Nat.mul b d) *)
(* Goal: le c d *)
apply lt_le_weak; assumption.
(* Goal: lt (Init.Nat.mul a d) (Init.Nat.mul b d) *)
elim mult_comm; elim mult_comm with d b.
(* Goal: lt (Nat.mul d a) (Nat.mul d b) *)
apply lt_mult_cst.
(* Goal: lt O d *)
(* Goal: lt a b *)
assumption.
(* Goal: lt O d *)
apply lt_O with c; auto with arith.
Qed.
Hint Resolve lt_mult_csts.
Lemma pred_mult : forall n m : nat, 0 < n -> n * m = pred n * m + m.
Proof.
(* Goal: forall (n m : nat) (_ : lt O n), @eq nat (Init.Nat.mul n m) (Init.Nat.add (Init.Nat.mul (Init.Nat.pred n) m) m) *)
intros.
(* Goal: @eq nat (Init.Nat.mul n m) (Init.Nat.add (Init.Nat.mul (Init.Nat.pred n) m) m) *)
elim H; simpl in |- *; auto with arith.
Qed.
Hint Resolve pred_mult.
Lemma le_lt_plus_mult :
forall n m p n' p' : nat, n <= n' -> p < p' -> n * m + p < n' * m + p'.
Proof.
(* Goal: forall (n m p n' p' : nat) (_ : le n n') (_ : lt p p'), lt (Init.Nat.add (Init.Nat.mul n m) p) (Init.Nat.add (Init.Nat.mul n' m) p') *)
intros; apply le_lt_plus; auto with arith.
Qed.
Lemma le_mult_l : forall n m : nat, 0 < m -> n <= m * n.
Proof.
(* Goal: forall (n m : nat) (_ : lt O m), le n (Init.Nat.mul m n) *)
intros.
(* Goal: le n (Init.Nat.mul m n) *)
rewrite (S_pred m 0); trivial with arith.
(* Goal: le n (Init.Nat.mul (S (Init.Nat.pred m)) n) *)
simpl in |- *; auto with arith.
Qed.
Hint Resolve le_mult_l.
Lemma le_mult_r : forall n m : nat, 0 < m -> n <= n * m.
Proof.
(* Goal: forall (n m : nat) (_ : lt O m), le n (Init.Nat.mul n m) *)
intros n m; elim (mult_comm m n); auto with arith.
Qed.
Hint Resolve le_mult_r.
Lemma lt_mult : forall n m : nat, 1 < m -> 0 < n -> n < n * m.
Proof.
(* Goal: forall (n m : nat) (_ : lt (S O) m) (_ : lt O n), lt n (Init.Nat.mul n m) *)
intros.
(* Goal: lt n (Init.Nat.mul n m) *)
pattern n at 1 in |- *.
(* Goal: (fun n0 : nat => lt n0 (Init.Nat.mul n m)) n *)
elim mult_1_r.
(* Goal: lt (Nat.mul n (S O)) (Init.Nat.mul n m) *)
apply lt_mult_cst; auto with arith.
Qed.
Hint Resolve lt_mult.
Lemma lt_SO_mult : forall n m : nat, 1 < n -> 0 < m -> 1 < n * m.
Proof.
(* Goal: forall (n m : nat) (_ : lt (S O) n) (_ : lt O m), lt (S O) (Init.Nat.mul n m) *)
intros.
(* Goal: lt (S O) (Init.Nat.mul n m) *)
apply lt_le_trans with (1 * n).
(* Goal: le (Init.Nat.mul (S O) n) (Init.Nat.mul n m) *)
(* Goal: lt (S O) (Init.Nat.mul (S O) n) *)
auto with arith.
(* Goal: le (Init.Nat.mul (S O) n) (Init.Nat.mul n m) *)
simpl in |- *.
(* Goal: le (Init.Nat.add n O) (Init.Nat.mul n m) *)
elim plus_n_O.
(* Goal: le n (Init.Nat.mul n m) *)
apply le_mult_r; auto with arith.
Qed.
Lemma plus_m_mult_n_m : forall n m : nat, m + n * m = S n * m.
Proof.
(* Goal: forall n m : nat, @eq nat (Init.Nat.add m (Init.Nat.mul n m)) (Init.Nat.mul (S n) m) *)
simple induction n; simple induction m; simpl in |- *; auto with arith.
Qed.
Lemma y_eq_multxy : forall x y : nat, x = 1 \/ y = 0 -> y = x * y.
Proof.
(* Goal: forall (x y : nat) (_ : or (@eq nat x (S O)) (@eq nat y O)), @eq nat y (Init.Nat.mul x y) *)
intros x y H; elim H; clear H; intros H; rewrite H; simpl in |- *; auto with arith.
Qed.
Lemma mult_plus_distr_left : forall n m p : nat, p * (n + m) = p * n + p * m.
Proof.
(* Goal: forall n m p : nat, @eq nat (Init.Nat.mul p (Init.Nat.add n m)) (Init.Nat.add (Init.Nat.mul p n) (Init.Nat.mul p m)) *)
intros; elim mult_comm.
(* Goal: @eq nat (Nat.mul (Init.Nat.add n m) p) (Init.Nat.add (Init.Nat.mul p n) (Init.Nat.mul p m)) *)
elim (mult_comm n p).
(* Goal: @eq nat (Nat.mul (Init.Nat.add n m) p) (Init.Nat.add (Nat.mul n p) (Init.Nat.mul p m)) *)
elim (mult_comm m p).
(* Goal: @eq nat (Nat.mul (Init.Nat.add n m) p) (Init.Nat.add (Nat.mul n p) (Nat.mul m p)) *)
auto with arith.
Qed.
Hint Resolve mult_plus_distr_left.
Lemma mult_minus_distr_left : forall n m p : nat, p * (n - m) = p * n - p * m.
Proof.
(* Goal: forall n m p : nat, @eq nat (Init.Nat.mul p (Init.Nat.sub n m)) (Init.Nat.sub (Init.Nat.mul p n) (Init.Nat.mul p m)) *)
intros.
(* Goal: @eq nat (Init.Nat.mul p (Init.Nat.sub n m)) (Init.Nat.sub (Init.Nat.mul p n) (Init.Nat.mul p m)) *)
rewrite (mult_comm p (n - m)); rewrite (mult_comm p n); rewrite (mult_comm p m); auto with arith.
Qed.
Hint Resolve mult_minus_distr_left.
Lemma mult_eq_zero : forall a b : nat, a * b = 0 -> a = 0 \/ b = 0.
Proof.
(* Goal: forall (a b : nat) (_ : @eq nat (Init.Nat.mul a b) O), or (@eq nat a O) (@eq nat b O) *)
intros a b; elim a.
(* Goal: forall (n : nat) (_ : forall _ : @eq nat (Init.Nat.mul n b) O, or (@eq nat n O) (@eq nat b O)) (_ : @eq nat (Init.Nat.mul (S n) b) O), or (@eq nat (S n) O) (@eq nat b O) *)
(* Goal: forall _ : @eq nat (Init.Nat.mul O b) O, or (@eq nat O O) (@eq nat b O) *)
auto with arith.
(* Goal: forall (n : nat) (_ : forall _ : @eq nat (Init.Nat.mul n b) O, or (@eq nat n O) (@eq nat b O)) (_ : @eq nat (Init.Nat.mul (S n) b) O), or (@eq nat (S n) O) (@eq nat b O) *)
intros n H_rec H.
(* Goal: or (@eq nat (S n) O) (@eq nat b O) *)
right.
(* Goal: @eq nat b O *)
elim (plus_eq_zero (n * b) b); auto with arith.
(* Goal: @eq nat (Init.Nat.add (Init.Nat.mul n b) b) O *)
simpl in H; elim plus_comm.
(* Goal: @eq nat (Nat.add b (Init.Nat.mul n b)) O *)
auto with arith.
Qed.
Hint Resolve mult_eq_zero.
Lemma lt_mult_S_S : forall n m : nat, 0 < S n * S m.
Proof.
(* Goal: forall n m : nat, lt O (Init.Nat.mul (S n) (S m)) *)
simple induction n; simpl in |- *; auto with arith.
Qed.
Hint Resolve lt_mult_S_S.
Lemma mult_S_O : forall n m : nat, 0 = S n * m -> 0 = m.
Proof.
(* Goal: forall (n m : nat) (_ : @eq nat O (Init.Nat.mul (S n) m)), @eq nat O m *)
intros n m H.
(* Goal: @eq nat O m *)
elim (mult_eq_zero (S n) m); auto with arith.
(* Goal: forall _ : @eq nat (S n) O, @eq nat O m *)
intro; absurd (S n = 0); auto with arith.
Qed.
Lemma mult_reg_l : forall a b p : nat, p * a = p * b -> p = 0 \/ a = b.
Hint Resolve mult_reg_l.
Lemma mult_reg_l_bis : forall a b p : nat, 0 < p -> p * a = p * b -> a = b.
Proof.
(* Goal: forall (a b p : nat) (_ : lt O p) (_ : @eq nat (Init.Nat.mul p a) (Init.Nat.mul p b)), @eq nat a b *)
intros a b p H H1.
(* Goal: @eq nat a b *)
elim (mult_reg_l a b p); auto with arith.
(* Goal: forall _ : @eq nat p O, @eq nat a b *)
intro; absurd (p = 0); auto with arith.
Qed.
Hint Immediate mult_reg_l_bis.
Lemma mult_eq_zero_bis : forall a b : nat, 0 < a -> a * b = 0 -> b = 0.
Proof.
(* Goal: forall (a b : nat) (_ : lt O a) (_ : @eq nat (Init.Nat.mul a b) O), @eq nat b O *)
intros a b pos H.
(* Goal: @eq nat b O *)
elim (mult_eq_zero a b H); auto with arith.
(* Goal: forall _ : @eq nat a O, @eq nat b O *)
intro h.
(* Goal: @eq nat b O *)
absurd (a = 0); auto with arith.
Qed.
Hint Immediate mult_eq_zero_bis.
Lemma lt_nm_mult : forall n m : nat, 0 < n -> 0 < m -> 0 < n * m.
Proof.
(* Goal: forall (n m : nat) (_ : lt O n) (_ : lt O m), lt O (Init.Nat.mul n m) *)
intros n m H1 H2.
(* Goal: lt O (Init.Nat.mul n m) *)
elim H1; elim H2; simpl in |- *; auto with arith.
Qed.
Hint Resolve lt_nm_mult.
Lemma same_quotient_order :
forall b q q' r r' : nat, r < b -> q < q' -> q * b + r < q' * b + r'.
Proof.
(* Goal: forall (b q q' r r' : nat) (_ : lt r b) (_ : lt q q'), lt (Init.Nat.add (Init.Nat.mul q b) r) (Init.Nat.add (Init.Nat.mul q' b) r') *)
intros.
(* Goal: lt (Init.Nat.add (Init.Nat.mul q b) r) (Init.Nat.add (Init.Nat.mul q' b) r') *)
apply lt_le_trans with (q * b + b).
(* Goal: le (Init.Nat.add (Init.Nat.mul q b) b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: lt (Init.Nat.add (Init.Nat.mul q b) r) (Init.Nat.add (Init.Nat.mul q b) b) *)
apply plus_lt_compat_l.
(* Goal: le (Init.Nat.add (Init.Nat.mul q b) b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: lt r b *)
try trivial with arith.
(* Goal: le (Init.Nat.add (Init.Nat.mul q b) b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
pattern b at 2 in |- *.
(* Goal: (fun n : nat => le (Init.Nat.add (Init.Nat.mul q b) n) (Init.Nat.add (Init.Nat.mul q' b) r')) b *)
replace b with (1 * b).
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.add (Init.Nat.mul q b) (Init.Nat.mul (S O) b)) (Init.Nat.add (Init.Nat.mul q' b) r') *)
elim mult_plus_distr_r.
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Nat.mul (Nat.add q (S O)) b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
apply le_trans with (q' * b).
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.mul q' b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: le (Nat.mul (Nat.add q (S O)) b) (Init.Nat.mul q' b) *)
elim (mult_comm b (q + 1)); elim (mult_comm b q').
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.mul q' b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: le (Nat.mul b (Init.Nat.add q (S O))) (Nat.mul b q') *)
apply le_mult_cst.
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.mul q' b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: le (Init.Nat.add q (S O)) q' *)
replace (q + 1) with (S q).
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.mul q' b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: @eq nat (S q) (Init.Nat.add q (S O)) *)
(* Goal: le (S q) q' *)
auto with arith.
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.mul q' b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
(* Goal: @eq nat (S q) (Init.Nat.add q (S O)) *)
elim plus_comm; simpl in |- *; auto with arith.
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
(* Goal: le (Init.Nat.mul q' b) (Init.Nat.add (Init.Nat.mul q' b) r') *)
auto with arith.
(* Goal: @eq nat (Init.Nat.mul (S O) b) b *)
simpl in |- *; auto with arith.
Qed.
Hint Resolve same_quotient_order.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearbetween.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NChelper.
Require Export GeoCoq.Elements.OriginalProofs.lemma_NCorder.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_parallelcollinear1 :
forall A B C c d,
TP A B c d -> BetS C c d ->
TP A B C d.
Proof.
(* Goal: forall (A B C c d : @Point Ax0) (_ : @TP Ax0 A B c d) (_ : @BetS Ax0 C c d), @TP Ax0 A B C d *)
intros.
(* Goal: @TP Ax0 A B C d *)
assert (Col C c d) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (neq C c) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (neq c d) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (neq C d) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert ((neq A B /\ neq c d /\ ~ Meet A B c d /\ OS c d A B)) by (conclude_def TP ).
(* Goal: @TP Ax0 A B C d *)
let Tf:=fresh in assert (Tf:exists p q r, (Col A B p /\ Col A B r /\ BetS c p q /\ BetS d r q /\ nCol A B c /\ nCol A B d)) by (conclude_def OS );destruct Tf as [p[q[r]]];spliter.
(* Goal: @TP Ax0 A B C d *)
assert (BetS q r d) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (Col C c d) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col c d C) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (BetS d c C) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (BetS q p c) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (~ eq p r).
(* Goal: @TP Ax0 A B C d *)
(* Goal: not (@eq Ax0 p r) *)
{
(* Goal: not (@eq Ax0 p r) *)
intro.
(* Goal: False *)
assert (Col q r d) by (conclude_def Col ).
(* Goal: False *)
assert (Col q p c) by (conclude_def Col ).
(* Goal: False *)
assert (Col q p d) by (conclude cn_equalitysub).
(* Goal: False *)
assert (neq q p) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col p c d) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col c d p) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B c d) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
}
(* Goal: @TP Ax0 A B C d *)
assert (Col q p c) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (~ Col q d C).
(* Goal: @TP Ax0 A B C d *)
(* Goal: not (@Col Ax0 q d C) *)
{
(* Goal: not (@Col Ax0 q d C) *)
intro.
(* Goal: False *)
assert (Col d c C) by (conclude_def Col ).
(* Goal: False *)
assert (Col C d c) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col C d q) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C d) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col d c q) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col c q d) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col c q p) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq q c) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq c q) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col q d p) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col q r d) by (conclude_def Col ).
(* Goal: False *)
assert (Col q d r) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq q d) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col d p r) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col B p r) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col B A p) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B p A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col B A r) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A p r) by (conclude lemma_collinear4).
(* Goal: False *)
assert (~ neq B p).
(* Goal: False *)
(* Goal: not (@neq Ax0 B p) *)
{
(* Goal: not (@neq Ax0 B p) *)
intro.
(* Goal: False *)
assert (Col p r A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col p r d) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col r A d) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col r A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (~ neq r A).
(* Goal: False *)
(* Goal: not (@neq Ax0 r A) *)
{
(* Goal: not (@neq Ax0 r A) *)
intro.
(* Goal: False *)
assert (Col A d B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B d) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
(* BG Goal: False *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (Col p A d) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col p A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (~ neq p A).
(* Goal: False *)
(* Goal: not (@neq Ax0 p A) *)
{
(* Goal: not (@neq Ax0 p A) *)
intro.
(* Goal: False *)
assert (Col A d B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B d) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
(* BG Goal: False *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (eq A p) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
assert (eq r p) by (conclude cn_equalitytransitive).
(* Goal: False *)
assert (Col q p d) by (conclude cn_equalitysub).
(* Goal: False *)
assert (neq q p) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col p c d) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col c d p) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B c d) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (neq A p) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col A p B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (~ eq r A).
(* Goal: False *)
(* Goal: not (@eq Ax0 r A) *)
{
(* Goal: not (@eq Ax0 r A) *)
intro.
(* Goal: False *)
assert (Col d p A) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col d B A) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col A B d) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (Col r A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col d B r) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Col r B d) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col r B A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (~ neq r B).
(* Goal: False *)
(* Goal: not (@neq Ax0 r B) *)
{
(* Goal: not (@neq Ax0 r B) *)
intro.
(* Goal: False *)
assert (Col B d A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B d) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
(* BG Goal: False *)
}
(* Goal: False *)
assert (eq B r) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
assert (eq p B) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
assert (eq p r) by (conclude cn_equalitytransitive).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
}
(* Goal: @TP Ax0 A B C d *)
let Tf:=fresh in assert (Tf:exists E, (BetS q E c /\ BetS C E r)) by (conclude postulate_Pasch_inner);destruct Tf as [E];spliter.
(* Goal: @TP Ax0 A B C d *)
assert (BetS r E C) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (Col q E c) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col q c p) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col q c E) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (neq q c) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (Col c p E) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col c E p) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (neq r p) by (conclude lemma_inequalitysymmetric).
(* Goal: @TP Ax0 A B C d *)
let Tf:=fresh in assert (Tf:exists J, (BetS r p J /\ Cong p J r p)) by (conclude lemma_extension);destruct Tf as [J];spliter.
(* Goal: @TP Ax0 A B C d *)
assert (BetS J p r) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (Col J p r) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (neq J r) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (neq p r) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (neq J p) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (Col B p r) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col B A p) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B A r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: @TP Ax0 A B C d *)
assert (Col A p r) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col p r A) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col p r B) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (~ Meet C d J r).
(* Goal: @TP Ax0 A B C d *)
(* Goal: not (@Meet Ax0 C d J r) *)
{
(* Goal: not (@Meet Ax0 C d J r) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists K, (neq C d /\ neq J r /\ Col C d K /\ Col J r K)) by (conclude_def Meet );destruct Tf as [K];spliter.
(* Goal: False *)
assert (Col C c d) by (conclude_def Col ).
(* Goal: False *)
assert (Col C d c) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq c d) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq d c) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col d c K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col c d K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col r p J) by (conclude_def Col ).
(* Goal: False *)
assert (Col r J p) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq r J) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col r J K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col J p K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col J p r) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq p J) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq J p) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col p K r) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col p r K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A B K) by (conclude lemma_collinear5).
(* Goal: False *)
assert (Meet A B c d) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
}
(* Goal: @TP Ax0 A B C d *)
assert (BetS c E p) by (conclude lemma_collinearbetween).
(* Goal: @TP Ax0 A B C d *)
assert (BetS p E c) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (BetS q p E) by (conclude axiom_innertransitivity).
(* Goal: @TP Ax0 A B C d *)
assert (nCol p r c) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol p c r) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col q p c) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col p c q) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (eq c c) by (conclude cn_equalityreflexive).
(* Goal: @TP Ax0 A B C d *)
assert (Col p c c) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (neq q c) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (nCol q c r) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol q r c) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (neq q d) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (Col q r d) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (eq q q) by (conclude cn_equalityreflexive).
(* Goal: @TP Ax0 A B C d *)
assert (Col q r q) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (nCol q d c) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol d c q) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col C c d) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col d c C) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (eq d d) by (conclude cn_equalityreflexive).
(* Goal: @TP Ax0 A B C d *)
assert (Col d c d) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (neq C d) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (neq d C) by (conclude lemma_inequalitysymmetric).
(* Goal: @TP Ax0 A B C d *)
assert (nCol d C q) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol d q C) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col q r d) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col d q r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col d q q) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (~ eq r C).
(* Goal: @TP Ax0 A B C d *)
(* Goal: not (@eq Ax0 r C) *)
{
(* Goal: not (@eq Ax0 r C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude cn_equalitysub).
(* Goal: False *)
assert (Meet A B c d) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
}
(* Goal: @TP Ax0 A B C d *)
assert (~ eq r q).
(* Goal: @TP Ax0 A B C d *)
(* Goal: not (@eq Ax0 r q) *)
{
(* Goal: not (@eq Ax0 r q) *)
intro.
(* Goal: False *)
assert (Col r q c) by (conclude_def Col ).
(* Goal: False *)
assert (Col q r c) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
}
(* Goal: @TP Ax0 A B C d *)
assert (nCol r q C) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol r C q) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (BetS r E C) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
let Tf:=fresh in assert (Tf:exists F, (BetS q F C /\ BetS r p F)) by (conclude postulate_Pasch_outer);destruct Tf as [F];spliter.
(* Goal: @TP Ax0 A B C d *)
assert (BetS C F q) by (conclude axiom_betweennesssymmetry).
(* Goal: @TP Ax0 A B C d *)
assert (Col r p F) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col r p A) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col r p B) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col A B F) by (conclude lemma_collinear5).
(* Goal: @TP Ax0 A B C d *)
assert (eq r r) by (conclude cn_equalityreflexive).
(* Goal: @TP Ax0 A B C d *)
assert (Col d q r) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (neq q r) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (nCol q r C) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol q C r) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col q F C) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (Col q C F) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @TP Ax0 A B C d *)
assert (Col q C C) by (conclude_def Col ).
(* Goal: @TP Ax0 A B C d *)
assert (neq F C) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (nCol F C r) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (nCol F r C) by (forward_using lemma_NCorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B r p) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col B p r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B p A) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B A r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B A p) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col A r p) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col p r A) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col p r F) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (neq p r) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (Col r A F) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col F r A) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B A r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B A p) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col A r p) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col A p r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col A p B) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col A B r) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col A B p) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col B r p) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col p r B) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (Col r B F) by (conclude lemma_collinear4).
(* Goal: @TP Ax0 A B C d *)
assert (Col F r B) by (forward_using lemma_collinearorder).
(* Goal: @TP Ax0 A B C d *)
assert (nCol A B C) by (conclude lemma_NChelper).
(* Goal: @TP Ax0 A B C d *)
assert (TS C A B q) by (conclude_def TS ).
(* Goal: @TP Ax0 A B C d *)
assert (OS C d A B) by (conclude_def OS ).
(* Goal: @TP Ax0 A B C d *)
assert (~ Meet A B C d).
(* Goal: @TP Ax0 A B C d *)
(* Goal: not (@Meet Ax0 A B C d) *)
{
(* Goal: not (@Meet Ax0 A B C d) *)
intro.
(* Goal: False *)
let Tf:=fresh in assert (Tf:exists K, (neq A B /\ neq C d /\ Col A B K /\ Col C d K)) by (conclude_def Meet );destruct Tf as [K];spliter.
(* Goal: False *)
assert (Col C c d) by (conclude_def Col ).
(* Goal: False *)
assert (Col C d c) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq C d) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col d c K) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col c d K) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Meet A B c d) by (conclude_def Meet ).
(* Goal: False *)
contradict.
(* BG Goal: @TP Ax0 A B C d *)
}
(* Goal: @TP Ax0 A B C d *)
assert (neq C d) by (forward_using lemma_betweennotequal).
(* Goal: @TP Ax0 A B C d *)
assert (TP A B C d) by (conclude_def TP ).
(* Goal: @TP Ax0 A B C d *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_Euclid4.
Require Export GeoCoq.Elements.OriginalProofs.proposition_14.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_righttogether :
forall A B C G,
Per G A B -> Per B A C -> TS G B A C ->
RT G A B B A C /\ BetS G A C.
Proof.
(* Goal: forall (A B C G : @Point Ax0) (_ : @Per Ax0 G A B) (_ : @Per Ax0 B A C) (_ : @TS Ax0 G B A C), and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
intros.
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (Per B A G) by (conclude lemma_8_2).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (neq A G) by (conclude_def Per ).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (neq G A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
let Tf:=fresh in assert (Tf:exists D, (BetS G A D /\ Cong A D G A)) by (conclude lemma_extension);destruct Tf as [D];spliter.
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (neq A B) by (conclude_def Per ).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (Out A B B) by (conclude lemma_ray4).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (Supp G A B B D) by (conclude_def Supp ).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (nCol B A G) by (conclude_def TS ).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (nCol G A B) by (forward_using lemma_NCorder).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (CongA G A B G A B) by (conclude lemma_equalanglesreflexive).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (Col G A D) by (conclude_def Col ).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (neq A D) by (forward_using lemma_betweennotequal).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (neq D A) by (conclude lemma_inequalitysymmetric).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (Per D A B) by (conclude lemma_collinearright).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (Per B A D) by (conclude lemma_8_2).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (CongA B A C B A D) by (conclude lemma_Euclid4).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (RT G A B B A C) by (conclude_def RT ).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (TS C B A G) by (conclude lemma_oppositesidesymmetric).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
assert (BetS G A C) by (conclude proposition_14).
(* Goal: and (@RT Ax0 G A B B A C) (@BetS Ax0 G A C) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_2.
Require Export GeoCoq.Elements.OriginalProofs.lemma_8_3.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_altitudebisectsbase :
forall A B M P,
BetS A M B -> Cong A P B P -> Per A M P ->
Midpoint A M B.
Proof.
(* Goal: forall (A B M P : @Point Ax0) (_ : @BetS Ax0 A M B) (_ : @Cong Ax0 A P B P) (_ : @Per Ax0 A M P), @Midpoint Ax0 A M B *)
intros.
(* Goal: @Midpoint Ax0 A M B *)
let Tf:=fresh in assert (Tf:exists C, (BetS A M C /\ Cong A M C M /\ Cong A P C P /\ neq M P)) by (conclude_def Per );destruct Tf as [C];spliter.
(* Goal: @Midpoint Ax0 A M B *)
assert (BetS C M A) by (conclude axiom_betweennesssymmetry).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong C M A M) by (conclude lemma_congruencesymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong C P A P) by (conclude lemma_congruencesymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (Per C M P) by (conclude_def Per ).
(* Goal: @Midpoint Ax0 A M B *)
assert (Per P M A) by (conclude lemma_8_2).
(* Goal: @Midpoint Ax0 A M B *)
let Tf:=fresh in assert (Tf:exists Q, (BetS P M Q /\ Cong P M Q M /\ Cong P A Q A /\ neq M A)) by (conclude_def Per );destruct Tf as [Q];spliter.
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong Q M P M) by (conclude lemma_congruencesymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (Per P M C) by (conclude lemma_8_2).
(* Goal: @Midpoint Ax0 A M B *)
assert (Out M C B) by (conclude_def Out ).
(* Goal: @Midpoint Ax0 A M B *)
assert (Per P M B) by (conclude lemma_8_3).
(* Goal: @Midpoint Ax0 A M B *)
let Tf:=fresh in assert (Tf:exists E, (BetS P M E /\ Cong P M E M /\ Cong P B E B /\ neq M B)) by (conclude_def Per );destruct Tf as [E];spliter.
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong P A P B) by (forward_using lemma_congruenceflip).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong M Q P M) by (forward_using lemma_congruenceflip).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong P M M Q) by (conclude lemma_congruencesymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong E M P M) by (conclude lemma_congruencesymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong E M M Q) by (conclude lemma_congruencetransitive).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong M E M Q) by (forward_using lemma_congruenceflip).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong M Q M E) by (conclude lemma_congruencesymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (neq P M) by (forward_using lemma_betweennotequal).
(* Goal: @Midpoint Ax0 A M B *)
assert (eq Q E) by (conclude lemma_extensionunique).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong P B Q B) by (conclude cn_equalitysub).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong A P P B) by (forward_using lemma_congruenceflip).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong A P Q B) by (conclude lemma_congruencetransitive).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong A Q A P) by (forward_using lemma_doublereverse).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong A Q Q B) by (conclude lemma_congruencetransitive).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong A Q B Q) by (forward_using lemma_congruenceflip).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong P Q P Q) by (conclude cn_congruencereflexive).
(* Goal: @Midpoint Ax0 A M B *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @Midpoint Ax0 A M B *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @Midpoint Ax0 A M B *)
assert (nCol A M P) by (conclude lemma_rightangleNC).
(* Goal: @Midpoint Ax0 A M B *)
assert (~ Col A P M).
(* Goal: @Midpoint Ax0 A M B *)
(* Goal: not (@Col Ax0 A P M) *)
{
(* Goal: not (@Col Ax0 A P M) *)
intro.
(* Goal: False *)
assert (Col A M P) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @Midpoint Ax0 A M B *)
}
(* Goal: @Midpoint Ax0 A M B *)
assert (~ eq A P).
(* Goal: @Midpoint Ax0 A M B *)
(* Goal: not (@eq Ax0 A P) *)
{
(* Goal: not (@eq Ax0 A P) *)
intro.
(* Goal: False *)
assert (Col A P M) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @Midpoint Ax0 A M B *)
}
(* Goal: @Midpoint Ax0 A M B *)
assert (neq P A) by (conclude lemma_inequalitysymmetric).
(* Goal: @Midpoint Ax0 A M B *)
assert (Out P A A) by (conclude lemma_ray4).
(* Goal: @Midpoint Ax0 A M B *)
assert (~ eq P B).
(* Goal: @Midpoint Ax0 A M B *)
(* Goal: not (@eq Ax0 P B) *)
{
(* Goal: not (@eq Ax0 P B) *)
intro.
(* Goal: False *)
assert (Cong A P B B) by (conclude cn_equalitysub).
(* Goal: False *)
assert (~ neq A P).
(* Goal: False *)
(* Goal: not (@neq Ax0 A P) *)
{
(* Goal: not (@neq Ax0 A P) *)
intro.
(* Goal: False *)
assert (neq B B) by (conclude axiom_nocollapse).
(* Goal: False *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: False *)
contradict.
(* BG Goal: @Midpoint Ax0 A M B *)
(* BG Goal: False *)
}
(* Goal: False *)
contradict.
(* BG Goal: @Midpoint Ax0 A M B *)
}
(* Goal: @Midpoint Ax0 A M B *)
assert (Out P B B) by (conclude lemma_ray4).
(* Goal: @Midpoint Ax0 A M B *)
assert (Out P M Q) by (conclude lemma_ray4).
(* Goal: @Midpoint Ax0 A M B *)
assert (CongA A P M B P M) by (conclude_def CongA ).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong P M P M) by (conclude cn_congruencereflexive).
(* Goal: @Midpoint Ax0 A M B *)
assert ((Cong A M B M /\ CongA P A M P B M /\ CongA P M A P M B)) by (conclude proposition_04).
(* Goal: @Midpoint Ax0 A M B *)
assert (Cong A M M B) by (forward_using lemma_congruenceflip).
(* Goal: @Midpoint Ax0 A M B *)
assert (Midpoint A M B) by (conclude_def Midpoint ).
(* Goal: @Midpoint Ax0 A M B *)
close.
Qed.
End Euclid.
|
Require Import Omega.
Require Import List.
Import ListNotations.
Require Import StructTact.StructTactics.
Require Import StructTact.ListTactics.
Require Import StructTact.FilterMap.
Require Import StructTact.RemoveAll.
Set Implicit Arguments.
Fixpoint subseq {A} (xs ys : list A) : Prop :=
match xs, ys with
| [], _ => True
| x :: xs', y :: ys' => (x = y /\ subseq xs' ys') \/ subseq xs ys'
| _, _ => False
end.
Section subseq.
Variable A B : Type.
Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}.
Lemma subseq_refl : forall (l : list A), subseq l l.
Proof.
(* Goal: forall l : list A, @subseq A l l *)
induction l; simpl; tauto.
Qed.
Lemma subseq_trans :
forall (zs xs ys : list A),
subseq xs ys ->
subseq ys zs ->
subseq xs zs.
Proof.
(* Goal: forall (zs xs ys : list A) (_ : @subseq A xs ys) (_ : @subseq A ys zs), @subseq A xs zs *)
induction zs; intros; simpl in *; repeat break_match; subst; simpl in *; intuition; subst; eauto; right; (eapply IHzs; [|eauto]); simpl; eauto.
Qed.
Lemma subseq_In :
forall (ys xs : list A) x,
subseq xs ys ->
In x xs ->
In x ys.
Proof.
(* Goal: forall (ys xs : list A) (x : A) (_ : @subseq A xs ys) (_ : @In A x xs), @In A x ys *)
induction ys; intros.
(* Goal: @In A x (@cons A a ys) *)
(* Goal: @In A x (@nil A) *)
-
(* Goal: @In A x (@nil A) *)
destruct xs; simpl in *; intuition.
(* BG Goal: @In A x (@cons A a ys) *)
-
(* Goal: @In A x (@cons A a ys) *)
simpl in *.
(* Goal: or (@eq A a x) (@In A x ys) *)
break_match; simpl in *; intuition; subst; intuition eauto; right; (eapply IHys; [eauto| intuition]).
Qed.
Theorem subseq_NoDup :
forall (ys xs : list A),
subseq xs ys ->
NoDup ys ->
NoDup xs.
Proof.
(* Goal: forall (ys xs : list A) (_ : @subseq A xs ys) (_ : @NoDup A ys), @NoDup A xs *)
induction ys; intros.
(* Goal: @NoDup A xs *)
(* Goal: @NoDup A xs *)
-
(* Goal: @NoDup A xs *)
destruct xs; simpl in *; intuition.
(* BG Goal: @NoDup A xs *)
-
(* Goal: @NoDup A xs *)
simpl in *.
(* Goal: @NoDup A xs *)
invc_NoDup.
(* Goal: @NoDup A xs *)
break_match.
(* Goal: @NoDup A (@cons A a0 l) *)
(* Goal: @NoDup A (@nil A) *)
+
(* Goal: @NoDup A (@nil A) *)
constructor.
(* BG Goal: @NoDup A (@cons A a0 l) *)
+
(* Goal: @NoDup A (@cons A a0 l) *)
intuition.
(* Goal: @NoDup A (@cons A a0 l) *)
subst.
(* Goal: @NoDup A (@cons A a l) *)
constructor; eauto using subseq_In.
Qed.
Lemma subseq_remove :
forall (x : A) xs,
subseq (remove A_eq_dec x xs) xs.
Proof.
(* Goal: forall (x : A) (xs : list A), @subseq A (@remove A A_eq_dec x xs) xs *)
induction xs; intros; simpl.
(* Goal: match (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) with | nil => True | cons x0 xs' => or (and (@eq A x0 a) (@subseq A xs' xs)) (@subseq A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) xs) end *)
(* Goal: True *)
-
(* Goal: True *)
auto.
(* BG Goal: match (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) with | nil => True | cons x0 xs' => or (and (@eq A x0 a) (@subseq A xs' xs)) (@subseq A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) xs) end *)
-
(* Goal: match (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) with | nil => True | cons x0 xs' => or (and (@eq A x0 a) (@subseq A xs' xs)) (@subseq A (if A_eq_dec x a then @remove A A_eq_dec x xs else @cons A a (@remove A A_eq_dec x xs)) xs) end *)
repeat break_match; auto.
(* Goal: or (and (@eq A a0 a) (@subseq A l xs)) (@subseq A (@cons A a0 l) xs) *)
(* Goal: or (and (@eq A a0 a) (@subseq A l xs)) (@subseq A (@cons A a0 l) xs) *)
+
(* Goal: or (and (@eq A a0 a) (@subseq A l xs)) (@subseq A (@cons A a0 l) xs) *)
intuition congruence.
(* BG Goal: or (and (@eq A a0 a) (@subseq A l xs)) (@subseq A (@cons A a0 l) xs) *)
+
(* Goal: or (and (@eq A a0 a) (@subseq A l xs)) (@subseq A (@cons A a0 l) xs) *)
find_inversion.
(* Goal: or (and (@eq A a0 a0) (@subseq A (@remove A A_eq_dec x xs) xs)) (@subseq A (@cons A a0 (@remove A A_eq_dec x xs)) xs) *)
auto.
Qed.
Lemma subseq_map :
forall (f : A -> B) ys xs,
subseq xs ys ->
subseq (map f xs) (map f ys).
Proof.
(* Goal: forall (f : forall _ : A, B) (ys xs : list A) (_ : @subseq A xs ys), @subseq B (@map A B f xs) (@map A B f ys) *)
induction ys; intros; simpl in *.
(* Goal: match @map A B f xs with | nil => True | cons x xs' => or (and (@eq B x (f a)) (@subseq B xs' (@map A B f ys))) (@subseq B (@map A B f xs) (@map A B f ys)) end *)
(* Goal: match @map A B f xs with | nil => True | cons x xs' => False end *)
-
(* Goal: match @map A B f xs with | nil => True | cons x xs' => False end *)
repeat break_match; try discriminate; auto.
(* BG Goal: match @map A B f xs with | nil => True | cons x xs' => or (and (@eq B x (f a)) (@subseq B xs' (@map A B f ys))) (@subseq B (@map A B f xs) (@map A B f ys)) end *)
-
(* Goal: match @map A B f xs with | nil => True | cons x xs' => or (and (@eq B x (f a)) (@subseq B xs' (@map A B f ys))) (@subseq B (@map A B f xs) (@map A B f ys)) end *)
repeat break_match; try discriminate; auto.
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
intuition.
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
+
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
subst.
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
simpl in *.
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
find_inversion.
(* Goal: or (and (@eq B (f a) (f a)) (@subseq B (@map A B f l0) (@map A B f ys))) (@subseq B (@cons B (f a) (@map A B f l0)) (@map A B f ys)) *)
auto.
(* BG Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
+
(* Goal: or (and (@eq B b (f a)) (@subseq B l (@map A B f ys))) (@subseq B (@cons B b l) (@map A B f ys)) *)
right.
(* Goal: @subseq B (@cons B b l) (@map A B f ys) *)
repeat find_reverse_rewrite.
(* Goal: @subseq B (@map A B f xs) (@map A B f ys) *)
auto.
Qed.
Lemma subseq_cons_drop :
forall xs ys (a : A),
subseq (a :: xs) ys -> subseq xs ys.
Proof.
(* Goal: forall (xs ys : list A) (a : A) (_ : @subseq A (@cons A a xs) ys), @subseq A xs ys *)
induction ys; intros; simpl in *; intuition; break_match; eauto.
Qed.
Lemma subseq_length :
forall (ys xs : list A),
subseq xs ys ->
length xs <= length ys.
Proof.
(* Goal: forall (ys xs : list A) (_ : @subseq A xs ys), le (@length A xs) (@length A ys) *)
induction ys; intros; simpl in *; break_match; intuition.
(* Goal: le (@length A (@cons A a0 l)) (S (@length A ys)) *)
subst.
(* Goal: le (@length A (@cons A a l)) (S (@length A ys)) *)
simpl in *.
(* Goal: le (S (@length A l)) (S (@length A ys)) *)
specialize (IHys l).
(* Goal: le (S (@length A l)) (S (@length A ys)) *)
concludes.
(* Goal: le (S (@length A l)) (S (@length A ys)) *)
auto with *.
Qed.
Lemma subseq_subseq_eq :
forall (xs ys : list A),
subseq xs ys ->
subseq ys xs ->
xs = ys.
Proof.
(* Goal: forall (xs ys : list A) (_ : @subseq A xs ys) (_ : @subseq A ys xs), @eq (list A) xs ys *)
induction xs; intros; destruct ys; simpl in *; intuition eauto using f_equal2, subseq_cons_drop.
(* Goal: @eq (list A) (@cons A a xs) (@cons A a0 ys) *)
exfalso.
(* Goal: False *)
repeat find_apply_lem_hyp subseq_length.
(* Goal: False *)
simpl in *.
(* Goal: False *)
omega.
Qed.
Lemma subseq_filter :
forall (f : A -> bool) xs,
subseq (filter f xs) xs.
Proof.
(* Goal: forall (f : forall _ : A, bool) (xs : list A), @subseq A (@filter A f xs) xs *)
induction xs; intros; simpl.
(* Goal: match (if f a then @cons A a (@filter A f xs) else @filter A f xs) with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' xs)) (@subseq A (if f a then @cons A a (@filter A f xs) else @filter A f xs) xs) end *)
(* Goal: True *)
-
(* Goal: True *)
auto.
(* BG Goal: match (if f a then @cons A a (@filter A f xs) else @filter A f xs) with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' xs)) (@subseq A (if f a then @cons A a (@filter A f xs) else @filter A f xs) xs) end *)
-
(* Goal: match (if f a then @cons A a (@filter A f xs) else @filter A f xs) with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' xs)) (@subseq A (if f a then @cons A a (@filter A f xs) else @filter A f xs) xs) end *)
repeat break_match; intuition congruence.
Qed.
Lemma subseq_nil :
forall xs,
subseq (A:=A) [] xs.
Proof.
(* Goal: forall xs : list A, @subseq A (@nil A) xs *)
destruct xs; simpl; auto.
Qed.
Lemma subseq_skip :
forall a xs ys,
subseq(A:=A) xs ys ->
subseq xs (a :: ys).
Proof.
(* Goal: forall (a : A) (xs ys : list A) (_ : @subseq A xs ys), @subseq A xs (@cons A a ys) *)
induction ys; intros; simpl in *; repeat break_match; intuition.
Qed.
Lemma subseq_filterMap :
forall (f : B -> option A) ys xs,
subseq xs ys ->
subseq (filterMap f xs) (filterMap f ys).
Proof.
(* Goal: forall (f : forall _ : B, option A) (ys xs : list B) (_ : @subseq B xs ys), @subseq A (@filterMap B A f xs) (@filterMap B A f ys) *)
induction ys; intros; simpl in *; repeat break_match; auto; try discriminate; intuition; subst.
(* Goal: @subseq A (@filterMap B A f (@cons B a l)) (@filterMap B A f ys) *)
(* Goal: @subseq A (@filterMap B A f (@nil B)) (@filterMap B A f ys) *)
(* Goal: @subseq A (@filterMap B A f (@cons B b l)) (@cons A a0 (@filterMap B A f ys)) *)
(* Goal: @subseq A (@filterMap B A f (@cons B a l)) (@cons A a0 (@filterMap B A f ys)) *)
-
(* Goal: @subseq A (@filterMap B A f (@cons B a l)) (@cons A a0 (@filterMap B A f ys)) *)
simpl.
(* Goal: match match f a with | Some y => @cons A y (@filterMap B A f l) | None => @filterMap B A f l end with | nil => True | cons x xs' => or (and (@eq A x a0) (@subseq A xs' (@filterMap B A f ys))) (@subseq A match f a with | Some y => @cons A y (@filterMap B A f l) | None => @filterMap B A f l end (@filterMap B A f ys)) end *)
find_rewrite.
(* Goal: or (and (@eq A a0 a0) (@subseq A (@filterMap B A f l) (@filterMap B A f ys))) (@subseq A (@cons A a0 (@filterMap B A f l)) (@filterMap B A f ys)) *)
auto.
(* BG Goal: @subseq A (@filterMap B A f (@cons B a l)) (@filterMap B A f ys) *)
(* BG Goal: @subseq A (@filterMap B A f (@nil B)) (@filterMap B A f ys) *)
(* BG Goal: @subseq A (@filterMap B A f (@cons B b l)) (@cons A a0 (@filterMap B A f ys)) *)
-
(* Goal: @subseq A (@filterMap B A f (@cons B b l)) (@cons A a0 (@filterMap B A f ys)) *)
auto using subseq_skip.
(* BG Goal: @subseq A (@filterMap B A f (@cons B a l)) (@filterMap B A f ys) *)
(* BG Goal: @subseq A (@filterMap B A f (@nil B)) (@filterMap B A f ys) *)
-
(* Goal: @subseq A (@filterMap B A f (@nil B)) (@filterMap B A f ys) *)
auto using subseq_nil.
(* BG Goal: @subseq A (@filterMap B A f (@cons B a l)) (@filterMap B A f ys) *)
-
(* Goal: @subseq A (@filterMap B A f (@cons B a l)) (@filterMap B A f ys) *)
simpl.
(* Goal: @subseq A match f a with | Some y => @cons A y (@filterMap B A f l) | None => @filterMap B A f l end (@filterMap B A f ys) *)
find_rewrite.
(* Goal: @subseq A (@filterMap B A f l) (@filterMap B A f ys) *)
auto.
Qed.
Lemma subseq_app_r :
forall xs ys,
subseq (A:=A) ys (xs ++ ys).
Proof.
(* Goal: forall xs ys : list A, @subseq A ys (@app A xs ys) *)
induction xs; intros; simpl.
(* Goal: match ys with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' (@app A xs ys))) (@subseq A ys (@app A xs ys)) end *)
(* Goal: @subseq A ys ys *)
+
(* Goal: @subseq A ys ys *)
auto using subseq_refl.
(* BG Goal: match ys with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' (@app A xs ys))) (@subseq A ys (@app A xs ys)) end *)
+
(* Goal: match ys with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' (@app A xs ys))) (@subseq A ys (@app A xs ys)) end *)
break_match.
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A xs (@cons A a0 l)))) (@subseq A (@cons A a0 l) (@app A xs (@cons A a0 l))) *)
(* Goal: True *)
*
(* Goal: True *)
auto.
(* BG Goal: or (and (@eq A a0 a) (@subseq A l (@app A xs (@cons A a0 l)))) (@subseq A (@cons A a0 l) (@app A xs (@cons A a0 l))) *)
*
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A xs (@cons A a0 l)))) (@subseq A (@cons A a0 l) (@app A xs (@cons A a0 l))) *)
right.
(* Goal: @subseq A (@cons A a0 l) (@app A xs (@cons A a0 l)) *)
auto using subseq_nil.
Qed.
Lemma subseq_app_tail :
forall ys xs zs,
subseq (A:=A) xs ys ->
subseq (xs ++ zs) (ys ++ zs).
Proof.
(* Goal: forall (ys xs zs : list A) (_ : @subseq A xs ys), @subseq A (@app A xs zs) (@app A ys zs) *)
induction ys; intros; simpl in *.
(* Goal: match @app A xs zs with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' (@app A ys zs))) (@subseq A (@app A xs zs) (@app A ys zs)) end *)
(* Goal: @subseq A (@app A xs zs) zs *)
-
(* Goal: @subseq A (@app A xs zs) zs *)
break_match; intuition auto using subseq_refl.
(* BG Goal: match @app A xs zs with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' (@app A ys zs))) (@subseq A (@app A xs zs) (@app A ys zs)) end *)
-
(* Goal: match @app A xs zs with | nil => True | cons x xs' => or (and (@eq A x a) (@subseq A xs' (@app A ys zs))) (@subseq A (@app A xs zs) (@app A ys zs)) end *)
repeat break_match.
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
(* Goal: True *)
(* Goal: True *)
+
(* Goal: True *)
auto.
(* BG Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
(* BG Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
(* BG Goal: True *)
+
(* Goal: True *)
discriminate.
(* BG Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
(* BG Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
+
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
simpl in *.
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
subst.
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys (@cons A a0 l)))) (@subseq A (@cons A a0 l) (@app A ys (@cons A a0 l))) *)
right.
(* Goal: @subseq A (@cons A a0 l) (@app A ys (@cons A a0 l)) *)
auto using subseq_app_r.
(* BG Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
+
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
simpl in *.
(* Goal: or (and (@eq A a0 a) (@subseq A l (@app A ys zs))) (@subseq A (@cons A a0 l) (@app A ys zs)) *)
find_inversion.
(* Goal: or (and (@eq A a0 a) (@subseq A (@app A l0 zs) (@app A ys zs))) (@subseq A (@cons A a0 (@app A l0 zs)) (@app A ys zs)) *)
intuition.
(* Goal: or (and (@eq A a0 a) (@subseq A (@app A l0 zs) (@app A ys zs))) (@subseq A (@cons A a0 (@app A l0 zs)) (@app A ys zs)) *)
rewrite app_comm_cons.
(* Goal: or (and (@eq A a0 a) (@subseq A (@app A l0 zs) (@app A ys zs))) (@subseq A (@app A (@cons A a0 l0) zs) (@app A ys zs)) *)
auto.
Qed.
Lemma subseq_app_head :
forall xs ys zs,
subseq (A:=A) ys zs ->
subseq (A:=A) (xs ++ ys) (xs ++ zs).
Proof.
(* Goal: forall (xs ys zs : list A) (_ : @subseq A ys zs), @subseq A (@app A xs ys) (@app A xs zs) *)
induction xs; intros; simpl; intuition.
Qed.
Lemma subseq_2_3 :
forall xs ys zs x y,
subseq(A:=A) (xs ++ ys ++ zs) (xs ++ x :: ys ++ y :: zs).
Proof.
(* Goal: forall (xs ys zs : list A) (x y : A), @subseq A (@app A xs (@app A ys zs)) (@app A xs (@cons A x (@app A ys (@cons A y zs)))) *)
auto using subseq_refl, subseq_skip, subseq_app_head.
Qed.
Lemma subseq_middle :
forall xs y zs,
subseq (A:=A) (xs ++ zs) (xs ++ y :: zs).
Proof.
(* Goal: forall (xs : list A) (y : A) (zs : list A), @subseq A (@app A xs zs) (@app A xs (@cons A y zs)) *)
intros.
(* Goal: @subseq A (@app A xs zs) (@app A xs (@cons A y zs)) *)
apply subseq_app_head.
(* Goal: @subseq A zs (@cons A y zs) *)
apply subseq_skip.
(* Goal: @subseq A zs zs *)
apply subseq_refl.
Qed.
Lemma subseq_remove_all :
forall (ds l l' : list A),
subseq l l' ->
subseq (remove_all A_eq_dec ds l) l'.
End subseq.
|
Require Export Arith.
Require Export Compare_dec.
Require Export Lib_Prop.
Lemma lt_or_eq_O_dec : forall n : nat, {0 < n} + {n = 0}.
Proof.
(* Goal: forall n : nat, sumbool (lt O n) (@eq nat n O) *)
simple induction n; auto with arith.
Qed.
Hint Resolve lt_or_eq_O_dec.
Lemma lt_SO_or_eq_O_or_SO_dec : forall n : nat, {1 < n} + {n = 0} + {n = 1}.
Proof.
(* Goal: forall n : nat, sumor (sumbool (lt (S O) n) (@eq nat n O)) (@eq nat n (S O)) *)
intros n; case n; auto with arith.
(* Goal: forall n : nat, sumor (sumbool (lt (S O) (S n)) (@eq nat (S n) O)) (@eq nat (S n) (S O)) *)
intros p; case p; auto with arith.
Qed.
Hint Resolve lt_SO_or_eq_O_or_SO_dec.
Lemma O_or_no_dec : forall n : nat, {n = 0} + {n <> 0}.
Proof.
(* Goal: forall n : nat, sumbool (@eq nat n O) (not (@eq nat n O)) *)
simple induction n; auto with arith.
Qed.
Hint Resolve O_or_no_dec.
Lemma eq_or_not : forall n m : nat, {n = m} + {n <> m}.
Proof.
(* Goal: forall n m : nat, sumbool (@eq nat n m) (not (@eq nat n m)) *)
auto with arith.
Qed.
Lemma nat_order_dec : forall a b : nat, or3 (a < b) (a = b) (b < a).
Proof.
(* Goal: forall a b : nat, or3 (lt a b) (@eq nat a b) (lt b a) *)
simple induction a; simple induction b.
(* Goal: forall (n0 : nat) (_ : or3 (lt (S n) n0) (@eq nat (S n) n0) (lt n0 (S n))), or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: or3 (lt (S n) O) (@eq nat (S n) O) (lt O (S n)) *)
(* Goal: forall (n : nat) (_ : or3 (lt O n) (@eq nat O n) (lt n O)), or3 (lt O (S n)) (@eq nat O (S n)) (lt (S n) O) *)
(* Goal: or3 (lt O O) (@eq nat O O) (lt O O) *)
apply or3_Middle; auto with arith.
(* Goal: forall (n0 : nat) (_ : or3 (lt (S n) n0) (@eq nat (S n) n0) (lt n0 (S n))), or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: or3 (lt (S n) O) (@eq nat (S n) O) (lt O (S n)) *)
(* Goal: forall (n : nat) (_ : or3 (lt O n) (@eq nat O n) (lt n O)), or3 (lt O (S n)) (@eq nat O (S n)) (lt (S n) O) *)
intros.
(* Goal: forall (n0 : nat) (_ : or3 (lt (S n) n0) (@eq nat (S n) n0) (lt n0 (S n))), or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: or3 (lt (S n) O) (@eq nat (S n) O) (lt O (S n)) *)
(* Goal: or3 (lt O (S n)) (@eq nat O (S n)) (lt (S n) O) *)
apply or3_Left; auto with arith.
(* Goal: forall (n0 : nat) (_ : or3 (lt (S n) n0) (@eq nat (S n) n0) (lt n0 (S n))), or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: or3 (lt (S n) O) (@eq nat (S n) O) (lt O (S n)) *)
apply or3_Right; auto with arith.
(* Goal: forall (n0 : nat) (_ : or3 (lt (S n) n0) (@eq nat (S n) n0) (lt n0 (S n))), or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
intros.
(* Goal: or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
elim (H n0).
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: forall _ : @eq nat n n0, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: forall _ : lt n n0, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
intro.
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: forall _ : @eq nat n n0, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
apply or3_Left.
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: forall _ : @eq nat n n0, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: lt (S n) (S n0) *)
apply lt_n_S; assumption.
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: forall _ : @eq nat n n0, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
intro.
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
apply or3_Middle.
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
(* Goal: @eq nat (S n) (S n0) *)
apply eq_S; assumption.
(* Goal: forall _ : lt n0 n, or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
intro.
(* Goal: or3 (lt (S n) (S n0)) (@eq nat (S n) (S n0)) (lt (S n0) (S n)) *)
apply or3_Right.
(* Goal: lt (S n0) (S n) *)
apply lt_n_S; assumption.
Qed.
|
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Parts.
Section Single1.
Variable E : Setoid.
Definition single : E -> part_set E.
Proof.
(* Goal: forall _ : Carrier E, Carrier (part_set E) *)
intros x.
(* Goal: Carrier (part_set E) *)
apply (Build_Predicate (Pred_fun:=fun y : E => Equal y x)).
(* Goal: @pred_compatible E (fun y : Carrier E => @Equal E y x) *)
red in |- *.
(* Goal: forall (x0 y : Carrier E) (_ : @Equal E x0 x) (_ : @Equal E y x0), @Equal E y x *)
intros x0 y H' H'0; try assumption.
(* Goal: @Equal E y x *)
apply Trans with x0; auto with algebra.
Qed.
Lemma in_single : forall x : E, in_part x (single x).
Proof.
(* Goal: forall x : Carrier E, @in_part E x (single x) *)
simpl in |- *; auto with algebra.
Qed.
Hint Resolve in_single: algebra.
Lemma single_law : forall x y : E, Equal x y -> Equal (single x) (single y).
Proof.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @Equal (part_set E) (single x) (single y) *)
unfold single in |- *; simpl in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y), @eq_part E (@Build_Predicate E (fun y0 : Carrier E => @Equal E y0 x) (fun (x0 y0 : Carrier E) (H' : @Equal E x0 x) (H'0 : @Equal E y0 x0) => @Trans E y0 x0 x H'0 H')) (@Build_Predicate E (fun y0 : Carrier E => @Equal E y0 y) (fun (x0 y0 : Carrier E) (H' : @Equal E x0 y) (H'0 : @Equal E y0 x0) => @Trans E y0 x0 y H'0 H')) *)
unfold eq_part in |- *; simpl in |- *.
(* Goal: forall (x y : Carrier E) (_ : @Equal E x y) (x0 : Carrier E), and (forall _ : @Equal E x0 x, @Equal E x0 y) (forall _ : @Equal E x0 y, @Equal E x0 x) *)
intros x y H' x0; split; [ intros H'0; try assumption | idtac ].
(* Goal: forall _ : @Equal E x0 y, @Equal E x0 x *)
(* Goal: @Equal E x0 y *)
apply Trans with x; auto with algebra.
(* Goal: forall _ : @Equal E x0 y, @Equal E x0 x *)
intros H'0; try assumption.
(* Goal: @Equal E x0 x *)
apply Trans with y; auto with algebra.
Qed.
Hint Resolve single_law: algebra.
Lemma single_prop : forall x y : E, Equal y x -> in_part y (single x).
Proof.
(* Goal: forall (x y : Carrier E) (_ : @Equal E y x), @in_part E y (single x) *)
simpl in |- *; auto with algebra.
Qed.
Hint Immediate single_prop: algebra.
Lemma single_prop_rev : forall x y : E, in_part y (single x) -> Equal y x.
Proof.
(* Goal: forall (x y : Carrier E) (_ : @in_part E y (single x)), @Equal E y x *)
simpl in |- *; auto with algebra.
Qed.
Hint Immediate single_prop_rev: algebra.
Lemma single_simpl : forall x y : E, Equal (single x) (single y) -> Equal x y.
Proof.
(* Goal: forall (x y : Carrier E) (_ : @Equal (part_set E) (single x) (single y)), @Equal E x y *)
simpl in |- *.
(* Goal: forall (x y : Carrier E) (_ : @eq_part E (single x) (single y)), @Equal E x y *)
unfold eq_part, single in |- *; simpl in |- *.
(* Goal: forall (x y : Carrier E) (_ : forall x0 : Carrier E, and (forall _ : @Equal E x0 x, @Equal E x0 y) (forall _ : @Equal E x0 y, @Equal E x0 x)), @Equal E x y *)
intros x y H'; try assumption.
(* Goal: @Equal E x y *)
elim (H' x); auto with algebra.
Qed.
End Single1.
Hint Resolve single_law in_single: algebra.
Hint Immediate single_prop: algebra.
Hint Immediate single_prop_rev: algebra.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_collinearorder.
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray4.
Section Euclid.
Context `{Ax1:euclidean_neutral_ruler_compass}.
Lemma lemma_ABCequalsCBA :
forall A B C,
nCol A B C ->
CongA A B C C B A.
Proof.
(* Goal: forall (A B C : @Point Ax) (_ : @nCol Ax A B C), @CongA Ax A B C C B A *)
intros.
(* Goal: @CongA Ax A B C C B A *)
assert (~ eq B A).
(* Goal: @CongA Ax A B C C B A *)
(* Goal: not (@eq Ax B A) *)
{
(* Goal: not (@eq Ax B A) *)
intro.
(* Goal: False *)
assert (eq A B) by (conclude lemma_equalitysymmetric).
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @CongA Ax A B C C B A *)
}
(* Goal: @CongA Ax A B C C B A *)
assert (~ eq C B).
(* Goal: @CongA Ax A B C C B A *)
(* Goal: not (@eq Ax C B) *)
{
(* Goal: not (@eq Ax C B) *)
intro.
(* Goal: False *)
assert (Col C B A) by (conclude_def Col ).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @CongA Ax A B C C B A *)
}
(* Goal: @CongA Ax A B C C B A *)
let Tf:=fresh in assert (Tf:exists E, (BetS B A E /\ Cong A E C B)) by (conclude lemma_extension);destruct Tf as [E];spliter.
(* Goal: @CongA Ax A B C C B A *)
assert (~ eq B C).
(* Goal: @CongA Ax A B C C B A *)
(* Goal: not (@eq Ax B C) *)
{
(* Goal: not (@eq Ax B C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @CongA Ax A B C C B A *)
}
(* Goal: @CongA Ax A B C C B A *)
assert (neq A B) by (conclude lemma_inequalitysymmetric).
(* Goal: @CongA Ax A B C C B A *)
let Tf:=fresh in assert (Tf:exists F, (BetS B C F /\ Cong C F A B)) by (conclude lemma_extension);destruct Tf as [F];spliter.
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B A F C) by (forward_using lemma_doublereverse).
(* Goal: @CongA Ax A B C C B A *)
assert (BetS F C B) by (conclude axiom_betweennesssymmetry).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B E F B) by (conclude cn_sumofparts).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong F B B F) by (conclude cn_equalityreverse).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B E B F) by (conclude lemma_congruencetransitive).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong B F B E) by (conclude lemma_congruencesymmetric).
(* Goal: @CongA Ax A B C C B A *)
assert (Cong E F F E) by (conclude cn_equalityreverse).
(* Goal: @CongA Ax A B C C B A *)
assert (Out B A E) by (conclude lemma_ray4).
(* Goal: @CongA Ax A B C C B A *)
assert (Out B C F) by (conclude lemma_ray4).
(* Goal: @CongA Ax A B C C B A *)
assert (CongA A B C C B A) by (conclude_def CongA ).
(* Goal: @CongA Ax A B C C B A *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Tarski_dev.Ch13_1.
Section Length_1.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma lg_exists : forall A B, exists l, Q_Cong l /\ l A B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_Cong Tn l) (l A B)) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_Cong Tn l) (l A B)) *)
unfold Q_Cong.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A B X Y) (l X Y)))) (l A B)) *)
exists (fun x y => Cong A B x y).
(* Goal: and (@ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A0 B0 X Y) (@Cong Tn A B X Y)))) (@Cong Tn A B A B) *)
split.
(* Goal: @Cong Tn A B A B *)
(* Goal: @ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A0 B0 X Y) (@Cong Tn A B X Y))) *)
exists A.
(* Goal: @Cong Tn A B A B *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A B0 X Y) (@Cong Tn A B X Y)) *)
exists B.
(* Goal: @Cong Tn A B A B *)
(* Goal: forall X Y : @Tpoint Tn, iff (@Cong Tn A B X Y) (@Cong Tn A B X Y) *)
intros.
(* Goal: @Cong Tn A B A B *)
(* Goal: iff (@Cong Tn A B X Y) (@Cong Tn A B X Y) *)
split; auto.
(* Goal: @Cong Tn A B A B *)
Cong.
Qed.
Lemma lg_cong : forall l A B C D, Q_Cong l -> l A B -> l C D -> Cong A B C D.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B C D : @Tpoint Tn) (_ : @Q_Cong Tn l) (_ : l A B) (_ : l C D), @Cong Tn A B C D *)
intros.
(* Goal: @Cong Tn A B C D *)
unfold Q_Cong in H.
(* Goal: @Cong Tn A B C D *)
ex_and H X.
(* Goal: @Cong Tn A B C D *)
ex_and H2 Y.
(* Goal: @Cong Tn A B C D *)
assert(HH:= H A B).
(* Goal: @Cong Tn A B C D *)
destruct HH.
(* Goal: @Cong Tn A B C D *)
assert(HH:= H C D).
(* Goal: @Cong Tn A B C D *)
destruct HH.
(* Goal: @Cong Tn A B C D *)
apply H3 in H0.
(* Goal: @Cong Tn A B C D *)
apply H5 in H1.
(* Goal: @Cong Tn A B C D *)
apply cong_transitivity with X Y; Cong.
Qed.
Lemma lg_cong_lg : forall l A B C D, Q_Cong l -> l A B -> Cong A B C D -> l C D.
Lemma lg_sym : forall l A B, Q_Cong l -> l A B -> l B A.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A B : @Tpoint Tn) (_ : @Q_Cong Tn l) (_ : l A B), l B A *)
intros.
(* Goal: l B A *)
apply (lg_cong_lg l A B); Cong.
Qed.
Lemma ex_points_lg : forall l, Q_Cong l -> exists A, exists B, l A B.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
unfold Q_Cong in H.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
ex_and H A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
ex_and H0 B.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
assert(HH:= H A B).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
destruct HH.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B)) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
exists B.
(* Goal: l A B *)
apply H0.
(* Goal: @Cong Tn A B A B *)
Cong.
Qed.
End Length_1.
Ltac lg_instance l A B :=
assert(tempo_sg:= ex_points_lg l);
match goal with
|H: Q_Cong l |- _ => assert(tempo_H:=H); apply tempo_sg in tempo_H; elim tempo_H; intros A ; let tempoHP := fresh "tempo_HP" in intro tempoHP; clear tempo_H; elim tempoHP; intro B; intro; clear tempoHP
end;
clear tempo_sg.
Section Length_2.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma is_len_cong : forall A B C D l, Len A B l -> Len C D l -> Cong A B C D.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Len Tn A B l) (_ : @Len Tn C D l), @Cong Tn A B C D *)
intros.
(* Goal: @Cong Tn A B C D *)
unfold Len in *.
(* Goal: @Cong Tn A B C D *)
spliter.
(* Goal: @Cong Tn A B C D *)
eapply (lg_cong l); auto.
Qed.
Lemma is_len_cong_is_len : forall A B C D l, Len A B l -> Cong A B C D -> Len C D l.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Len Tn A B l) (_ : @Cong Tn A B C D), @Len Tn C D l *)
intros.
(* Goal: @Len Tn C D l *)
unfold Len in *.
(* Goal: and (@Q_Cong Tn l) (l C D) *)
spliter.
(* Goal: and (@Q_Cong Tn l) (l C D) *)
split.
(* Goal: l C D *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: l C D *)
unfold Q_Cong in H.
(* Goal: l C D *)
ex_and H a.
(* Goal: l C D *)
ex_and H2 b.
(* Goal: l C D *)
assert(HH:= H A B).
(* Goal: l C D *)
destruct HH.
(* Goal: l C D *)
assert(HH1:= H C D).
(* Goal: l C D *)
destruct HH1.
(* Goal: l C D *)
apply H3 in H1.
(* Goal: l C D *)
apply H4.
(* Goal: @Cong Tn a b C D *)
apply cong_transitivity with A B; trivial.
Qed.
Lemma not_cong_is_len : forall A B C D l , ~(Cong A B C D) -> Len A B l -> ~(l C D).
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : not (@Cong Tn A B C D)) (_ : @Len Tn A B l), not (l C D) *)
intros.
(* Goal: not (l C D) *)
unfold Len in H0.
(* Goal: not (l C D) *)
spliter.
(* Goal: not (l C D) *)
intro.
(* Goal: False *)
apply H.
(* Goal: @Cong Tn A B C D *)
apply (lg_cong l); auto.
Qed.
Lemma not_cong_is_len1 : forall A B C D l , ~Cong A B C D -> Len A B l -> ~ Len C D l.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : not (@Cong Tn A B C D)) (_ : @Len Tn A B l), not (@Len Tn C D l) *)
intros.
(* Goal: not (@Len Tn C D l) *)
intro.
(* Goal: False *)
unfold Len in *.
(* Goal: False *)
spliter.
(* Goal: False *)
apply H.
(* Goal: @Cong Tn A B C D *)
apply (lg_cong l); auto.
Qed.
Lemma lg_null_instance : forall l A, Q_Cong_Null l -> l A A.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A : @Tpoint Tn) (_ : @Q_Cong_Null Tn l), l A A *)
intros.
(* Goal: l A A *)
unfold Q_Cong_Null in H.
(* Goal: l A A *)
spliter.
(* Goal: l A A *)
unfold Q_Cong in H.
(* Goal: l A A *)
ex_and H X.
(* Goal: l A A *)
ex_and H1 Y.
(* Goal: l A A *)
assert(HH:= H A A).
(* Goal: l A A *)
destruct HH.
(* Goal: l A A *)
ex_and H0 P.
(* Goal: l A A *)
assert(HH:=(H P P)).
(* Goal: l A A *)
destruct HH.
(* Goal: l A A *)
apply H4 in H3.
(* Goal: l A A *)
apply H1.
(* Goal: @Cong Tn X Y A A *)
apply cong_symmetry in H3.
(* Goal: @Cong Tn X Y A A *)
apply cong_reverse_identity in H3.
(* Goal: @Cong Tn X Y A A *)
subst Y.
(* Goal: @Cong Tn X X A A *)
apply cong_trivial_identity.
Qed.
Lemma lg_null_trivial : forall l A, Q_Cong l -> l A A -> Q_Cong_Null l.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A : @Tpoint Tn) (_ : @Q_Cong Tn l) (_ : l A A), @Q_Cong_Null Tn l *)
intros.
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists A.
(* Goal: l A A *)
auto.
Qed.
Lemma lg_null_dec : forall l, Q_Cong l -> Q_Cong_Null l \/ ~ Q_Cong_Null l.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l), or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
intros.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
assert(HH:=H).
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
unfold Q_Cong in H.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
ex_and H A.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
ex_and H0 B.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
induction(eq_dec_points A B).
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
subst B.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
left.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists A.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: l A A *)
apply H.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
(* Goal: @Cong Tn A A A A *)
Cong.
(* Goal: or (@Q_Cong_Null Tn l) (not (@Q_Cong_Null Tn l)) *)
right.
(* Goal: not (@Q_Cong_Null Tn l) *)
intro.
(* Goal: False *)
unfold Q_Cong_Null in H1.
(* Goal: False *)
spliter.
(* Goal: False *)
ex_and H2 P.
(* Goal: False *)
apply H0.
(* Goal: @eq (@Tpoint Tn) A B *)
assert(Cong A B P P).
(* Goal: @eq (@Tpoint Tn) A B *)
(* Goal: @Cong Tn A B P P *)
apply H; auto.
(* Goal: @eq (@Tpoint Tn) A B *)
apply cong_identity in H2.
(* Goal: @eq (@Tpoint Tn) A B *)
auto.
Qed.
Lemma ex_point_lg : forall l A, Q_Cong l -> exists B, l A B.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A : @Tpoint Tn) (_ : @Q_Cong Tn l), @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
induction(lg_null_dec l).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
exists A.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: l A A *)
apply lg_null_instance.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: @Q_Cong_Null Tn l *)
auto.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
assert(HH:= H).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
unfold Q_Cong in HH.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
ex_and HH X.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
ex_and H1 Y.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
assert(HH:= another_point A).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
ex_and HH P.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
assert(HP:= H2 X Y).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
destruct HP.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
assert(l X Y).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: l X Y *)
apply H3.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: @Cong Tn X Y X Y *)
apply cong_reflexivity.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
assert(X <> Y).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: not (@eq (@Tpoint Tn) X Y) *)
intro.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: False *)
subst Y.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: False *)
apply H0.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists X.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
(* Goal: l X X *)
auto.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
assert(HH:= segment_construction_3 A P X Y H1 H6).
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
ex_and HH B.
(* Goal: @Q_Cong Tn l *)
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => l A B) *)
exists B.
(* Goal: @Q_Cong Tn l *)
(* Goal: l A B *)
assert(HH:= H2 A B).
(* Goal: @Q_Cong Tn l *)
(* Goal: l A B *)
destruct HH.
(* Goal: @Q_Cong Tn l *)
(* Goal: l A B *)
apply H9.
(* Goal: @Q_Cong Tn l *)
(* Goal: @Cong Tn X Y A B *)
Cong.
(* Goal: @Q_Cong Tn l *)
auto.
Qed.
Lemma ex_point_lg_out : forall l A P, A <> P -> Q_Cong l -> ~ Q_Cong_Null l -> exists B, l A B /\ Out A B P.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A P : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A P)) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)), @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
assert(HH:= H0).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
unfold Q_Cong in HH.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
ex_and HH X.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
ex_and H2 Y.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
assert(HP:= H3 X Y).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
destruct HP.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
assert(l X Y).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: l X Y *)
apply H2.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: @Cong Tn X Y X Y *)
apply cong_reflexivity.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
assert(X <> Y).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: not (@eq (@Tpoint Tn) X Y) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: False *)
subst Y.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: False *)
apply H1.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: @Q_Cong_Null Tn l *)
unfold Q_Cong_Null.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: and (@Q_Cong Tn l) (@ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A)) *)
split.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
(* Goal: @Q_Cong Tn l *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => l A A) *)
exists X.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
(* Goal: l X X *)
auto.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
assert(HH:= segment_construction_3 A P X Y H H6).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
ex_and HH B.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (@Out Tn A B P)) *)
exists B.
(* Goal: and (l A B) (@Out Tn A B P) *)
split.
(* Goal: @Out Tn A B P *)
(* Goal: l A B *)
assert(HH:= H3 A B).
(* Goal: @Out Tn A B P *)
(* Goal: l A B *)
destruct HH.
(* Goal: @Out Tn A B P *)
(* Goal: l A B *)
apply H9.
(* Goal: @Out Tn A B P *)
(* Goal: @Cong Tn X Y A B *)
Cong.
(* Goal: @Out Tn A B P *)
apply l6_6.
(* Goal: @Out Tn A P B *)
auto.
Qed.
Lemma ex_point_lg_bet : forall l A M, Q_Cong l -> exists B : Tpoint, l M B /\ Bet A M B.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (A M : @Tpoint Tn) (_ : @Q_Cong Tn l), @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
assert(HH:= H).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
unfold Q_Cong in HH.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
ex_and HH X.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
ex_and H0 Y.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
assert(HP:= H1 X Y).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
destruct HP.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
assert(l X Y).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
(* Goal: l X Y *)
apply H0.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
(* Goal: @Cong Tn X Y X Y *)
apply cong_reflexivity.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
prolong A M B X Y.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l M B) (@Bet Tn A M B)) *)
exists B.
(* Goal: and (l M B) (@Bet Tn A M B) *)
split; auto.
(* Goal: l M B *)
eapply (lg_cong_lg l X Y); Cong.
Qed.
End Length_2.
Ltac lg_instance1 l A B :=
assert(tempo_sg:= ex_point_lg l);
match goal with
|H: Q_Cong l |- _ => assert(tempo_H:=H); apply (tempo_sg A) in tempo_H; ex_elim tempo_H B; exists B
end;
clear tempo_sg.
Tactic Notation "soit" ident(A) ident(B) "de" "longueur" ident(l) := lg_instance1 l A B.
Ltac lg_instance2 l A P B :=
assert(tempo_sg:= ex_point_lg_out l);
match goal with
|H: A <> P |- _ =>
match goal with
|HP : Q_Cong l |- _ =>
match goal with
|HQ : ~ Q_Cong_Null l |- _ => assert(tempo_HQ:=HQ);
apply (tempo_sg A P H HP) in tempo_HQ;
ex_and tempo_HQ B
end
end
end;
clear tempo_sg.
Tactic Notation "soit" ident(B) "sur" "la" "demie" "droite" ident(A) ident(P) "/" "longueur" ident(A) ident(B) "=" ident(l) := lg_instance2 l A P B.
Section Length_3.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Lemma ex_points_lg_not_col : forall l P, Q_Cong l -> ~ Q_Cong_Null l -> exists A, exists B, l A B /\ ~Col A B P.
Proof.
(* Goal: forall (l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (P : @Tpoint Tn) (_ : @Q_Cong Tn l) (_ : not (@Q_Cong_Null Tn l)), @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P)))) *)
intros.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P)))) *)
assert(HH:=another_point P).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P)))) *)
ex_elim HH A.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P)))) *)
assert(HH:= not_col_exists P A H1).
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P)))) *)
ex_elim HH Q.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P)))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
assert(A <> Q).
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
(* Goal: not (@eq (@Tpoint Tn) A Q) *)
intro.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
(* Goal: False *)
subst Q.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
(* Goal: False *)
apply H2.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
(* Goal: @Col Tn P A A *)
Col.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
lg_instance2 l A Q B.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l A B) (not (@Col Tn A B P))) *)
exists B.
(* Goal: and (l A B) (not (@Col Tn A B P)) *)
split.
(* Goal: not (@Col Tn A B P) *)
(* Goal: l A B *)
auto.
(* Goal: not (@Col Tn A B P) *)
intro.
(* Goal: False *)
apply H2.
(* Goal: @Col Tn P A Q *)
assert(A <> B).
(* Goal: @Col Tn P A Q *)
(* Goal: not (@eq (@Tpoint Tn) A B) *)
intro.
(* Goal: @Col Tn P A Q *)
(* Goal: False *)
subst B.
(* Goal: @Col Tn P A Q *)
(* Goal: False *)
unfold Out in H5.
(* Goal: @Col Tn P A Q *)
(* Goal: False *)
tauto; apply out_col in H5.
(* Goal: @Col Tn P A Q *)
apply out_col in H5.
(* Goal: @Col Tn P A Q *)
ColR.
Qed.
End Length_3.
Ltac lg_instance_not_col l P A B :=
assert(tempo_sg:= ex_points_lg_not_col l P);
match goal with
|HP : Q_Cong l |- _ => match goal with
|HQ : ~ Q_Cong_Null l |- _ => assert(tempo_HQ:=HQ);
apply (tempo_sg HP) in tempo_HQ;
elim tempo_HQ;
intro A;
let tempo_HR := fresh "tempo_HR" in
intro tempo_HR;
elim tempo_HR;
intro B;
intro;
spliter;
clear tempo_HR tempo_HQ
end
end;
clear tempo_sg.
Tactic Notation "soit" ident(B) "sur" "la" "demie" "droite" ident(A) ident(P) "/" "longueur" ident(A) ident(B) "=" ident(l) := lg_instance2 l A P B.
Require Import Setoid.
Section Length_4.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.
Notation "l1 =l= l2" := (EqL l1 l2) (at level 80, right associativity).
Lemma ex_eql : forall l1 l2, (exists A , exists B, Len A B l1 /\ Len A B l2) -> l1 =l= l2.
Proof.
(* Goal: forall (l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (@Len Tn A B l1) (@Len Tn A B l2)))), @EqL Tn l1 l2 *)
intros.
(* Goal: @EqL Tn l1 l2 *)
ex_and H A.
(* Goal: @EqL Tn l1 l2 *)
ex_and H0 B.
(* Goal: @EqL Tn l1 l2 *)
assert(HH:=H).
(* Goal: @EqL Tn l1 l2 *)
assert(HH0:=H0).
(* Goal: @EqL Tn l1 l2 *)
unfold Len in HH.
(* Goal: @EqL Tn l1 l2 *)
unfold Len in HH0.
(* Goal: @EqL Tn l1 l2 *)
spliter.
(* Goal: @EqL Tn l1 l2 *)
unfold EqL.
(* Goal: forall A B : @Tpoint Tn, iff (l1 A B) (l2 A B) *)
repeat split; auto.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: forall _ : l1 A0 B0, l2 A0 B0 *)
intro.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
assert(Len A0 B0 l1).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
(* Goal: @Len Tn A0 B0 l1 *)
unfold Len.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
(* Goal: and (@Q_Cong Tn l1) (l1 A0 B0) *)
split; auto.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
assert(Cong A B A0 B0).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
apply (is_len_cong _ _ _ _ l1); auto.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
assert(Len A0 B0 l2).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
(* Goal: @Len Tn A0 B0 l2 *)
apply(is_len_cong_is_len A B).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
(* Goal: @Len Tn A B l2 *)
apply H0.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
auto.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
unfold Len in H8.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
spliter.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
auto.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
intro.
(* Goal: l1 A0 B0 *)
assert(Len A0 B0 l2).
(* Goal: l1 A0 B0 *)
(* Goal: @Len Tn A0 B0 l2 *)
unfold Len.
(* Goal: l1 A0 B0 *)
(* Goal: and (@Q_Cong Tn l2) (l2 A0 B0) *)
split; auto.
(* Goal: l1 A0 B0 *)
assert(Cong A B A0 B0).
(* Goal: l1 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
apply (is_len_cong _ _ _ _ l2); auto.
(* Goal: l1 A0 B0 *)
assert(Len A0 B0 l1).
(* Goal: l1 A0 B0 *)
(* Goal: @Len Tn A0 B0 l1 *)
apply(is_len_cong_is_len A B).
(* Goal: l1 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
(* Goal: @Len Tn A B l1 *)
apply H.
(* Goal: l1 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
auto.
(* Goal: l1 A0 B0 *)
unfold Len in H8.
(* Goal: l1 A0 B0 *)
spliter.
(* Goal: l1 A0 B0 *)
auto.
Qed.
Lemma all_eql : forall A B l1 l2, Len A B l1 -> Len A B l2 -> EqL l1 l2.
Proof.
(* Goal: forall (A B : @Tpoint Tn) (l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Len Tn A B l1) (_ : @Len Tn A B l2), @EqL Tn l1 l2 *)
intros.
(* Goal: @EqL Tn l1 l2 *)
apply ex_eql.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (@Len Tn A B l1) (@Len Tn A B l2))) *)
exists A.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (@Len Tn A B l1) (@Len Tn A B l2)) *)
exists B.
(* Goal: and (@Len Tn A B l1) (@Len Tn A B l2) *)
split; auto.
Qed.
Lemma null_len : forall A B la lb, Len A A la -> Len B B lb -> EqL la lb.
Proof.
(* Goal: forall (A B : @Tpoint Tn) (la lb : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Len Tn A A la) (_ : @Len Tn B B lb), @EqL Tn la lb *)
intros.
(* Goal: @EqL Tn la lb *)
eapply (all_eql A A).
(* Goal: @Len Tn A A lb *)
(* Goal: @Len Tn A A la *)
apply H.
(* Goal: @Len Tn A A lb *)
eapply (is_len_cong_is_len B B); Cong.
Qed.
Global Instance eqL_equivalence : Equivalence EqL.
Proof.
(* Goal: @Equivalence (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
split.
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
(* Goal: @Reflexive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
-
(* Goal: @Reflexive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
unfold Reflexive.
(* Goal: forall x : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop, @EqL Tn x x *)
intros.
(* Goal: @EqL Tn x x *)
unfold EqL.
(* Goal: forall A B : @Tpoint Tn, iff (x A B) (x A B) *)
intros.
(* Goal: iff (x A B) (x A B) *)
tauto.
(* BG Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
(* BG Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
-
(* Goal: @Symmetric (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
unfold Symmetric.
(* Goal: forall (x y : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @EqL Tn x y), @EqL Tn y x *)
intros.
(* Goal: @EqL Tn y x *)
unfold EqL in *.
(* Goal: forall A B : @Tpoint Tn, iff (y A B) (x A B) *)
firstorder.
(* BG Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
-
(* Goal: @Transitive (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (@EqL Tn) *)
unfold Transitive.
(* Goal: forall (x y z : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @EqL Tn x y) (_ : @EqL Tn y z), @EqL Tn x z *)
unfold EqL.
(* Goal: forall (x y z : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : forall A B : @Tpoint Tn, iff (x A B) (y A B)) (_ : forall A B : @Tpoint Tn, iff (y A B) (z A B)) (A B : @Tpoint Tn), iff (x A B) (z A B) *)
intros.
(* Goal: iff (x A B) (z A B) *)
rewrite H.
(* Goal: iff (y A B) (z A B) *)
apply H0.
Qed.
Lemma ex_lg : forall A B, exists l, Q_Cong l /\ l A B.
Proof.
(* Goal: forall A B : @Tpoint Tn, @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_Cong Tn l) (l A B)) *)
intros.
(* Goal: @ex (forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (fun l : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop => and (@Q_Cong Tn l) (l A B)) *)
exists (fun C D => Cong A B C D).
(* Goal: and (@Q_Cong Tn (fun C D : @Tpoint Tn => @Cong Tn A B C D)) (@Cong Tn A B A B) *)
unfold Q_Cong.
(* Goal: and (@ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A0 B0 X Y) (@Cong Tn A B X Y)))) (@Cong Tn A B A B) *)
split.
(* Goal: @Cong Tn A B A B *)
(* Goal: @ex (@Tpoint Tn) (fun A0 : @Tpoint Tn => @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A0 B0 X Y) (@Cong Tn A B X Y))) *)
exists A.
(* Goal: @Cong Tn A B A B *)
(* Goal: @ex (@Tpoint Tn) (fun B0 : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A B0 X Y) (@Cong Tn A B X Y)) *)
exists B.
(* Goal: @Cong Tn A B A B *)
(* Goal: forall X Y : @Tpoint Tn, iff (@Cong Tn A B X Y) (@Cong Tn A B X Y) *)
tauto.
(* Goal: @Cong Tn A B A B *)
Cong.
Qed.
Lemma lg_eql_lg : forall l1 l2, Q_Cong l1 -> EqL l1 l2 -> Q_Cong l2.
Proof.
(* Goal: forall (l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l1) (_ : @EqL Tn l1 l2), @Q_Cong Tn l2 *)
intros.
(* Goal: @Q_Cong Tn l2 *)
unfold EqL in *.
(* Goal: @Q_Cong Tn l2 *)
unfold Q_Cong in *.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A B X Y) (l2 X Y))) *)
decompose [ex] H.
(* Goal: @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn A B X Y) (l2 X Y))) *)
exists x.
(* Goal: @ex (@Tpoint Tn) (fun B : @Tpoint Tn => forall X Y : @Tpoint Tn, iff (@Cong Tn x B X Y) (l2 X Y)) *)
exists x0.
(* Goal: forall X Y : @Tpoint Tn, iff (@Cong Tn x x0 X Y) (l2 X Y) *)
intros.
(* Goal: iff (@Cong Tn x x0 X Y) (l2 X Y) *)
rewrite H2.
(* Goal: iff (l1 X Y) (l2 X Y) *)
apply H0.
Qed.
Lemma ex_eqL : forall l1 l2, Q_Cong l1 -> Q_Cong l2 -> (exists A, exists B, l1 A B /\ l2 A B) -> EqL l1 l2.
Proof.
(* Goal: forall (l1 l2 : forall (_ : @Tpoint Tn) (_ : @Tpoint Tn), Prop) (_ : @Q_Cong Tn l1) (_ : @Q_Cong Tn l2) (_ : @ex (@Tpoint Tn) (fun A : @Tpoint Tn => @ex (@Tpoint Tn) (fun B : @Tpoint Tn => and (l1 A B) (l2 A B)))), @EqL Tn l1 l2 *)
intros.
(* Goal: @EqL Tn l1 l2 *)
ex_and H1 A.
(* Goal: @EqL Tn l1 l2 *)
ex_and H2 B.
(* Goal: @EqL Tn l1 l2 *)
unfold EqL.
(* Goal: forall A B : @Tpoint Tn, iff (l1 A B) (l2 A B) *)
assert(HH1:= H).
(* Goal: forall A B : @Tpoint Tn, iff (l1 A B) (l2 A B) *)
assert(HH2:= H0).
(* Goal: forall A B : @Tpoint Tn, iff (l1 A B) (l2 A B) *)
unfold Q_Cong in HH1.
(* Goal: forall A B : @Tpoint Tn, iff (l1 A B) (l2 A B) *)
unfold Q_Cong in HH2.
(* Goal: forall A B : @Tpoint Tn, iff (l1 A B) (l2 A B) *)
ex_and HH1 A1.
(* Goal: iff (l1 A0 B0) (l2 A0 B0) *)
ex_and H3 B1.
(* Goal: iff (l1 A0 B0) (l2 A0 B0) *)
ex_and HH2 A2.
(* Goal: iff (l1 A0 B0) (l2 A0 B0) *)
ex_and H3 B2.
(* Goal: iff (l1 A0 B0) (l2 A0 B0) *)
repeat split; auto.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: forall _ : l1 A0 B0, l2 A0 B0 *)
intro.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
assert(HH:= H4 A0 B0).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
assert(HP:= H5 A0 B0).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
destruct HP.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: l2 A0 B0 *)
apply H6.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
assert(HP:= H4 A B).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
assert(HQ:= H5 A B).
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
destruct HP.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
destruct HQ.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
apply H9 in H1.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
apply H11 in H2.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
destruct HH.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
apply H13 in H3.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A2 B2 A0 B0 *)
apply cong_transitivity with A B; trivial.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
(* Goal: @Cong Tn A B A0 B0 *)
apply cong_transitivity with A1 B1; Cong.
(* Goal: forall _ : l2 A0 B0, l1 A0 B0 *)
intro.
(* Goal: l1 A0 B0 *)
assert(HH:= H4 A0 B0).
(* Goal: l1 A0 B0 *)
assert(HP:= H5 A0 B0).
(* Goal: l1 A0 B0 *)
destruct HH.
(* Goal: l1 A0 B0 *)
apply H6.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
assert(HH:= H4 A B).
(* Goal: @Cong Tn A1 B1 A0 B0 *)
assert(HQ:= H5 A B).
(* Goal: @Cong Tn A1 B1 A0 B0 *)
destruct HH.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
destruct HQ.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
apply H9 in H1.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
apply H11 in H2.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
destruct HP.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
apply H13 in H3.
(* Goal: @Cong Tn A1 B1 A0 B0 *)
apply cong_transitivity with A2 B2; trivial.
(* Goal: @Cong Tn A1 B1 A2 B2 *)
apply cong_transitivity with A B; Cong.
Qed.
End Length_4.
|
Require Import mathcomp.ssreflect.ssreflect.
From mathcomp
Require Import ssrbool ssrfun eqtype ssrnat seq path div choice.
From mathcomp
Require Import fintype tuple finfun bigop prime ssralg poly finset gproduct.
From mathcomp
Require Import fingroup morphism perm automorphism quotient finalg action.
From mathcomp
Require Import zmodp commutator cyclic center pgroup nilpotent sylow abelian.
From mathcomp
Require Import matrix mxalgebra mxpoly mxrepresentation vector ssrnum algC.
From mathcomp
Require Import classfun.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import GroupScope GRing.Theory Num.Theory.
Local Open Scope ring_scope.
Local Notation algCF := [fieldType of algC].
Section AlgC.
Variable (gT : finGroupType).
Lemma groupC : group_closure_field algCF gT.
Proof.
(* Goal: group_closure_field (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT *)
exact: group_closure_closed_field.
Qed.
End AlgC.
Section Tensor.
Variable (F : fieldType).
Fixpoint trow (n1 : nat) :
forall (A : 'rV[F]_n1) m2 n2 (B : 'M[F]_(m2,n2)), 'M[F]_(m2,n1 * n2) :=
if n1 is n'1.+1
then
fun (A : 'M[F]_(1,(1 + n'1))) m2 n2 (B : 'M[F]_(m2,n2)) =>
(row_mx (lsubmx A 0 0 *: B) (trow (rsubmx A) B))
else (fun _ _ _ _ => 0).
Lemma trow0 n1 m2 n2 B : @trow n1 0 m2 n2 B = 0.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln n1 n2)) (@trow n1 (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) n1)) m2 n2 B) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 (muln n1 n2))) *)
elim: n1=> //= n1 IH.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S n1) n2)) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (S n1)))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) (S n1)))) m2 n2 B)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2))) *)
rewrite !mxE scale0r linear0.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S n1) n2)) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 n2)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 n2)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 n2))))) (@trow n1 (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) n1)) m2 n2 B)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2))) *)
rewrite IH //; apply/matrixP=> i j; rewrite !mxE.
(* Goal: @eq (GRing.Field.sort F) match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 n2)) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 n2)) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 n2))))) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m2 (muln n1 n2))) i j2 end (GRing.zero (GRing.Field.zmodType F)) *)
by case: split=> *; rewrite mxE.
Qed.
Definition trowb n1 m2 n2 B A := @trow n1 A m2 n2 B.
Lemma trowbE n1 m2 n2 A B : trowb B A = @trow n1 A m2 n2 B.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln n1 n2)) (@trowb n1 m2 n2 B A) (@trow n1 A m2 n2 B) *)
by [].
Qed.
Lemma trowb_is_linear n1 m2 n2 (B : 'M_(m2,n2)) : linear (@trowb n1 m2 n2 B).
Proof.
(* Goal: @GRing.Linear.axiom (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) n1) (matrix_zmodType (GRing.Field.zmodType F) m2 (muln n1 n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@trowb n1 m2 n2 B) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType F)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2)))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2)))) *)
elim: n1=> [|n1 IH] //= k A1 A2 /=; first by rewrite scaler0 add0r.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S n1) n2)) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2)) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln (S n1) n2)) k (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A1) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A1)))) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A2) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)))) *)
rewrite linearD /= linearZ.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S n1) n2)) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.Scale.op (GRing.Field.ringType F) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)))) (@GRing.Linear.unwrap (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Linear.wrap (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Linear.map_for_map (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k (@GRing.Scale.op (GRing.Field.ringType F) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k) (@GRing.Linear.unify_map_at (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k (lsubmx_linear (GRing.Field.ringType F) (S O) (S O) n1))))) A1)) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2)))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln (S n1) n2)) k (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A1) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A1)))) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A2) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)))) *)
apply/matrixP=> i j.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) m2 (muln (S n1) n2) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@GRing.add (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.Scale.op (GRing.Field.ringType F) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k (@GRing.Linear.apply (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)))) (@GRing.Linear.unwrap (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Linear.wrap (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Linear.map_for_map (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k (@GRing.Scale.op (GRing.Field.ringType F) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k) (@GRing.Linear.unify_map_at (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (addn (S O) n1)) (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S O)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S O))) k (lsubmx_linear (GRing.Field.ringType F) (S O) (S O) n1))))) A1)) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2)))) i j) (@fun_of_matrix (GRing.Field.sort F) m2 (muln (S n1) n2) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln (S n1) n2)) k (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A1) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A1)))) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A2) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)))) i j) *)
rewrite !mxE.
(* Goal: @eq (GRing.Field.sort F) match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F)) (@GRing.mul (GRing.Field.ringType F) k (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (addn (S O) n1) A1 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O))))) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A2 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O))))) B) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2))) i j2 end (@GRing.add (GRing.Field.zmodType F) (@GRing.mul (GRing.Field.ringType F) k match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (addn (S O) n1) A1 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) B) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A1)) i j2 end) match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A2 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) B) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)) i j2 end) *)
case: split=> a.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2))) i a) (@GRing.add (GRing.Field.zmodType F) (@GRing.mul (GRing.Field.ringType F) k (@fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A1)) i a)) (@fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)) i a)) *)
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType F)) (@GRing.mul (GRing.Field.ringType F) k (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (addn (S O) n1) A1 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O))))) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A2 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O))))) B) i a) (@GRing.add (GRing.Field.zmodType F) (@GRing.mul (GRing.Field.ringType F) k (@fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (S O) (addn (S O) n1) A1 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) B) i a)) (@fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A2 (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) B) i a)) *)
by rewrite !mxE mulrDl mulrA.
(* Goal: @eq (GRing.Field.sort F) (@fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) (S O) (S n1)) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (@Choice.Class (matrix (GRing.Field.sort F) (S O) (S n1)) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) (S O) (S n1)) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) (S O) (S n1))) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) (S O) (S n1)))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) (S O) (S n1)) k A1) A2))) i a) (@GRing.add (GRing.Field.zmodType F) (@GRing.mul (GRing.Field.ringType F) k (@fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A1)) i a)) (@fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trowb n1 m2 n2 B (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A2)) i a)) *)
by rewrite linearD /= linearZ IH !mxE.
Qed.
Canonical Structure trowb_linear n1 m2 n2 B :=
Linear (@trowb_is_linear n1 m2 n2 B).
Lemma trow_is_linear n1 m2 n2 (A : 'rV_n1) : linear (@trow n1 A m2 n2).
Proof.
(* Goal: @GRing.Linear.axiom (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (matrix_zmodType (GRing.Field.zmodType F) m2 (muln n1 n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@trow n1 A m2 n2) (@GRing.Scale.scale_law (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@Logic.eq_refl (forall (_ : GRing.Ring.sort (GRing.Field.ringType F)) (_ : GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2)))))), GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.base (GRing.Field.ringType F) (@GRing.Lmodule.sort (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2))) (@GRing.Lmodule.class (GRing.Field.ringType F) (Phant (GRing.Ring.sort (GRing.Field.ringType F))) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2)))))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln n1 n2)))) *)
elim: n1 A => [|n1 IH] //= A k A1 A2 /=; first by rewrite scaler0 add0r.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S n1) n2)) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) m2 n2) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) m2 n2) (@Choice.Class (matrix (GRing.Field.sort F) m2 n2) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) m2 n2) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 n2)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n2))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) k A1) A2)) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) m2 n2) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) m2 n2) (@Choice.Class (matrix (GRing.Field.sort F) m2 n2) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) m2 n2) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 n2)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n2))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) k A1) A2))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln (S n1) n2)) k (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) A1) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 A1))) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) A2) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 A2))) *)
rewrite linearD /= linearZ /=.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S n1) n2)) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) m2 n2) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) m2 n2) (@Choice.Class (matrix (GRing.Field.sort F) m2 n2) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) m2 n2) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 n2)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n2))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.Field.ringType F) m2 n2) k (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) A1)) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) A2)) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) m2 n2) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) m2 n2) (@Choice.Class (matrix (GRing.Field.sort F) m2 n2) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) m2 n2) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 n2)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n2))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) k A1) A2))) (@GRing.add (matrix_zmodType (GRing.Field.zmodType F) m2 (muln (S n1) n2)) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 (muln (S n1) n2)) k (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) A1) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 A1))) (@row_mx (GRing.Field.sort F) m2 n2 (muln n1 n2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) n1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) A2) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 A2))) *)
apply/matrixP=> i j; rewrite !mxE.
(* Goal: @eq (GRing.Field.sort F) match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) m2 n2) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) m2 n2) (@Choice.Class (matrix (GRing.Field.sort F) m2 n2) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) m2 n2) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 n2)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n2))) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.Field.ringType F) m2 n2) k (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) A1)) (@GRing.scale (GRing.ComRing.ringType (GRing.Field.comRingType F)) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) A2)) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 (@GRing.add (@GRing.Zmodule.Pack (matrix (GRing.Field.sort F) m2 n2) (@GRing.Zmodule.Class (matrix (GRing.Field.sort F) m2 n2) (@Choice.Class (matrix (GRing.Field.sort F) m2 n2) (matrix_eqMixin (Choice.eqType (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F)))) m2 n2) (matrix_choiceMixin (GRing.Zmodule.choiceType (GRing.Ring.zmodType (GRing.Field.ringType F))) m2 n2)) (matrix_zmodMixin (GRing.Ring.zmodType (GRing.Field.ringType F)) m2 n2))) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) k A1) A2)) i j2 end (@GRing.add (GRing.Field.zmodType F) (@GRing.mul (GRing.Field.ringType F) k match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) A1) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 A1) i j2 end) match @split n2 (muln n1 n2) j with | inl j1 => @fun_of_matrix (GRing.Field.sort F) m2 n2 (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 n2) (@fun_of_matrix (GRing.Field.sort F) (S O) (addn (S O) n1) A (GRing.zero (Zp_zmodType O)) (@lshift (S O) n1 (GRing.zero (Zp_zmodType O)))) A2) i j1 | inr j2 => @fun_of_matrix (GRing.Field.sort F) m2 (muln n1 n2) (@trow n1 (@rsubmx (GRing.Field.sort F) (S O) (S O) n1 A) m2 n2 A2) i j2 end) *)
by case: split=> a; rewrite ?IH !mxE.
Qed.
Canonical Structure trow_linear n1 m2 n2 A :=
Linear (@trow_is_linear n1 m2 n2 A).
Fixpoint tprod (m1 : nat) :
forall n1 (A : 'M[F]_(m1,n1)) m2 n2 (B : 'M[F]_(m2,n2)),
'M[F]_(m1 * m2,n1 * n2) :=
if m1 is m'1.+1
return forall n1 (A : 'M[F]_(m1,n1)) m2 n2 (B : 'M[F]_(m2,n2)),
'M[F]_(m1 * m2,n1 * n2)
then
fun n1 (A : 'M[F]_(1 + m'1,n1)) m2 n2 B =>
(col_mx (trow (usubmx A) B) (tprod (dsubmx A) B))
else (fun _ _ _ _ _ => 0).
Lemma dsumx_mul m1 m2 n p A B :
dsubmx ((A *m B) : 'M[F]_(m1 + m2, n)) = dsubmx (A : 'M_(m1 + m2, p)) *m B.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 n) (@dsubmx (GRing.Field.sort F) m1 m2 n (@mulmx (GRing.Field.ringType F) (addn m1 m2) p n A B : matrix (GRing.Field.sort F) (addn m1 m2) n)) (@mulmx (GRing.Field.ringType F) m2 p n (@dsubmx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 p (A : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (addn m1 m2) p)) B) *)
apply/matrixP=> i j; rewrite !mxE; apply: eq_bigr=> k _.
(* Goal: @eq (GRing.Field.sort F) (@GRing.mul (GRing.Field.ringType F) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) (addn m1 m2) p A (@rshift m1 m2 i) k) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) p n B k j)) (@GRing.mul (GRing.Field.ringType F) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) m2 p (@dsubmx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 p A) i k) (@fun_of_matrix (GRing.Ring.sort (GRing.Field.ringType F)) p n B k j)) *)
by rewrite !mxE.
Qed.
Lemma usumx_mul m1 m2 n p A B :
usubmx ((A *m B) : 'M[F]_(m1 + m2, n)) = usubmx (A : 'M_(m1 + m2, p)) *m B.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m1 n) (@usubmx (GRing.Field.sort F) m1 m2 n (@mulmx (GRing.Field.ringType F) (addn m1 m2) p n A B : matrix (GRing.Field.sort F) (addn m1 m2) n)) (@mulmx (GRing.Field.ringType F) m1 p n (@usubmx (GRing.Ring.sort (GRing.Field.ringType F)) m1 m2 p (A : matrix (GRing.Ring.sort (GRing.Field.ringType F)) (addn m1 m2) p)) B) *)
by apply/matrixP=> i j; rewrite !mxE; apply: eq_bigr=> k _; rewrite !mxE.
Qed.
Let trow_mul (m1 m2 n2 p2 : nat)
(A : 'rV_m1) (B1: 'M[F]_(m2,n2)) (B2 :'M[F]_(n2,p2)) :
trow A (B1 *m B2) = B1 *m trow A B2.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln m1 p2)) (@trow m1 A m2 p2 (@mulmx (GRing.Field.ringType F) m2 n2 p2 B1 B2)) (@mulmx (GRing.Field.ringType F) m2 n2 (muln m1 p2) B1 (@trow m1 A n2 p2 B2)) *)
elim: m1 A => [|m1 IH] A /=; first by rewrite mulmx0.
(* Goal: @eq (matrix (GRing.Field.sort F) m2 (muln (S m1) p2)) (@row_mx (GRing.Field.sort F) m2 p2 (muln m1 p2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) m2 p2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@mulmx (GRing.Field.ringType F) m2 n2 p2 B1 B2)) (@trow m1 (@rsubmx (GRing.Field.sort F) (S O) (S O) m1 A) m2 p2 (@mulmx (GRing.Field.ringType F) m2 n2 p2 B1 B2))) (@mulmx (GRing.Field.ringType F) m2 n2 (muln (S m1) p2) B1 (@row_mx (GRing.Field.sort F) n2 p2 (muln m1 p2) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n2 p2) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m1 A) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) B2) (@trow m1 (@rsubmx (GRing.Field.sort F) (S O) (S O) m1 A) n2 p2 B2))) *)
by rewrite IH mul_mx_row -scalemxAr.
Qed.
Lemma tprodE m1 n1 p1 (A1 :'M[F]_(m1,n1)) (A2 :'M[F]_(n1,p1))
m2 n2 p2 (B1 :'M[F]_(m2,n2)) (B2 :'M[F]_(n2,p2)) :
tprod (A1 *m A2) (B1 *m B2) = (tprod A1 B1) *m (tprod A2 B2).
Let tprod_tr m1 n1 (A :'M[F]_(m1, 1 + n1)) m2 n2 (B :'M[F]_(m2, n2)) :
tprod A B = row_mx (trow (lsubmx A)^T B^T)^T (tprod (rsubmx A) B).
Lemma tprod1 m n : tprod (1%:M : 'M[F]_(m,m)) (1%:M : 'M[F]_(n,n)) = 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln m n) (muln m n)) (@tprod m m (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F)) : matrix (GRing.Field.sort F) m m) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)) : matrix (GRing.Field.sort F) n n)) (@scalar_mx (GRing.Field.ringType F) (muln m n) (GRing.one (GRing.Field.ringType F))) *)
elim: m n => [|m IH] n //=; first by rewrite [1%:M]flatmx0.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (@rsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@tprod m (S m) (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F)))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
rewrite tprod_tr.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (@rsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (@lsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F)))))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
set u := rsubmx _; have->: u = 0.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (@lsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F)))))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) (S O) m) u (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) *)
apply/matrixP=> i j; rewrite !mxE.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (@lsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F)))))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (GRing.Field.sort F) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S m))) (@lshift (S O) m i) (@rshift (S O) m j)))) (GRing.zero (GRing.Field.zmodType F)) *)
by case: i; case: j=> /= j Hj; case.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (@lsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F)))))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
set v := lsubmx (dsubmx _); have->: v = 0.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O)))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) m (S O)) v (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O))) *)
apply/matrixP=> i j; rewrite !mxE.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O)))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (GRing.Field.sort F) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S m))) (@rshift (S O) m i) (@lshift (S O) m j)))) (GRing.zero (GRing.Field.zmodType F)) *)
by case: i; case: j; case.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O)))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@rsubmx (GRing.Field.sort F) m (S O) m (@dsubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
set w := rsubmx _; have->: w = 1%:M.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O)))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (matrix (GRing.Field.sort F) m m) w (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F))) *)
apply/matrixP=> i j; rewrite !mxE.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O)))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (GRing.Field.sort F) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S m))) (@rshift (S O) m i) (@rshift (S O) m j)))) (@GRing.natmul (GRing.Ring.zmodType (GRing.Field.ringType F)) (GRing.one (GRing.Field.ringType F)) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType m)) i j))) *)
by case: i; case: j; case.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (@trow m (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) (S O) m)) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F))))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (@trmx (GRing.Field.sort F) n (muln m n) (@trow m (@trmx (GRing.Field.sort F) m (S O) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) m (S O)))) n n (@trmx (GRing.Field.sort F) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@tprod m m (@scalar_mx (GRing.Field.ringType F) m (GRing.one (GRing.Field.ringType F))) n n (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
rewrite IH -!trowbE !linear0.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@col_mx (GRing.Field.sort F) n (muln m n) (muln (S m) n) (@row_mx (GRing.Field.sort F) n n (muln m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n (muln m n)))) (@row_mx (GRing.Field.sort F) (muln m n) n (muln m n) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (muln m n) n)) (@scalar_mx (GRing.Field.ringType F) (muln m n) (GRing.one (GRing.Field.ringType F))))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
rewrite -block_mxEv.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@block_mx (GRing.Field.sort F) n (muln m n) n ((fix mul (n m : nat) {struct n} : nat := match n with | O => O | S p => Nat.add m (mul p m) end) m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (@fun_of_matrix (GRing.Field.sort F) (S O) (S O) (@lsubmx (GRing.Field.sort F) (S O) (S O) m (@usubmx (GRing.Field.sort F) (S O) m (S m) (@scalar_mx (GRing.Field.ringType F) (S m) (GRing.one (GRing.Field.ringType F))))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n (muln m n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (muln m n) n)) (@scalar_mx (GRing.Field.ringType F) (muln m n) (GRing.one (GRing.Field.ringType F)))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
set z := (lsubmx _) 0 0; have->: z = 1.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@block_mx (GRing.Field.sort F) n (muln m n) n ((fix mul (n m : nat) {struct n} : nat := match n with | O => O | S p => Nat.add m (mul p m) end) m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (GRing.one (GRing.Field.ringType F)) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n (muln m n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (muln m n) n)) (@scalar_mx (GRing.Field.ringType F) (muln m n) (GRing.one (GRing.Field.ringType F)))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
(* Goal: @eq (GRing.Field.sort F) z (GRing.one (GRing.Field.ringType F)) *)
by rewrite /z !mxE eqxx.
(* Goal: @eq (matrix (GRing.Field.sort F) (muln (S m) n) (muln (S m) n)) (@block_mx (GRing.Field.sort F) n (muln m n) n ((fix mul (n m : nat) {struct n} : nat := match n with | O => O | S p => Nat.add m (mul p m) end) m n) (@GRing.scale (GRing.Field.ringType F) (matrix_lmodType (GRing.Field.ringType F) n n) (GRing.one (GRing.Field.ringType F)) (@scalar_mx (GRing.Field.ringType F) n (GRing.one (GRing.Field.ringType F)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType F) n (muln m n))) (GRing.zero (matrix_zmodType (GRing.Ring.zmodType (GRing.Field.ringType F)) (muln m n) n)) (@scalar_mx (GRing.Field.ringType F) (muln m n) (GRing.one (GRing.Field.ringType F)))) (@scalar_mx (GRing.Field.ringType F) (muln (S m) n) (GRing.one (GRing.Field.ringType F))) *)
by rewrite scale1r scalar_mx_block.
Qed.
Lemma mxtrace_prod m n (A :'M[F]_(m)) (B :'M[F]_(n)) :
\tr (tprod A B) = \tr A * \tr B.
End Tensor.
Section StandardRepresentation.
Variables (R : fieldType) (gT : finGroupType) (G : {group gT}).
Local Notation reprG := (mx_representation R G).
Record representation :=
Representation {rdegree; mx_repr_of_repr :> reprG rdegree}.
Lemma mx_repr0 : mx_repr G (fun _ : gT => 1%:M : 'M[R]_0).
Proof.
(* Goal: @mx_repr (GRing.Field.comUnitRingType R) gT (@gval gT G) O (fun _ : FinGroup.arg_sort (FinGroup.base gT) => @scalar_mx (GRing.Field.ringType R) O (GRing.one (GRing.Field.ringType R)) : matrix (GRing.Field.sort R) O O) *)
by split=> // g h Hg Hx; rewrite mulmx1.
Qed.
Definition grepr0 := Representation (MxRepresentation mx_repr0).
Lemma add_mx_repr (rG1 rG2 : representation) :
mx_repr G (fun g => block_mx (rG1 g) 0 0 (rG2 g)).
Proof.
(* Goal: @mx_repr (GRing.Field.comUnitRingType R) gT (@gval gT G) (addn (rdegree rG1) (rdegree rG2)) (fun g : FinGroup.arg_sort (FinGroup.base gT) => @block_mx (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2) (rdegree rG1) (rdegree rG2) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG1) (mx_repr_of_repr rG1) g) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG2) (rdegree rG1))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG2) (mx_repr_of_repr rG2) g)) *)
split=> [|x y Hx Hy]; first by rewrite !repr_mx1 -scalar_mx_block.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (addn (rdegree rG1) (rdegree rG2)) (addn (rdegree rG1) (rdegree rG2))) (@block_mx (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2) (rdegree rG1) (rdegree rG2) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG1) (mx_repr_of_repr rG1) (@mulg (FinGroup.base gT) x y)) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG2) (rdegree rG1))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG2) (mx_repr_of_repr rG2) (@mulg (FinGroup.base gT) x y))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (addn (rdegree rG1) (rdegree rG2)) (addn (rdegree rG1) (rdegree rG2)) (addn (rdegree rG1) (rdegree rG2)) (@block_mx (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2) (rdegree rG1) (rdegree rG2) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG1) (mx_repr_of_repr rG1) x) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG2) (rdegree rG1))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG2) (mx_repr_of_repr rG2) x)) (@block_mx (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2) (rdegree rG1) (rdegree rG2) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG1) (mx_repr_of_repr rG1) y) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG1) (rdegree rG2))) (GRing.zero (matrix_zmodType (GRing.ComUnitRing.zmodType (GRing.Field.comUnitRingType R)) (rdegree rG2) (rdegree rG1))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (rdegree rG2) (mx_repr_of_repr rG2) y))) *)
by rewrite mulmx_block !(mulmx0, mul0mx, addr0, add0r, repr_mxM).
Qed.
Definition dadd_grepr rG1 rG2 :=
Representation (MxRepresentation (add_mx_repr rG1 rG2)).
Section DsumRepr.
Variables (n : nat) (rG : reprG n).
Lemma mx_rsim_dadd (U V W : 'M_n) (rU rV : representation)
(modU : mxmodule rG U) (modV : mxmodule rG V) (modW : mxmodule rG W) :
(U + V :=: W)%MS -> mxdirect (U + V) ->
mx_rsim (submod_repr modU) rU -> mx_rsim (submod_repr modV) rV ->
mx_rsim (submod_repr modW) (dadd_grepr rU rV).
Lemma mx_rsim_dsum (I : finType) (P : pred I) U rU (W : 'M_n)
(modU : forall i, mxmodule rG (U i)) (modW : mxmodule rG W) :
let S := (\sum_(i | P i) U i)%MS in (S :=: W)%MS -> mxdirect S ->
(forall i, mx_rsim (submod_repr (modU i)) (rU i : representation)) ->
mx_rsim (submod_repr modW) (\big[dadd_grepr/grepr0]_(i | P i) rU i).
Proof.
(* Goal: let S := @BigOp.bigop (GRing.Zmodule.sort (matrix_zmodType (GRing.Field.zmodType R) n n)) (Finite.sort I) (GRing.zero (matrix_zmodType (GRing.Field.zmodType R) n n)) (index_enum I) (fun i : Finite.sort I => @BigBody (matrix (GRing.Field.sort R) n n) (Finite.sort I) i (@addsmx R n n n) (P i) (U i)) in forall (_ : @eqmx R n n n S W) (_ : is_true (@mxdirect_def R n n (@sum_mxsum R n (@nary_mxsum_expr R (Finite.sort I) (index_enum I) P n (fun i : Finite.sort I => @trivial_mxsum R n n (U i)))) (Phantom (matrix (GRing.Zmodule.sort (GRing.Field.zmodType R)) n n) S))) (_ : forall i : Finite.sort I, @mx_rsim R gT G (@mxrank R n n (U i)) (@submod_repr R gT G n rG (U i) (modU i)) (rdegree (rU i : representation)) (mx_repr_of_repr (rU i : representation))), @mx_rsim R gT G (@mxrank R n n W) (@submod_repr R gT G n rG W modW) (rdegree (@BigOp.bigop representation (Finite.sort I) grepr0 (index_enum I) (fun i : Finite.sort I => @BigBody representation (Finite.sort I) i dadd_grepr (P i) (rU i)))) (mx_repr_of_repr (@BigOp.bigop representation (Finite.sort I) grepr0 (index_enum I) (fun i : Finite.sort I => @BigBody representation (Finite.sort I) i dadd_grepr (P i) (rU i)))) *)
move=> /= defW dxW rsimU.
(* Goal: @mx_rsim R gT G (@mxrank R n n W) (@submod_repr R gT G n rG W modW) (rdegree (@BigOp.bigop representation (Finite.sort I) grepr0 (index_enum I) (fun i : Finite.sort I => @BigBody representation (Finite.sort I) i dadd_grepr (P i) (rU i)))) (mx_repr_of_repr (@BigOp.bigop representation (Finite.sort I) grepr0 (index_enum I) (fun i : Finite.sort I => @BigBody representation (Finite.sort I) i dadd_grepr (P i) (rU i)))) *)
rewrite mxdirectE /= -!(big_filter _ P) in dxW defW *.
elim: {P}(filter P _) => [|i e IHe] in W modW dxW defW *.
rewrite !big_nil /= in defW *.
by exists 0 => [||? _]; rewrite ?mul0mx ?mulmx0 // /row_free -defW !mxrank0.
rewrite !big_cons /= in dxW defW *.
rewrite 2!(big_nth i) !big_mkord /= in IHe dxW defW.
set Wi := (\sum_i _)%MS in defW dxW IHe.
rewrite -mxdirectE mxdirect_addsE !mxdirectE eqxx /= -/Wi in dxW.
have modWi: mxmodule rG Wi by apply: sumsmx_module.
case/andP: dxW; move/(IHe Wi modWi) {IHe}; move/(_ (eqmx_refl _))=> rsimWi.
by move/eqP; move/mxdirect_addsP=> dxUiWi; apply: mx_rsim_dadd (rsimU i) rsimWi.
Qed.
Qed.
Definition muln_grepr rW k := \big[dadd_grepr/grepr0]_(i < k) rW.
Lemma mx_rsim_socle (sG : socleType rG) (W : sG) (rW : representation) :
let modW : mxmodule rG W := component_mx_module rG (socle_base W) in
mx_rsim (socle_repr W) rW ->
mx_rsim (submod_repr modW) (muln_grepr rW (socle_mult W)).
End DsumRepr.
Section ProdRepr.
Variables (n1 n2 : nat) (rG1 : reprG n1) (rG2 : reprG n2).
Lemma prod_mx_repr : mx_repr G (fun g => tprod (rG1 g) (rG2 g)).
Proof.
(* Goal: @mx_repr (GRing.Field.comUnitRingType R) gT (@gval gT G) (muln n1 n2) (fun g : FinGroup.arg_sort (FinGroup.base gT) => @tprod R n1 n1 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n1 rG1 g) n2 n2 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 g)) *)
split=>[|i j InG JnG]; first by rewrite !repr_mx1 tprod1.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (muln n1 n2) (muln n1 n2)) (@tprod R n1 n1 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n1 rG1 (@mulg (FinGroup.base gT) i j)) n2 n2 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 (@mulg (FinGroup.base gT) i j))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (muln n1 n2) (muln n1 n2) (muln n1 n2) (@tprod R n1 n1 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n1 rG1 i) n2 n2 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 i)) (@tprod R n1 n1 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n1 rG1 j) n2 n2 (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 j))) *)
by rewrite !repr_mxM // tprodE.
Qed.
Definition prod_repr := MxRepresentation prod_mx_repr.
End ProdRepr.
Lemma prod_repr_lin n2 (rG1 : reprG 1) (rG2 : reprG n2) :
{in G, forall x, let cast_n2 := esym (mul1n n2) in
prod_repr rG1 rG2 x = castmx (cast_n2, cast_n2) (rG1 x 0 0 *: rG2 x)}.
Proof.
(* Goal: @prop_in1 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x : FinGroup.arg_sort (FinGroup.base gT) => @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (muln (S O) n2) (muln (S O) n2)) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (muln (S O) n2) (@prod_repr (S O) n2 rG1 rG2) x) (@castmx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)))) n2 n2 (muln (S O) n2) (muln (S O) n2) (@pair (@eq nat n2 (muln (S O) n2)) (@eq nat n2 (muln (S O) n2)) (@esym nat (muln (S O) n2) n2 (mul1n n2)) (@esym nat (muln (S O) n2) n2 (mul1n n2))) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) n2 n2) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x)))) (inPhantom (forall x : FinGroup.arg_sort (FinGroup.base gT), let cast_n2 : @eq nat n2 (muln (S O) n2) := @esym nat (muln (S O) n2) n2 (mul1n n2) in @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (muln (S O) n2) (muln (S O) n2)) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (muln (S O) n2) (@prod_repr (S O) n2 rG1 rG2) x) (@castmx (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)))) n2 n2 (muln (S O) n2) (muln (S O) n2) (@pair (@eq nat n2 (muln (S O) n2)) (@eq nat n2 (muln (S O) n2)) cast_n2 cast_n2) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) n2 n2) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType R)) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x))))) *)
move=> x Gx /=; set cast_n2 := esym _; rewrite /prod_repr /= !mxE !lshift0.
(* Goal: @eq (matrix (GRing.Field.sort R) (muln (S O) n2) (muln (S O) n2)) (@col_mx (GRing.Field.sort R) n2 (muln O n2) (muln (S O) n2) (@row_mx (GRing.Field.sort R) n2 n2 (muln O n2) (@GRing.scale (GRing.Field.ringType R) (matrix_lmodType (GRing.Field.ringType R) n2 n2) (@fun_of_matrix (GRing.Field.sort R) (addn (S O) O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType (addn O O))) (GRing.zero (Zp_zmodType (addn O O)))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType R) n2 (muln O n2)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType R) (muln O n2) (muln (S O) n2)))) (@castmx (GRing.Field.sort R) n2 n2 (muln (S O) n2) (muln (S O) n2) (@pair (@eq nat n2 (muln (S O) n2)) (@eq nat n2 (muln (S O) n2)) cast_n2 cast_n2) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) n2 n2) (@fun_of_matrix (GRing.Field.sort R) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x))) *)
apply/matrixP=> i j; rewrite castmxE /=.
(* Goal: @eq (GRing.Field.sort R) (@fun_of_matrix (GRing.Field.sort R) (muln (S O) n2) (muln (S O) n2) (@col_mx (GRing.Field.sort R) n2 (muln O n2) (muln (S O) n2) (@row_mx (GRing.Field.sort R) n2 n2 (muln O n2) (@GRing.scale (GRing.Field.ringType R) (matrix_lmodType (GRing.Field.ringType R) n2 n2) (@fun_of_matrix (GRing.Field.sort R) (addn (S O) O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType (addn O O))) (GRing.zero (Zp_zmodType (addn O O)))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x)) (GRing.zero (matrix_zmodType (GRing.Field.zmodType R) n2 (muln O n2)))) (GRing.zero (matrix_zmodType (GRing.Field.zmodType R) (muln O n2) (muln (S O) n2)))) i j) (@fun_of_matrix (GRing.Field.sort R) n2 n2 (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) n2 n2) (@fun_of_matrix (GRing.Field.sort R) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x)) (@cast_ord (muln (S O) n2) n2 (@esym nat n2 (muln (S O) n2) cast_n2) i) (@cast_ord (muln (S O) n2) n2 (@esym nat n2 (muln (S O) n2) cast_n2) j)) *)
do 2![rewrite mxE; case: splitP => [? ? | []//]].
(* Goal: @eq (GRing.Field.sort R) (@fun_of_matrix (GRing.Field.sort R) n2 n2 (@GRing.scale (GRing.Field.ringType R) (matrix_lmodType (GRing.Field.ringType R) n2 n2) (@fun_of_matrix (GRing.Field.sort R) (addn (S O) O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType (addn O O))) (GRing.zero (Zp_zmodType (addn O O)))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x)) _j_ _j1_) (@fun_of_matrix (GRing.Field.sort R) n2 n2 (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType R)) n2 n2) (@fun_of_matrix (GRing.Field.sort R) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) (S O) rG1 x) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))) (@repr_mx (GRing.Field.comUnitRingType R) gT (@gval gT G) n2 rG2 x)) (@cast_ord (muln (S O) n2) n2 (@esym nat n2 (muln (S O) n2) cast_n2) i) (@cast_ord (muln (S O) n2) n2 (@esym nat n2 (muln (S O) n2) cast_n2) j)) *)
by congr ((_ *: rG2 x) _ _); apply: val_inj.
Qed.
End StandardRepresentation.
Arguments grepr0 {R gT G}.
Prenex Implicits dadd_grepr.
Section Char.
Variables (gT : finGroupType) (G : {group gT}).
Fact cfRepr_subproof n (rG : mx_representation algCF G n) :
is_class_fun <<G>> [ffun x => \tr (rG x) *+ (x \in G)].
Proof.
(* Goal: is_true (@is_class_fun gT (@generated gT (@gval gT G)) (@FunFinfun.finfun (FinGroup.arg_finType (FinGroup.base gT)) (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x0 : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x0))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x0 : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x0)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x0 : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x0))) gT (@gval gT G) n rG x)) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))))) *)
rewrite genGid; apply: intro_class_fun => [x y Gx Gy | _ /negbTE-> //].
(* Goal: @eq (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG (@conjg gT x y))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@conjg gT x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG x)) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
by rewrite groupJr // !repr_mxM ?groupM ?groupV // mxtrace_mulC repr_mxK.
Qed.
Definition cfRepr n rG := Cfun 0 (@cfRepr_subproof n rG).
Lemma cfRepr1 n rG : @cfRepr n rG 1%g = n%:R.
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfRepr n rG) (oneg (FinGroup.base gT))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n) *)
by rewrite cfunE group1 repr_mx1 mxtrace1.
Qed.
Lemma cfRepr_sim n1 n2 rG1 rG2 :
mx_rsim rG1 rG2 -> @cfRepr n1 rG1 = @cfRepr n2 rG2.
Proof.
(* Goal: forall _ : @mx_rsim (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n1 rG1 n2 rG2, @eq (@classfun gT (@gval gT G)) (@cfRepr n1 rG1) (@cfRepr n2 rG2) *)
case/mx_rsim_def=> f12 [f21] fK def_rG1; apply/cfun_inP=> x Gx.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfRepr n1 rG1) x) (@fun_of_cfun gT (@gval gT G) (@cfRepr n2 rG2) x) *)
by rewrite !cfunE def_rG1 // mxtrace_mulC mulmxA fK mul1mx.
Qed.
Lemma cfRepr0 : cfRepr grepr0 = 0.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@grepr0 (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@grepr0 (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) *)
by apply/cfun_inP=> x Gx; rewrite !cfunE Gx mxtrace1.
Qed.
Lemma cfRepr_dadd rG1 rG2 :
cfRepr (dadd_grepr rG1 rG2) = cfRepr rG1 + cfRepr rG2.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@dadd_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1 rG2)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@dadd_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1 rG2))) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2))) *)
by apply/cfun_inP=> x Gx; rewrite !cfunE Gx mxtrace_block.
Qed.
Lemma cfRepr_dsum I r (P : pred I) rG :
cfRepr (\big[dadd_grepr/grepr0]_(i <- r | P i) rG i)
= \sum_(i <- r | P i) cfRepr (rG i).
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@BigOp.bigop (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) I (@grepr0 (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) r (fun i : I => @BigBody (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) I i (@dadd_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (P i) (rG i)))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@BigOp.bigop (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) I (@grepr0 (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) r (fun i : I => @BigBody (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) I i (@dadd_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (P i) (rG i))))) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) I (GRing.zero (@cfun_zmodType gT (@gval gT G))) r (fun i : I => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) I i (@GRing.add (@cfun_zmodType gT (@gval gT G))) (P i) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (rG i)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (rG i))))) *)
exact: (big_morph _ cfRepr_dadd cfRepr0).
Qed.
Lemma cfRepr_muln rG k : cfRepr (muln_grepr rG k) = cfRepr rG *+ k.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@muln_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG k)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@muln_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG k))) (@GRing.natmul (@cfun_zmodType gT (@gval gT G)) (@cfRepr (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) k) *)
by rewrite cfRepr_dsum /= sumr_const card_ord.
Qed.
Section StandardRepr.
Variables (n : nat) (rG : mx_representation algCF G n).
Let sG := DecSocleType rG.
Let iG : irrType algCF G := DecSocleType _.
Definition standard_irr (W : sG) := irr_comp iG (socle_repr W).
Definition standard_socle i := pick [pred W | standard_irr W == i].
Local Notation soc := standard_socle.
Definition standard_irr_coef i := oapp (fun W => socle_mult W) 0%N (soc i).
Definition standard_grepr :=
\big[dadd_grepr/grepr0]_i
muln_grepr (Representation (socle_repr i)) (standard_irr_coef i).
Lemma mx_rsim_standard : mx_rsim rG standard_grepr.
End StandardRepr.
Definition cfReg (B : {set gT}) : 'CF(B) := #|B|%:R *: '1_[1].
Lemma cfRegE x : @cfReg G x = #|G|%:R *+ (x == 1%g).
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (cfReg (@gval gT G)) x) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x (oneg (FinGroup.base gT))))) *)
by rewrite cfunE cfuniE ?normal1 // inE mulr_natr.
Qed.
Lemma cfReprReg : cfRepr (regular_repr algCF G) = cfReg G.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (cfReg (@gval gT G)) *)
apply/cfun_inP=> x Gx; rewrite cfRegE.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfRepr (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) x) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x (oneg (FinGroup.base gT))))) *)
have [-> | ntx] := altP (x =P 1%g); first by rewrite cfRepr1.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfRepr (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) x) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (nat_of_bool false)) *)
rewrite cfunE Gx [\tr _]big1 // => i _; rewrite 2!mxE /=.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))))) i (@gring_index gT G (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) x))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))))) *)
rewrite -(inj_eq enum_val_inj) gring_indexK ?groupM ?enum_valP //.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (nat_of_bool (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) (@enum_val (FinGroup.finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) (@mulg (FinGroup.base gT) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i) x)))) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))))) *)
by rewrite eq_mulVg1 mulKg (negbTE ntx).
Qed.
Definition xcfun (chi : 'CF(G)) A :=
(gring_row A *m (\col_(i < #|G|) chi (enum_val i))) 0 0.
Lemma xcfun_is_additive phi : additive (xcfun phi).
Proof.
(* Goal: @GRing.Additive.axiom (matrix_zmodType (GRing.ComUnitRing.zmodType Algebraics.Implementation.comUnitRingType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (xcfun phi) *)
by move=> A B; rewrite /xcfun linearB mulmxBl !mxE.
Qed.
Canonical xcfun_additive phi := Additive (xcfun_is_additive phi).
Lemma xcfunZr a phi A : xcfun phi (a *: A) = a * xcfun phi A.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (xcfun phi (@GRing.scale (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (matrix_lmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) a A)) (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) a (xcfun phi A)) *)
by rewrite /xcfun linearZ -scalemxAl mxE.
Qed.
Definition xcfun_r_head k A phi := let: tt := k in xcfun phi A.
Fact xcfun_r_is_additive A : additive (xcfun_r A).
Proof.
(* Goal: @GRing.Additive.axiom (@cfun_zmodType gT (@gval gT G)) (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (xcfun_r_head tt A) *)
move=> phi psi; rewrite /= /xcfun !mxE -sumrB; apply: eq_bigr => i _.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) (@matrix_of_fun Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) matrix_key (fun (i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (_ : Finite.sort (ordinal_finType (S O))) => @fun_of_cfun gT (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) phi (@GRing.opp (@cfun_zmodType gT (@gval gT G)) psi)) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) i (GRing.zero (Zp_zmodType O)))) (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) (@matrix_of_fun Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) matrix_key (fun (i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (_ : Finite.sort (ordinal_finType (S O))) => @fun_of_cfun gT (@gval gT G) phi (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) i (GRing.zero (Zp_zmodType O)))) (@GRing.opp (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) (@matrix_of_fun Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) matrix_key (fun (i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (_ : Finite.sort (ordinal_finType (S O))) => @fun_of_cfun gT (@gval gT G) psi (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) i (GRing.zero (Zp_zmodType O)))))) *)
by rewrite !mxE !cfunE mulrBr.
Qed.
Canonical xcfun_r_additive A := Additive (xcfun_r_is_additive A).
Lemma xcfunZl a phi A : xcfun (a *: phi) A = a * xcfun phi A.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (xcfun (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) a phi) A) (@GRing.mul Algebraics.Implementation.ringType a (xcfun phi A)) *)
rewrite /xcfun !mxE big_distrr; apply: eq_bigr => i _ /=.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix Algebraics.Implementation.type (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) (@matrix_of_fun Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) matrix_key (fun (i : ordinal (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : ordinal (S O)) => @fun_of_cfun gT (@gval gT G) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) a phi) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) i (GRing.zero (Zp_zmodType O)))) (@GRing.mul Algebraics.Implementation.ringType a (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix Algebraics.Implementation.type (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) i) (@fun_of_matrix Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) (@matrix_of_fun Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) matrix_key (fun (i : ordinal (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : ordinal (S O)) => @fun_of_cfun gT (@gval gT G) phi (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) i (GRing.zero (Zp_zmodType O))))) *)
by rewrite !mxE cfunE mulrCA.
Qed.
Lemma xcfun_repr n rG A : xcfun (@cfRepr n rG) A = \tr (gring_op rG A).
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (xcfun (@cfRepr n rG) A) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@gring_op (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G n rG A)) *)
rewrite gring_opE [gring_row A]row_sum_delta !linear_sum /xcfun !mxE.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType))) (index_enum (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (fun j : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) j (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType))) true (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) j) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) (@matrix_of_fun Algebraics.Implementation.type (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (S O) matrix_key (fun (i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (_ : Finite.sort (ordinal_finType (S O))) => @fun_of_cfun gT (@gval gT G) (@cfRepr n rG) (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) j (GRing.zero (Zp_zmodType O)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (index_enum (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (fun i : Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (Finite.sort (ordinal_finType (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) true (@GRing.Linear.apply (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n) (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@GRing.mul (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n), GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (mxtrace_linear (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n) (@GRing.Linear.apply (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) n n) (@GRing.scale (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n)) (Phant (forall _ : @GRing.Lmodule.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (Phant (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (matrix_lmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), GRing.Zmodule.sort (matrix_zmodType (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) n n))) (@gring_mx_linear (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G n rG) (@GRing.scale (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (matrix_lmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@gring_row Algebraics.Implementation.comUnitRingType gT G A) (GRing.zero (Zp_zmodType O)) i) (@delta_mx (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))))) *)
apply: eq_bigr => i _; rewrite !mxE /= !linearZ cfunE enum_valP /=.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (@fun_of_matrix Algebraics.Implementation.type (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (@gring_index gT G (oneg (FinGroup.base gT))) i) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG (@enum_val (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)) i))) (S O))) (@GRing.mul (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (@fun_of_matrix Algebraics.Implementation.type (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (fun x : FinGroup.sort (FinGroup.base gT) => @SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A (@gring_index gT G (oneg (FinGroup.base gT))) i) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (@gring_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G n rG (@delta_mx (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType O))) i)))) *)
by congr (_ * \tr _) => {A} /=; rewrite /gring_mx /= -rowE rowK mxvecK.
Qed.
End Char.
Notation xcfun_r A := (xcfun_r_head tt A).
Notation "phi .[ A ]" := (xcfun phi A) : cfun_scope.
Definition pred_Nirr gT B := #|@classes gT B|.-1.
Arguments pred_Nirr {gT} B%g.
Notation Nirr G := (pred_Nirr G).+1.
Notation Iirr G := 'I_(Nirr G).
Section IrrClassDef.
Variables (gT : finGroupType) (G : {group gT}).
Let sG := DecSocleType (regular_repr algCF G).
Lemma NirrE : Nirr G = #|classes G|.
Proof.
(* Goal: @eq nat (S (@pred_Nirr gT (@gval gT G))) (@card (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) *)
by rewrite /pred_Nirr (cardD1 [1]) classes1.
Qed.
Fact Iirr_cast : Nirr G = #|sG|.
Proof.
(* Goal: @eq nat (S (@pred_Nirr gT (@gval gT G))) (@card (@socle_finType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (@mem (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (predPredType (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG)) (@sort_of_simpl_pred (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (pred_of_argType (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG))))) *)
by rewrite NirrE ?card_irr ?algC'G //; apply: groupC.
Qed.
Let offset := cast_ord (esym Iirr_cast) (enum_rank [1 sG]%irr).
Definition socle_of_Iirr (i : Iirr G) : sG :=
enum_val (cast_ord Iirr_cast (i + offset)).
Definition irr_of_socle (Wi : sG) : Iirr G :=
cast_ord (esym Iirr_cast) (enum_rank Wi) - offset.
Local Notation W := socle_of_Iirr.
Lemma socle_Iirr0 : W 0 = [1 sG]%irr.
Proof.
(* Goal: @eq (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (socle_of_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@principal_comp (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G sG) *)
by rewrite /W add0r cast_ordKV enum_rankK.
Qed.
Lemma socle_of_IirrK : cancel W irr_of_socle.
Proof.
(* Goal: @cancel (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (ordinal (S (@pred_Nirr gT (@gval gT G)))) socle_of_Iirr irr_of_socle *)
by move=> i; rewrite /irr_of_socle enum_valK cast_ordK addrK.
Qed.
Lemma irr_of_socleK : cancel irr_of_socle W.
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) irr_of_socle socle_of_Iirr *)
by move=> Wi; rewrite /W subrK cast_ordKV enum_rankK.
Qed.
Hint Resolve socle_of_IirrK irr_of_socleK : core.
Lemma irr_of_socle_bij (A : pred (Iirr G)) : {on A, bijective irr_of_socle}.
Proof.
(* Goal: @bijective_on (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (predPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) A) irr_of_socle *)
by apply: onW_bij; exists W.
Qed.
Lemma socle_of_Iirr_bij (A : pred sG) : {on A, bijective W}.
Proof.
(* Goal: @bijective_on (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (@mem (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG) (predPredType (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) sG)) A) socle_of_Iirr *)
by apply: onW_bij; exists irr_of_socle.
Qed.
Definition irr_def gT B : (Nirr B).-tuple 'CF(B) :=
let irr_of i := 'Res[B, <<B>>] (@cfRepr gT _ _ 'Chi_(inord i)) in
[tuple of mkseq irr_of (Nirr B)].
Definition irr := locked_with irr_key irr_def.
Lemma Iirr1_neq0 : G :!=: 1%g -> inord 1 != 0 :> Iirr G.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))))), is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (@inord (@pred_Nirr gT (@gval gT G)) (S O) : ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))) : ordinal (S (@pred_Nirr gT (@gval gT G)))))) *)
by rewrite -classes_gt1 -NirrE -val_eqE /= => /inordK->.
Qed.
Lemma has_nonprincipal_irr : G :!=: 1%g -> {i : Iirr G | i != 0}.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))))), @sig (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))))) *)
by move/Iirr1_neq0; exists (inord 1).
Qed.
Lemma irrRepr i : cfRepr 'Chi_i = 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) *)
rewrite [@irr]unlock (tnth_nth 0) nth_mkseq // -[<<G>>]/(gval _) genGidG.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (@cfRes gT (@gval gT G) (@gval gT G) (@cfRepr gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G (@inord (@pred_Nirr gT (@gval gT G)) (@nat_of_ord (S (@pred_Nirr gT (@gval gT G))) i)))) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G (@inord (@pred_Nirr gT (@gval gT G)) (@nat_of_ord (S (@pred_Nirr gT (@gval gT G))) i)))))) *)
by rewrite cfRes_id inord_val.
Qed.
Lemma irr0 : 'chi[G]_0 = 1.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (GRing.one (@cfun_ringType gT (@gval gT G))) *)
apply/cfun_inP=> x Gx; rewrite -irrRepr cfun1E cfunE Gx.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))))) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))))) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))))) x)) (nat_of_bool true)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (nat_of_bool true)) *)
by rewrite socle_Iirr0 irr1_repr // mxtrace1 degree_irr1.
Qed.
Lemma cfun1_irr : 1 \in irr G.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (GRing.one (@cfun_ringType gT (@gval gT G))) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
by rewrite -irr0 mem_tnth.
Qed.
Lemma mem_irr i : 'chi_i \in irr G.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
exact: mem_tnth.
Qed.
Lemma irrP xi : reflect (exists i, xi = 'chi_i) (xi \in irr G).
Proof.
(* Goal: Bool.reflect (@ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) xi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@in_mem (@classfun gT (@gval gT G)) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
apply: (iffP idP) => [/(nthP 0)[i] | [i ->]]; last exact: mem_irr.
(* Goal: forall (_ : is_true (leq (S i) (@size (Equality.sort (GRing.Zmodule.eqType (@cfun_zmodType gT (@gval gT G)))) (@tval (S (@pred_Nirr gT (@gval gT G))) (Equality.sort (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))))) (_ : @eq (Equality.sort (GRing.Zmodule.eqType (@cfun_zmodType gT (@gval gT G)))) (@nth (Equality.sort (GRing.Zmodule.eqType (@cfun_zmodType gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (@tval (S (@pred_Nirr gT (@gval gT G))) (Equality.sort (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G))) i) xi), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) xi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
rewrite size_tuple => lt_i_G <-.
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i0 : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) (@nth (Equality.sort (GRing.Zmodule.eqType (@cfun_zmodType gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (@tval (S (@pred_Nirr gT (@gval gT G))) (Equality.sort (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G))) i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i0)) *)
by exists (Ordinal lt_i_G); rewrite (tnth_nth 0).
Qed.
Let sG := DecSocleType (regular_repr algCF G).
Let C'G := algC'G G.
Let closG := @groupC _ G.
Local Notation W i := (@socle_of_Iirr _ G i).
Local Notation "''n_' i" := 'n_(W i).
Local Notation "''R_' i" := 'R_(W i).
Local Notation "''e_' i" := 'e_(W i).
Lemma irr1_degree i : 'chi_i 1%g = ('n_i)%:R.
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) *)
by rewrite -irrRepr cfRepr1.
Qed.
Lemma Cnat_irr1 i : 'chi_i 1%g \in Cnat.
Proof.
(* Goal: is_true (@in_mem Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite irr1_degree rpred_nat.
Qed.
Lemma irr1_gt0 i : 0 < 'chi_i 1%g.
Proof.
(* Goal: is_true (@Num.Def.ltr Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT)))) *)
by rewrite irr1_degree ltr0n irr_degree_gt0.
Qed.
Lemma irr1_neq0 i : 'chi_i 1%g != 0.
Proof.
(* Goal: is_true (negb (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType))) *)
by rewrite eqr_le ltr_geF ?irr1_gt0.
Qed.
Lemma irr_neq0 i : 'chi_i != 0.
Proof.
(* Goal: is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (GRing.zero (@cfun_zmodType gT (@gval gT G))))) *)
by apply: contraNneq (irr1_neq0 i) => ->; rewrite cfunE.
Qed.
Definition cfIirr B (chi : 'CF(B)) : Iirr B := inord (index chi (irr B)).
Lemma cfIirrE chi : chi \in irr G -> 'chi_(cfIirr chi) = chi.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))), @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@cfIirr (@gval gT G) chi)) chi *)
move=> chi_irr; rewrite (tnth_nth 0) inordK ?nth_index //.
(* Goal: is_true (leq (S (@index (@cfun_eqType gT (@gval gT G)) chi (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))))) (S (@pred_Nirr gT (@gval gT G)))) *)
by rewrite -index_mem size_tuple in chi_irr.
Qed.
Lemma cfIirrPE J (f : J -> 'CF(G)) (P : pred J) :
(forall j, P j -> f j \in irr G) ->
forall j, P j -> 'chi_(cfIirr (f j)) = f j.
Proof.
(* Goal: forall (_ : forall (j : J) (_ : is_true (P j)), is_true (@in_mem (@classfun gT (@gval gT G)) (f j) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G))))) (j : J) (_ : is_true (P j)), @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@cfIirr (@gval gT G) (f j))) (f j) *)
by move=> irr_f j /irr_f; apply: cfIirrE.
Qed.
Corollary irr_sum_square : \sum_i ('chi[G]_i 1%g) ^+ 2 = #|G|%:R.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
rewrite -(sum_irr_degree sG) // natr_sum (reindex _ (socle_of_Iirr_bij _)) /=.
(* Goal: @eq Algebraics.Implementation.type (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun j : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (expn (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G sG (@socle_of_Iirr gT G j)) (S (S O)))))) *)
by apply: eq_bigr => i _; rewrite irr1_degree natrX.
Qed.
Lemma cfReg_sum : cfReg G = \sum_i 'chi_i 1%g *: 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfReg gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
apply/cfun_inP=> x Gx; rewrite -cfReprReg cfunE Gx (mxtrace_regular sG) //=.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (@BigOp.bigop Algebraics.Implementation.type (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))))) (index_enum (@socle_finType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG)) (fun i : @socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG => @BigBody Algebraics.Implementation.type (@socle_sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG) i (@GRing.add (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))))) true (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))) (@mxrank (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG i)) (@submod_mx (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) (@socle_base (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG i) (@socle_module (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG i) x)) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G sG i)))) (S O)) (@fun_of_cfun gT (@gval gT G) (@BigOp.bigop (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) x) *)
rewrite sum_cfunE (reindex _ (socle_of_Iirr_bij _)); apply: eq_bigr => i _.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))) (@mxrank (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG (@socle_of_Iirr gT G i))) (@submod_mx (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) (@socle_base (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG (@socle_of_Iirr gT G i)) (@socle_module (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT G) sG (@socle_of_Iirr gT G i)) x)) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G sG (@socle_of_Iirr gT G i))) (@fun_of_cfun gT (@gval gT G) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) x) *)
by rewrite -irrRepr cfRepr1 !cfunE Gx mulr_natl.
Qed.
Let aG := regular_repr algCF G.
Let R_G := group_ring algCF G.
Lemma xcfun_annihilate i j A : i != j -> (A \in 'R_j)%MS -> ('chi_i).[A]%CF = 0.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j))) (_ : is_true (@submx (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) (S O) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) (@Wedderburn_subring (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G j)))), @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@xcfun gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) A) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType))) *)
move=> neq_ij RjA; rewrite -irrRepr xcfun_repr.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@gring_op (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) A)) (GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType))) *)
by rewrite (irr_repr'_op0 _ _ RjA) ?raddf0 // eq_sym (can_eq socle_of_IirrK).
Qed.
Lemma xcfunG phi x : x \in G -> phi.[aG x]%CF = phi x.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@xcfun gT G phi (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) aG x)) (@fun_of_cfun gT (@gval gT G) phi x) *)
by move=> Gx; rewrite /xcfun /gring_row rowK -rowE !mxE !(gring_indexK, mul1g).
Qed.
Lemma xcfun_mul_id i A :
(A \in R_G)%MS -> ('chi_i).['e_i *m A]%CF = ('chi_i).[A]%CF.
Proof.
(* Goal: forall _ : is_true (@submx (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (S O) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (muln (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@mxvec (GRing.Field.sort (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) A) R_G), @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@xcfun gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mulmx (GRing.Field.ringType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@Wedderburn_id (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) A)) (@xcfun gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) A) *)
move=> RG_A; rewrite -irrRepr !xcfun_repr gring_opM //.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@gring_op (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@Wedderburn_id (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (@gring_op (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) A))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@gring_op (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) A)) *)
by rewrite op_Wedderburn_id ?mul1mx.
Qed.
Lemma xcfun_id i j : ('chi_i).['e_j]%CF = 'chi_i 1%g *+ (i == j).
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@xcfun gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@Wedderburn_id (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G j))) (@GRing.natmul Algebraics.Implementation.zmodType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (nat_of_bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j))) *)
have [<-{j} | /xcfun_annihilate->//] := altP eqP; last exact: Wedderburn_id_mem.
(* Goal: @eq (GRing.Ring.sort (GRing.ComUnitRing.ringType Algebraics.Implementation.comUnitRingType)) (@xcfun gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@Wedderburn_id (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (@GRing.natmul Algebraics.Implementation.zmodType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (nat_of_bool true)) *)
by rewrite -xcfunG // repr_mx1 -(xcfun_mul_id _ (envelop_mx1 _)) mulmx1.
Qed.
Lemma irr_free : free (irr G).
Lemma irr_inj : injective (tnth (irr G)).
Proof.
(* Goal: @injective (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))) *)
by apply/injectiveP/free_uniq; rewrite map_tnth_enum irr_free.
Qed.
Lemma irrK : cancel (tnth (irr G)) (@cfIirr G).
Proof.
(* Goal: @cancel (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))) (@cfIirr (@gval gT G)) *)
by move=> i; apply: irr_inj; rewrite cfIirrE ?mem_irr.
Qed.
Lemma irr_eq1 i : ('chi_i == 1) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (@cfun_eqType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (GRing.one (@cfun_ringType gT (@gval gT G)))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) *)
by rewrite -irr0 (inj_eq irr_inj).
Qed.
Lemma cforder_irr_eq1 i : (#['chi_i]%CF == 1%N) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op nat_eqType (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (S O)) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) *)
by rewrite -dvdn1 dvdn_cforder irr_eq1.
Qed.
Lemma irr_basis : basis_of 'CF(G)%VS (irr G).
Proof.
(* Goal: is_true (@basis_of Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (@fullv Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G))) (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)))) *)
rewrite /basis_of irr_free andbT -dimv_leqif_eq ?subvf //.
(* Goal: is_true (@eq_op nat_eqType (@dimv Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (@span Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))))) (@dimv Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (@fullv Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G))))) *)
by rewrite dim_cfun (eqnP irr_free) size_tuple NirrE.
Qed.
Lemma eq_sum_nth_irr a : \sum_i a i *: 'chi[G]_i = \sum_i a i *: (irr G)`_i.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@nth (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))) (@nat_of_ord (S (@pred_Nirr gT (@gval gT G))) i))))) *)
by apply: eq_bigr => i; rewrite -tnth_nth.
Qed.
Theorem cfun_irr_sum phi : {a | phi = \sum_i a i *: 'chi[G]_i}.
Proof.
(* Goal: @sig (forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), GRing.Ring.sort Algebraics.Implementation.ringType) (fun a : forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), GRing.Ring.sort Algebraics.Implementation.ringType => @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) phi (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
rewrite (coord_basis irr_basis (memvf phi)) -eq_sum_nth_irr.
(* Goal: @sig (forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), GRing.Ring.sort Algebraics.Implementation.ringType) (fun a : forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), GRing.Ring.sort Algebraics.Implementation.ringType => @eq (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
by exists ((coord (irr G))^~ phi).
Qed.
Lemma cfRepr_standard n (rG : mx_representation algCF G n) :
cfRepr (standard_grepr rG)
= \sum_i (standard_irr_coef rG (W i))%:R *: 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@standard_grepr gT G n rG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@standard_grepr gT G n rG))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@standard_irr_coef gT G n rG (@socle_of_Iirr gT G i))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
rewrite cfRepr_dsum (reindex _ (socle_of_Iirr_bij _)).
(* Goal: @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) j (@Monoid.operator (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (@Monoid.com_operator (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (GRing.add_comoid (@cfun_zmodType gT (@gval gT G))))) true (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@muln_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@mxrank (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G j))) (@socle_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G j))) (@standard_irr_coef gT G n rG (@socle_of_Iirr gT G j)))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@muln_grepr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@mxrank (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@socle_base (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G j))) (@socle_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G) (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G j))) (@standard_irr_coef gT G n rG (@socle_of_Iirr gT G j))))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@standard_irr_coef gT G n rG (@socle_of_Iirr gT G i))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
by apply: eq_bigr => i _; rewrite scaler_nat cfRepr_muln irrRepr.
Qed.
Lemma cfRepr_inj n1 n2 rG1 rG2 :
@cfRepr _ G n1 rG1 = @cfRepr _ G n2 rG2 -> mx_rsim rG1 rG2.
Lemma cfRepr_rsimP n1 n2 rG1 rG2 :
reflect (mx_rsim rG1 rG2) (@cfRepr _ G n1 rG1 == @cfRepr _ G n2 rG2).
Proof.
(* Goal: Bool.reflect (@mx_rsim (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n1 rG1 n2 rG2) (@eq_op (@cfun_eqType gT (@gval gT G)) (@cfRepr gT G n1 rG1) (@cfRepr gT G n2 rG2)) *)
by apply: (iffP eqP) => [/cfRepr_inj | /cfRepr_sim].
Qed.
Lemma irr_reprP xi :
reflect (exists2 rG : representation _ G, mx_irreducible rG & xi = cfRepr rG)
(xi \in irr G).
Proof.
(* Goal: Bool.reflect (@ex2 (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @mx_irreducible (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @eq (@classfun gT (@gval gT G)) xi (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@in_mem (@classfun gT (@gval gT G)) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
apply: (iffP (irrP xi)) => [[i ->] | [[n rG] irr_rG ->]].
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
(* Goal: @ex2 (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @mx_irreducible (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) *)
by exists (Representation 'Chi_i); [apply: socle_irr | rewrite irrRepr].
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
exists (irr_of_socle (irr_comp sG rG)); rewrite -irrRepr irr_of_socleK /=.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr gT G n rG) (@cfRepr gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@irr_comp (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G sG n rG)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@irr_comp (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G sG n rG))) *)
exact/cfRepr_sim/rsim_irr_comp.
Qed.
Lemma Wedderburn_id_expansion i :
'e_i = #|G|%:R^-1 *: \sum_(x in G) 'chi_i 1%g * 'chi_i x^-1%g *: aG x.
End IrrClass.
Arguments cfReg {gT} B%g.
Prenex Implicits cfIirr irrK.
Arguments irrP {gT G xi}.
Arguments irr_reprP {gT G xi}.
Arguments irr_inj {gT G} [x1 x2].
Section IsChar.
Variable gT : finGroupType.
Definition character {G : {set gT}} :=
[qualify a phi : 'CF(G) | [forall i, coord (irr G) i phi \in Cnat]].
Canonical character_keyed G := KeyedQualifier (character_key G).
Variable G : {group gT}.
Implicit Types (phi chi xi : 'CF(G)) (i : Iirr G).
Lemma irr_char i : 'chi_i \is a character.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by apply/forallP=> j; rewrite (tnth_nth 0) coord_free ?irr_free ?isNatC_nat.
Qed.
Lemma cfun1_char : (1 : 'CF(G)) \is a character.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (GRing.one (@cfun_ringType gT (@gval gT G)) : @classfun gT (@gval gT G)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by rewrite -irr0 irr_char.
Qed.
Lemma cfun0_char : (0 : 'CF(G)) \is a character.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (GRing.zero (@cfun_zmodType gT (@gval gT G)) : @classfun gT (@gval gT G)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by apply/forallP=> i; rewrite linear0 rpred0.
Qed.
Fact add_char : addr_closed (@character G).
Proof.
(* Goal: @GRing.addr_closed (@cfun_zmodType gT (@gval gT G)) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))) *)
split=> [|chi xi /forallP-Nchi /forallP-Nxi]; first exact: cfun0_char.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (@GRing.add (@cfun_zmodType gT (@gval gT G)) chi xi) (@mem (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (predPredType (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G)))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by apply/forallP=> i; rewrite linearD rpredD /=.
Qed.
Canonical character_addrPred := AddrPred add_char.
Lemma char_sum_irrP {phi} :
reflect (exists n, phi = \sum_i (n i)%:R *: 'chi_i) (phi \is a character).
Proof.
(* Goal: Bool.reflect (@ex (forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat) (fun n : forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat => @eq (@classfun gT (@gval gT G)) phi (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
apply: (iffP idP)=> [/forallP-Nphi | [n ->]]; last first.
(* Goal: @ex (forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat) (fun n : forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat => @eq (@classfun gT (@gval gT G)) phi (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by apply: rpred_sum => i _; rewrite scaler_nat rpredMn // irr_char.
(* Goal: @ex (forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat) (fun n : forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat => @eq (@classfun gT (@gval gT G)) phi (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
do [have [a ->] := cfun_irr_sum phi] in Nphi *; exists (truncC \o a).
(* Goal: @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@funcomp nat (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) tt truncC a i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
apply: eq_bigr => i _; congr (_ *: _); have:= eqP (Nphi i).
(* Goal: forall _ : @eq (Equality.sort (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (truncC (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (a i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))), @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (a i) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@funcomp nat (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) tt truncC a i)) *)
by rewrite eq_sum_nth_irr coord_sum_free ?irr_free.
Qed.
Lemma char_sum_irr chi :
chi \is a character -> {r | chi = \sum_(i <- r) 'chi_i}.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))), @sig (list (ordinal (S (@pred_Nirr gT (@gval gT G))))) (fun r : list (ordinal (S (@pred_Nirr gT (@gval gT G)))) => @eq (@classfun gT (@gval gT G)) chi (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) r (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
move=> Nchi; apply: sig_eqW; case/char_sum_irrP: Nchi => n {chi}->.
(* Goal: @ex (Choice.sort (seq_choiceType (ordinal_choiceType (S (@pred_Nirr gT (@gval gT G)))))) (fun x : Choice.sort (seq_choiceType (ordinal_choiceType (S (@pred_Nirr gT (@gval gT G))))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT G))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) x (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
elim/big_rec: _ => [|i _ _ [r ->]]; first by exists nil; rewrite big_nil.
(* Goal: @ex (Choice.sort (seq_choiceType (ordinal_choiceType (S (@pred_Nirr gT (@gval gT G)))))) (fun x : Choice.sort (seq_choiceType (ordinal_choiceType (S (@pred_Nirr gT (@gval gT G))))) => @eq (Equality.sort (@cfun_eqType gT (@gval gT G))) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) r (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) x (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
exists (ncons (n i) i r); rewrite scaler_nat.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT G))) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))))) (@GRing.natmul (@GRing.Lmodule.zmodType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (n i)) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) r (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) (@ncons (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (n i) i r) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
by elim: {n}(n i) => [|n IHn]; rewrite ?add0r //= big_cons mulrS -addrA IHn.
Qed.
Lemma Cnat_char1 chi : chi \is a character -> chi 1%g \in Cnat.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))), is_true (@in_mem Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
case/char_sum_irr=> r ->{chi}.
(* Goal: is_true (@in_mem Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@BigOp.bigop (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@cfun_zmodType gT (@gval gT G))) r (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (GRing.Zmodule.sort (@cfun_zmodType gT (@gval gT G))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@cfun_zmodType gT (@gval gT G))) true (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (oneg (FinGroup.base gT))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by elim/big_rec: _ => [|i chi _ Nchi1]; rewrite cfunE ?rpredD // Cnat_irr1.
Qed.
Lemma char1_ge0 chi : chi \is a character -> 0 <= chi 1%g.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))) *)
by move/Cnat_char1/Cnat_ge0.
Qed.
Lemma char1_eq0 chi : chi \is a character -> (chi 1%g == 0) = (chi == 0).
Lemma char1_gt0 chi : chi \is a character -> (0 < chi 1%g) = (chi != 0).
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))), @eq bool (@Num.Def.ltr Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))) (negb (@eq_op (@cfun_eqType gT (@gval gT G)) chi (GRing.zero (@cfun_zmodType gT (@gval gT G))))) *)
by move=> Nchi; rewrite -char1_eq0 // Cnat_gt0 ?Cnat_char1.
Qed.
Lemma char_reprP phi :
reflect (exists rG : representation algCF G, phi = cfRepr rG)
(phi \is a character).
Proof.
(* Goal: Bool.reflect (@ex (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @eq (@classfun gT (@gval gT G)) phi (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
apply: (iffP char_sum_irrP) => [[n ->] | [[n rG] ->]]; last first.
(* Goal: @ex (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) *)
(* Goal: @ex (forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat) (fun n0 : forall _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))), nat => @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n0 i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
exists (fun i => standard_irr_coef rG (socle_of_Iirr i)).
(* Goal: @ex (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) *)
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n rG))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@standard_irr_coef gT G n rG (@socle_of_Iirr gT G i))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
by rewrite -cfRepr_standard (cfRepr_sim (mx_rsim_standard rG)).
(* Goal: @ex (@representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G) (fun rG : @representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G => @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) *)
exists (\big[dadd_grepr/grepr0]_i muln_grepr (Representation 'Chi_i) (n i)).
(* Goal: @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@BigOp.bigop (@representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@grepr0 (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@dadd_grepr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) true (@muln_grepr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@Representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (n i))))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@BigOp.bigop (@representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@grepr0 (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@dadd_grepr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G) true (@muln_grepr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@Representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (n i)))))) *)
rewrite cfRepr_dsum; apply: eq_bigr => i _.
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (n i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@muln_grepr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@Representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (n i))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@muln_grepr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@Representation (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (n i)))) *)
by rewrite cfRepr_muln irrRepr scaler_nat.
Qed.
Local Notation reprG := (mx_representation algCF G).
Lemma cfRepr_char n (rG : reprG n) : cfRepr rG \is a character.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@cfRepr gT G n rG) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by apply/char_reprP; exists (Representation rG).
Qed.
Lemma cfReg_char : cfReg G \is a character.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@cfReg gT (@gval gT G)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
by rewrite -cfReprReg cfRepr_char.
Qed.
Lemma cfRepr_prod n1 n2 (rG1 : reprG n1) (rG2 : reprG n2) :
cfRepr rG1 * cfRepr rG2 = cfRepr (prod_repr rG1 rG2).
Proof.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G n1 rG1) (@cfRepr gT G n2 rG2)) (@cfRepr gT G (muln n1 n2) (@prod_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G n1 n2 rG1 rG2)) *)
by apply/cfun_inP=> x Gx; rewrite !cfunE /= Gx mxtrace_prod.
Qed.
Lemma mul_char : mulr_closed (@character G).
Proof.
(* Goal: @GRing.mulr_closed (@cfun_ringType gT (@gval gT G)) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))) *)
split=> [|_ _ /char_reprP[rG1 ->] /char_reprP[rG2 ->]]; first exact: cfun1_char.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2))) (@mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (predPredType (GRing.Ring.sort (@cfun_ringType gT (@gval gT G)))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character (@gval gT G))))) *)
apply/char_reprP; exists (Representation (prod_repr rG1 rG2)).
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2))) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (muln (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2)) (@prod_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2)))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (muln (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2)) (@prod_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG1) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG2))))) *)
by rewrite cfRepr_prod.
Qed.
Canonical char_mulrPred := MulrPred mul_char.
Canonical char_semiringPred := SemiringPred mul_char.
End IsChar.
Prenex Implicits character.
Arguments char_reprP {gT G phi}.
Section AutChar.
Variables (gT : finGroupType) (G : {group gT}).
Implicit Type u : {rmorphism algC -> algC}.
Implicit Type chi : 'CF(G).
Lemma cfRepr_map u n (rG : mx_representation algCF G n) :
cfRepr (map_repr u rG) = cfAut u (cfRepr rG).
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfRepr gT G n (@map_repr Algebraics.Implementation.comUnitRingType Algebraics.Implementation.comUnitRingType u gT G n rG)) (@cfAut gT (@gval gT G) u (@cfRepr gT G n rG)) *)
by apply/cfun_inP=> x Gx; rewrite !cfunE Gx map_reprE trace_map_mx.
Qed.
Lemma cfAut_char u chi : (cfAut u chi \is a character) = (chi \is a character).
Lemma cfConjC_char chi : (chi^*%CF \is a character) = (chi \is a character).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
exact: cfAut_char.
Qed.
Lemma cfAut_char1 u (chi : 'CF(G)) :
chi \is a character -> cfAut u chi 1%g = chi 1%g.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfAut gT (@gval gT G) u chi) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) *)
by move/Cnat_char1=> Nchi1; rewrite cfunE aut_Cnat.
Qed.
Lemma cfAut_irr1 u i : (cfAut u 'chi[G]_i) 1%g = 'chi_i 1%g.
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfAut gT (@gval gT G) u (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) *)
exact: cfAut_char1 (irr_char i).
Qed.
Lemma cfConjC_char1 (chi : 'CF(G)) :
chi \is a character -> chi^*%CF 1%g = chi 1%g.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) chi) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) *)
exact: cfAut_char1.
Qed.
Lemma cfConjC_irr1 u i : ('chi[G]_i)^*%CF 1%g = 'chi_i 1%g.
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) *)
exact: cfAut_irr1.
Qed.
End AutChar.
Section Linear.
Variables (gT : finGroupType) (G : {group gT}).
Definition linear_char {B : {set gT}} :=
[qualify a phi : 'CF(B) | (phi \is a character) && (phi 1%g == 1)].
Section OneChar.
Variable xi : 'CF(G).
Hypothesis CFxi : xi \is a linear_char.
Lemma lin_char1: xi 1%g = 1.
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType) *)
by case/andP: CFxi => _ /eqP.
Qed.
Lemma lin_charW : xi \is a character.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
by case/andP: CFxi.
Qed.
Lemma cfun1_lin_char : (1 : 'CF(G)) \is a linear_char.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (GRing.one (@cfun_ringType gT (@gval gT G)) : @classfun gT (@gval gT G)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
by rewrite qualifE cfun1_char /= cfun11.
Qed.
Lemma lin_charM : {in G &, {morph xi : x y / (x * y)%g >-> x * y}}.
Proof.
(* Goal: @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi ((fun x0 y0 : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x0 y0) x y)) ((fun x0 y0 : Algebraics.Implementation.type => @GRing.mul Algebraics.Implementation.ringType x0 y0) (@fun_of_cfun gT (@gval gT G) xi x) (@fun_of_cfun gT (@gval gT G) xi y))) (inPhantom (@morphism_2 (FinGroup.arg_sort (FinGroup.base gT)) Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi) (fun x y : FinGroup.arg_sort (FinGroup.base gT) => @mulg (FinGroup.base gT) x y) (fun x y : Algebraics.Implementation.type => @GRing.mul Algebraics.Implementation.ringType x y))) *)
move=> x y Gx Gy; case/andP: CFxi => /char_reprP[[n rG] -> /=].
(* Goal: forall _ : is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType)), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) (@mulg (FinGroup.base gT) x y)) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) x) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) y)) *)
rewrite cfRepr1 pnatr_eq1 => /eqP n1; rewrite {n}n1 in rG *.
rewrite !cfunE Gx Gy groupM //= !mulr1n repr_mxM //.
(* Goal: forall _ : is_true (@eq_op Algebraics.Implementation.eqType (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG (oneg (FinGroup.base gT)))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (oneg (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (GRing.one Algebraics.Implementation.ringType)), @eq Algebraics.Implementation.type (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n n n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG x) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG y))) (@GRing.mul Algebraics.Implementation.ringType (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG x)) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG y))) *)
by rewrite [rG x]mx11_scalar [rG y]mx11_scalar -scalar_mxM !mxtrace_scalar.
Qed.
Qed.
Lemma lin_char_prod I r (P : pred I) (x : I -> gT) :
(forall i, P i -> x i \in G) ->
xi (\prod_(i <- r | P i) x i)%g = \prod_(i <- r | P i) xi (x i).
Proof.
(* Goal: forall _ : forall (i : I) (_ : is_true (P i)), is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (x i) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@BigOp.bigop (FinGroup.sort (FinGroup.base gT)) I (oneg (FinGroup.base gT)) r (fun i : I => @BigBody (FinGroup.arg_sort (FinGroup.base gT)) I i (@mulg (FinGroup.base gT)) (P i) (x i)))) (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) I (GRing.one Algebraics.Implementation.ringType) r (fun i : I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) I i (@GRing.mul Algebraics.Implementation.ringType) (P i) (@fun_of_cfun gT (@gval gT G) xi (x i)))) *)
move=> Gx; elim/(big_load (fun y => y \in G)): _.
(* Goal: prod (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@BigOp.bigop (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) I (oneg (FinGroup.base gT)) r (fun i : I => @BigBody (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) I i (@mulg (FinGroup.base gT)) (P i) (x i))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@BigOp.bigop (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) I (oneg (FinGroup.base gT)) r (fun i : I => @BigBody (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) I i (@mulg (FinGroup.base gT)) (P i) (x i)))) (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) I (GRing.one Algebraics.Implementation.ringType) r (fun i : I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) I i (@GRing.mul Algebraics.Implementation.ringType) (P i) (@fun_of_cfun gT (@gval gT G) xi (x i))))) *)
elim/big_rec2: _ => [|i a y Pi [Gy <-]]; first by rewrite lin_char1.
(* Goal: prod (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) (x i) y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@mulg (FinGroup.base gT) (x i) y)) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) xi (x i)) (@fun_of_cfun gT (@gval gT G) xi y))) *)
by rewrite groupM ?lin_charM ?Gx.
Qed.
Let xiMV x : x \in G -> xi x * xi (x^-1)%g = 1.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) xi x) (@fun_of_cfun gT (@gval gT G) xi (@invg (FinGroup.base gT) x))) (GRing.one Algebraics.Implementation.ringType) *)
by move=> Gx; rewrite -lin_charM ?groupV // mulgV lin_char1.
Qed.
Lemma lin_char_neq0 x : x \in G -> xi x != 0.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (negb (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) xi x) (GRing.zero Algebraics.Implementation.zmodType))) *)
by move/xiMV/(congr1 (predC1 0)); rewrite /= oner_eq0 mulf_eq0 => /norP[].
Qed.
Lemma lin_charV x : x \in G -> xi x^-1%g = (xi x)^-1.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@invg (FinGroup.base gT) x)) (@GRing.inv Algebraics.Implementation.unitRingType (@fun_of_cfun gT (@gval gT G) xi x)) *)
by move=> Gx; rewrite -[_^-1]mulr1 -(xiMV Gx) mulKf ?lin_char_neq0.
Qed.
Lemma lin_charX x n : x \in G -> xi (x ^+ n)%g = xi x ^+ n.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@expgn (FinGroup.base gT) x n)) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) xi x) n) *)
move=> Gx; elim: n => [|n IHn]; first exact: lin_char1.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@expgn (FinGroup.base gT) x (S n))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) xi x) (S n)) *)
by rewrite expgS exprS lin_charM ?groupX ?IHn.
Qed.
Lemma lin_char_unity_root x : x \in G -> xi x ^+ #[x] = 1.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) xi x) (@order gT x)) (GRing.one Algebraics.Implementation.ringType) *)
by move=> Gx; rewrite -lin_charX // expg_order lin_char1.
Qed.
Lemma normC_lin_char x : x \in G -> `|xi x| = 1.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) xi x)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) *)
move=> Gx; apply/eqP; rewrite -(@pexpr_eq1 _ _ #[x]) ?normr_ge0 //.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) xi x)) (@order gT x)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) *)
by rewrite -normrX // lin_char_unity_root ?normr1.
Qed.
Lemma lin_charV_conj x : x \in G -> xi x^-1%g = (xi x)^*.
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi (@invg (FinGroup.base gT) x)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) xi x)) *)
move=> Gx; rewrite lin_charV // invC_norm mulrC normC_lin_char //.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (Num.NumDomain.comUnitRingType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType)))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) xi x)) (@GRing.inv (Num.NumDomain.unitRingType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType)) (@GRing.exp (Num.NumDomain.ringType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (S (S O))))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) xi x)) *)
by rewrite expr1n divr1.
Qed.
Lemma lin_char_irr : xi \in irr G.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
case/andP: CFxi => /char_reprP[rG ->]; rewrite cfRepr1 pnatr_eq1 => /eqP n1.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
by apply/irr_reprP; exists rG => //; apply/mx_abs_irrW/linear_mx_abs_irr.
Qed.
Lemma mul_conjC_lin_char : xi * xi^*%CF = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) xi (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) xi)) (GRing.one (@cfun_ringType gT (@gval gT G))) *)
apply/cfun_inP=> x Gx.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@GRing.mul (@cfun_ringType gT (@gval gT G)) xi (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) xi)) x) (@fun_of_cfun gT (@gval gT G) (GRing.one (@cfun_ringType gT (@gval gT G))) x) *)
by rewrite !cfunE cfun1E Gx -normCK normC_lin_char ?expr1n.
Qed.
Lemma lin_char_unitr : xi \in GRing.unit.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (GRing.UnitRing.sort (@cfun_unitRingType gT (@gval gT G))) (predPredType (GRing.UnitRing.sort (@cfun_unitRingType gT (@gval gT G)))) (@has_quality (S O) (GRing.UnitRing.sort (@cfun_unitRingType gT (@gval gT G))) (@GRing.unit (@cfun_unitRingType gT (@gval gT G)))))) *)
by apply/unitrPr; exists xi^*%CF; apply: mul_conjC_lin_char.
Qed.
Lemma invr_lin_char : xi^-1 = xi^*%CF.
Proof.
(* Goal: @eq (GRing.UnitRing.sort (@cfun_unitRingType gT (@gval gT G))) (@GRing.inv (@cfun_unitRingType gT (@gval gT G)) xi) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) xi) *)
by rewrite -[_^-1]mulr1 -mul_conjC_lin_char mulKr ?lin_char_unitr.
Qed.
Lemma fful_lin_char_inj : cfaithful xi -> {in G &, injective xi}.
Proof.
(* Goal: forall _ : is_true (@cfaithful gT (@gval gT G) xi), @prop_in2 (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (fun x1 x2 : FinGroup.arg_sort (FinGroup.base gT) => forall _ : @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) xi x1) (@fun_of_cfun gT (@gval gT G) xi x2), @eq (FinGroup.arg_sort (FinGroup.base gT)) x1 x2) (inPhantom (@injective Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (@fun_of_cfun gT (@gval gT G) xi))) *)
move=> fful_phi x y Gx Gy xi_xy; apply/eqP; rewrite eq_mulgV1 -in_set1.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@mulg (FinGroup.base gT) x (@invg (FinGroup.base gT) y)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@set1 (FinGroup.arg_finType (FinGroup.base gT)) (oneg (FinGroup.base gT)))))) *)
rewrite (subsetP fful_phi) // inE groupM ?groupV //=; apply/forallP=> z.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) xi (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) x (@invg (FinGroup.base gT) y)) z)) (@fun_of_cfun gT (@gval gT G) xi z)) *)
have [Gz | G'z] := boolP (z \in G); last by rewrite !cfun0 ?groupMl ?groupV.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) xi (@mulg (FinGroup.base gT) (@mulg (FinGroup.base gT) x (@invg (FinGroup.base gT) y)) z)) (@fun_of_cfun gT (@gval gT G) xi z)) *)
by rewrite -mulgA lin_charM ?xi_xy -?lin_charM ?groupM ?groupV // mulKVg.
Qed.
End OneChar.
Lemma cfAut_lin_char u (xi : 'CF(G)) :
(cfAut u xi \is a linear_char) = (xi \is a linear_char).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) u xi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
by rewrite qualifE cfAut_char; apply/andb_id2l=> /cfAut_char1->.
Qed.
Lemma cfConjC_lin_char (xi : 'CF(G)) :
(xi^*%CF \is a linear_char) = (xi \is a linear_char).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) xi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
exact: cfAut_lin_char.
Qed.
Lemma card_Iirr_abelian : abelian G -> #|Iirr G| = #|G|.
Proof.
(* Goal: forall _ : is_true (@abelian gT (@gval gT G)), @eq nat (@card (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (predPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@sort_of_simpl_pred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (pred_of_argType (ordinal (S (@pred_Nirr gT (@gval gT G)))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite card_ord NirrE card_classes_abelian => /eqP.
Qed.
Lemma card_Iirr_cyclic : cyclic G -> #|Iirr G| = #|G|.
Proof.
(* Goal: forall _ : is_true (@cyclic gT (@gval gT G)), @eq nat (@card (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (predPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@sort_of_simpl_pred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (pred_of_argType (ordinal (S (@pred_Nirr gT (@gval gT G)))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by move/cyclic_abelian/card_Iirr_abelian.
Qed.
Lemma char_abelianP :
reflect (forall i : Iirr G, 'chi_i \is a linear_char) (abelian G).
Proof.
(* Goal: Bool.reflect (forall i : ordinal (S (@pred_Nirr gT (@gval gT G))), is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G)))))) (@abelian gT (@gval gT G)) *)
apply: (iffP idP) => [cGG i | CF_G].
(* Goal: is_true (@abelian gT (@gval gT G)) *)
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
rewrite qualifE irr_char /= irr1_degree.
(* Goal: is_true (@abelian gT (@gval gT G)) *)
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (GRing.one Algebraics.Implementation.ringType)) *)
by rewrite irr_degree_abelian //; last apply: groupC.
(* Goal: is_true (@abelian gT (@gval gT G)) *)
rewrite card_classes_abelian -NirrE -eqC_nat -irr_sum_square //.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S (@pred_Nirr gT (@gval gT G)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O)))))) *)
rewrite -{1}[Nirr G]card_ord -sumr_const; apply/eqP/eq_bigr=> i _.
(* Goal: @eq (Equality.sort Algebraics.Implementation.eqType) (GRing.one Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O))) *)
by rewrite lin_char1 ?expr1n ?CF_G.
Qed.
Lemma irr_repr_lin_char (i : Iirr G) x :
x \in G -> 'chi_i \is a linear_char ->
irr_repr (socle_of_Iirr i) x = ('chi_i x)%:M.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G)))))), @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (@repr_mx (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT (@gval gT G) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) x) (@scalar_mx Algebraics.Implementation.ringType (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) *)
move=> Gx CFi; rewrite -irrRepr cfunE Gx.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i))) (@repr_mx (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType)) gT (@gval gT G) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) x) (@scalar_mx Algebraics.Implementation.ringType (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) x)) (nat_of_bool true))) *)
move: (_ x); rewrite -[irr_degree _]natCK -irr1_degree lin_char1 //.
(* Goal: forall repr_mx : matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))) (truncC (GRing.one Algebraics.Implementation.ringType)) (truncC (GRing.one Algebraics.Implementation.ringType)), @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType))) (truncC (GRing.one Algebraics.Implementation.ringType)) (truncC (GRing.one Algebraics.Implementation.ringType))) repr_mx (@scalar_mx Algebraics.Implementation.ringType (truncC (GRing.one Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (truncC (GRing.one Algebraics.Implementation.ringType)) repr_mx) (nat_of_bool true))) *)
by rewrite (natCK 1) => A; rewrite trace_mx11 -mx11_scalar.
Qed.
Canonical linear_char_keted B := KeyedQualifier (linear_char_key B).
Fact linear_char_divr : divr_closed (@linear_char G).
Proof.
(* Goal: @GRing.divr_closed (@cfun_unitRingType gT (@gval gT G)) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))) *)
split=> [|chi xi Lchi Lxi]; first exact: cfun1_lin_char.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType (@cfun_unitRingType gT (@gval gT G)))) (@GRing.mul (GRing.UnitRing.ringType (@cfun_unitRingType gT (@gval gT G))) chi (@GRing.inv (@cfun_unitRingType gT (@gval gT G)) xi)) (@mem (GRing.UnitRing.sort (@cfun_unitRingType gT (@gval gT G))) (predPredType (GRing.UnitRing.sort (@cfun_unitRingType gT (@gval gT G)))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
rewrite invr_lin_char // qualifE cfunE.
(* Goal: is_true (andb (@in_mem (@classfun gT (@gval gT G)) (@GRing.mul (GRing.UnitRing.ringType (@cfun_unitRingType gT (@gval gT G))) chi (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) xi)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@eq_op Algebraics.Implementation.eqType (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) xi) (oneg (FinGroup.base gT)))) (GRing.one Algebraics.Implementation.ringType))) *)
by rewrite rpredM ?lin_char1 ?mulr1 ?lin_charW //= cfConjC_lin_char.
Qed.
Canonical lin_char_mulrPred := MulrPred linear_char_divr.
Canonical lin_char_divrPred := DivrPred linear_char_divr.
Lemma irr_cyclic_lin i : cyclic G -> 'chi[G]_i \is a linear_char.
Proof.
(* Goal: forall _ : is_true (@cyclic gT (@gval gT G)), is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
by move/cyclic_abelian/char_abelianP.
Qed.
Lemma irr_prime_lin i : prime #|G| -> 'chi[G]_i \is a linear_char.
Proof.
(* Goal: forall _ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char (@gval gT G))))) *)
by move/prime_cyclic/irr_cyclic_lin.
Qed.
End Linear.
Prenex Implicits linear_char.
Section OrthogonalityRelations.
Variables aT gT : finGroupType.
Lemma repr_rsim_diag (G : {group gT}) f (rG : mx_representation algCF G f) x :
x \in G -> let chi := cfRepr rG in
exists e,
[/\ exists2 B, B \in unitmx & rG x = invmx B *m diag_mx e *m B,
(forall i, e 0 i ^+ #[x] = 1) /\ (forall i, `|e 0 i| = 1),
chi x = \sum_i e 0 i /\ `|chi x| <= chi 1%g
& chi x^-1%g = (chi x)^*].
Variables (A : {group aT}) (G : {group gT}).
Lemma char_inv (chi : 'CF(G)) x : chi \is a character -> chi x^-1%g = (chi x)^*.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) chi (@invg (FinGroup.base gT) x)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) chi x)) *)
case Gx: (x \in G); last by rewrite !cfun0 ?rmorph0 ?groupV ?Gx.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) chi (@invg (FinGroup.base gT) x)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) chi x)) *)
by case/char_reprP=> rG ->; have [e [_ _ _]] := repr_rsim_diag rG Gx.
Qed.
Lemma irr_inv i x : 'chi[G]_i x^-1%g = ('chi_i x)^*.
Proof.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@invg (FinGroup.base gT) x)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) *)
exact/char_inv/irr_char.
Qed.
Theorem generalized_orthogonality_relation y (i j : Iirr G) :
#|G|%:R^-1 * (\sum_(x in G) 'chi_i (x * y)%g * 'chi_j x^-1%g)
= (i == j)%:R * ('chi_i y / 'chi_i 1%g).
Corollary first_orthogonality_relation (i j : Iirr G) :
#|G|%:R^-1 * (\sum_(x in G) 'chi_i x * 'chi_j x^-1%g) = (i == j)%:R.
Definition irr_class i := enum_val (cast_ord (NirrE G) i).
Definition class_Iirr xG :=
cast_ord (esym (NirrE G)) (enum_rank_in (classes1 G) xG).
Local Notation c := irr_class.
Local Notation g i := (repr (c i)).
Local Notation iC := class_Iirr.
Definition character_table := \matrix_(i, j) 'chi[G]_i (g j).
Local Notation X := character_table.
Lemma irr_classP i : c i \in classes G.
Proof.
(* Goal: is_true (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (irr_class i) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) *)
exact: enum_valP.
Qed.
Lemma repr_irr_classK i : g i ^: G = c i.
Proof.
(* Goal: @eq (@set_of (FinGroup.finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.finType (FinGroup.base gT))))) (@class gT (@repr (FinGroup.base gT) (irr_class i)) (@gval gT G)) (irr_class i) *)
by case/repr_classesP: (irr_classP i).
Qed.
Lemma irr_classK : cancel c iC.
Proof.
(* Goal: @cancel (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) irr_class class_Iirr *)
by move=> i; rewrite /iC enum_valK_in cast_ordK.
Qed.
Lemma class_IirrK : {in classes G, cancel iC c}.
Proof.
(* Goal: @prop_in1 (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G)))) (fun x : Equality.sort (Finite.eqType (set_of_finType (FinGroup.finType (FinGroup.base gT)))) => @eq (Equality.sort (Finite.eqType (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (irr_class (class_Iirr x)) x) (inPhantom (@cancel (ordinal (S (@pred_Nirr gT (@gval gT G)))) (Equality.sort (Finite.eqType (set_of_finType (FinGroup.finType (FinGroup.base gT))))) class_Iirr irr_class)) *)
by move=> xG GxG; rewrite /c cast_ordKV enum_rankK_in.
Qed.
Lemma reindex_irr_class R idx (op : @Monoid.com_law R idx) F :
Proof.
(* Goal: @eq R (@BigOp.bigop R (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) idx (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun xG : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody R (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) xG (@Monoid.operator R idx (@Monoid.com_operator R idx op)) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) xG (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (F xG))) (@BigOp.bigop R (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) idx (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody R (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@Monoid.operator R idx (@Monoid.com_operator R idx op)) true (F (irr_class i)))) *)
rewrite (reindex c); first by apply: eq_bigl => i; apply: enum_valP.
(* Goal: @bijective_on (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (simplPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SimplPred (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun i : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) i (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))))) irr_class *)
by exists iC; [apply: in1W; apply: irr_classK | apply: class_IirrK].
Qed.
Let X' := \matrix_(i, j) (#|'C_G[g i]|%:R^-1 * ('chi[G]_j (g i))^*).
Let XX'_1: X *m X' = 1%:M.
Proof.
(* Goal: @eq (matrix (GRing.Ring.sort Algebraics.Implementation.ringType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) (@mulmx Algebraics.Implementation.ringType (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) character_table X') (@scalar_mx Algebraics.Implementation.ringType (S (@pred_Nirr gT (@gval gT G))) (GRing.one Algebraics.Implementation.ringType)) *)
apply/matrixP=> i j; rewrite !mxE -first_orthogonality_relation mulr_sumr.
(* Goal: @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun j0 : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) j0 (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_matrix (GRing.Ring.sort Algebraics.Implementation.ringType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) character_table i j0) (@fun_of_matrix (GRing.Ring.sort Algebraics.Implementation.ringType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' j0 j)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i0 : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i0 (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i0 (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) i0) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@invg (FinGroup.base gT) i0)))))) *)
rewrite sum_by_classes => [|u v Gu Gv]; last by rewrite -conjVg !cfunJ.
(* Goal: @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun j0 : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) j0 (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_matrix (GRing.Ring.sort Algebraics.Implementation.ringType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) character_table i j0) (@fun_of_matrix (GRing.Ring.sort Algebraics.Implementation.ringType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' j0 j)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (index_enum (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (fun xG : Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) xG (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@in_mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) xG (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base gT))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base gT))) (@classes gT (@gval gT G))))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) xG)))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@repr (FinGroup.base gT) xG)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@invg (FinGroup.base gT) (@repr (FinGroup.base gT) xG)))))))) *)
rewrite reindex_irr_class /=; apply/esym/eq_bigr=> k _.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (irr_class k))))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@repr (FinGroup.base gT) (irr_class k))) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@invg (FinGroup.base gT) (@repr (FinGroup.base gT) (irr_class k))))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_matrix Algebraics.Implementation.type (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) character_table i k) (@fun_of_matrix Algebraics.Implementation.type (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' k j)) *)
rewrite !mxE irr_inv // -/(g k) -divg_index -indexgI /=.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (irr_class k))))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@repr (FinGroup.base gT) (irr_class k))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@repr (FinGroup.base gT) (irr_class k))))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@repr (FinGroup.base gT) (irr_class k))) (@GRing.mul (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (@GRing.inv (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@indexg gT (@gval gT G) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (irr_class k))))))))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@repr (FinGroup.base gT) (irr_class k)))))) *)
rewrite (char0_natf_div Cchar) ?dvdn_indexg // index_cent1 invfM invrK.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (FinGroup.sort (FinGroup.base gT)) (predPredType (FinGroup.sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (irr_class k))))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.inv Algebraics.Implementation.unitRingType (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@repr (FinGroup.base gT) (irr_class k))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@repr (FinGroup.base gT) (irr_class k))))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@repr (FinGroup.base gT) (irr_class k))) (@GRing.mul (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (@GRing.mul (GRing.UnitRing.ringType (GRing.Field.unitRingType (Num.ClosedField.fieldType Algebraics.Implementation.numClosedFieldType))) (@GRing.inv (GRing.Field.unitRingType (Num.ClosedField.fieldType Algebraics.Implementation.numClosedFieldType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType))) (GRing.one (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT (@repr (FinGroup.base gT) (irr_class k)) (@gval gT G))))))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@repr (FinGroup.base gT) (irr_class k)))))) *)
by rewrite repr_irr_classK mulrCA mulrA mulrCA.
Qed.
Lemma character_table_unit : X \in unitmx.
Proof.
(* Goal: is_true (@in_mem (matrix Algebraics.Implementation.type (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) character_table (@mem (matrix (GRing.ComUnitRing.sort Algebraics.Implementation.comUnitRingType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) (predPredType (matrix (GRing.ComUnitRing.sort Algebraics.Implementation.comUnitRingType) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))))) (@unitmx Algebraics.Implementation.comUnitRingType (S (@pred_Nirr gT (@gval gT G)))))) *)
by case/mulmx1_unit: XX'_1.
Qed.
Let uX := character_table_unit.
Theorem second_orthogonality_relation x y :
y \in G ->
\sum_i 'chi[G]_i x * ('chi_i y)^* = #|'C_G[x]|%:R *+ (x \in y ^: G).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
move=> Gy; pose i_x := iC (x ^: G); pose i_y := iC (y ^: G).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
have [Gx | notGx] := boolP (x \in G); last first.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
rewrite (contraNF (subsetP _ x) notGx) ?class_subG ?big1 // => i _.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) *)
by rewrite cfun0 ?mul0r.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
transitivity ((#|'C_G[repr (y ^: G)]|%:R *: (X' *m X)) i_y i_x).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (@GRing.scale (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (matrix_lmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT y (@gval gT G)))))))))) (@mulmx (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' character_table)) i_y i_x) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) y))))) (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (@GRing.scale (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (matrix_lmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT y (@gval gT G)))))))))) (@mulmx (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' character_table)) i_y i_x) *)
rewrite scalemxAl !mxE; apply: eq_bigr => k _; rewrite !mxE mulrC -!mulrA.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (@GRing.scale (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (matrix_lmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT y (@gval gT G)))))))))) (@mulmx (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' character_table)) i_y i_x) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.mul (GRing.ComRing.ringType Algebraics.Implementation.comRingType) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) y)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) x)) (@GRing.mul (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT y (@gval gT G)))))))))) (@GRing.mul (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (@GRing.inv (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (irr_class i_y)))))))))) (@GRing.mul (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (@repr (FinGroup.base gT) (irr_class i_y)))) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (@repr (FinGroup.base gT) (irr_class i_x)))))) *)
by rewrite !class_IirrK ?mem_classes // !cfun_repr mulVKf ?neq0CG.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (@GRing.scale (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (matrix_lmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G)))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.finType (FinGroup.base gT)) (@repr (FinGroup.base gT) (@class gT y (@gval gT G)))))))))) (@mulmx (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) (S (@pred_Nirr gT (@gval gT G))) X' character_table)) i_y i_x) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
rewrite mulmx1C // !mxE -!divg_index !(index_cent1, =^~ indexgI).
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.mul (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT (@repr (FinGroup.base gT) (@class gT y (@gval gT G))) (@gval gT G))))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (Num.ClosedField.comUnitRingType Algebraics.Implementation.numClosedFieldType)))) (GRing.one (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (Num.ClosedField.comUnitRingType Algebraics.Implementation.numClosedFieldType)))) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i_y i_x)))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
rewrite (class_eqP (mem_repr y _)) ?class_refl // mulr_natr.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i_y i_x))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
rewrite (can_in_eq class_IirrK) ?mem_classes //.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) (nat_of_bool (@eq_op (Finite.eqType (set_of_finType (FinGroup.finType (FinGroup.base gT)))) (@class gT y (@gval gT G)) (@class gT x (@gval gT G))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
have [-> | not_yGx] := altP eqP; first by rewrite class_refl.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.ClosedField.unitRingType Algebraics.Implementation.numClosedFieldType))) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) (nat_of_bool false)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (divn (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@card (FinGroup.finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT x (@gval gT G))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@class gT y (@gval gT G))))))) *)
by rewrite [x \in _](contraNF _ not_yGx) // => /class_eqP->.
Qed.
Lemma eq_irr_mem_classP x y :
y \in G -> reflect (forall i, 'chi[G]_i x = 'chi_i y) (x \in y ^: G).
Lemma card_afix_irr_classes (ito : action A (Iirr G)) (cto : action A _) a :
a \in A -> [acts A, on classes G | cto] ->
(forall i x y, x \in G -> y \in cto (x ^: G) a ->
'chi_i x = 'chi_(ito i a) y) ->
#|'Fix_ito[a]| = #|'Fix_(classes G | cto)[a]|.
End OrthogonalityRelations.
Prenex Implicits irr_class class_Iirr irr_classK.
Arguments class_IirrK {gT G%G} [xG%g] GxG : rename.
Arguments character_table {gT} G%g.
Section InnerProduct.
Variable (gT : finGroupType) (G : {group gT}).
Lemma cfdot_irr i j : '['chi_i, 'chi_j]_G = (i == j)%:R.
Lemma cfnorm_irr i : '['chi[G]_i] = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) *)
by rewrite cfdot_irr eqxx.
Qed.
Lemma irr_orthonormal : orthonormal (irr G).
Proof.
(* Goal: is_true (@orthonormal gT (@gval gT G) (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)))) *)
apply/orthonormalP; split; first exact: free_uniq (irr_free G).
(* Goal: @prop_in2 (Equality.sort (@cfun_eqType gT (@gval gT G))) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (seq_predType (@cfun_eqType gT (@gval gT G))) (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)))) (fun phi psi : @classfun gT (@gval gT G) => @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi psi) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@eq_op (@cfun_eqType gT (@gval gT G)) phi psi)))) (inPhantom (forall phi psi : @classfun gT (@gval gT G), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi psi) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@eq_op (@cfun_eqType gT (@gval gT G)) phi psi))))) *)
move=> _ _ /irrP[i ->] /irrP[j ->].
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@eq_op (@cfun_eqType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)))) *)
by rewrite cfdot_irr (inj_eq irr_inj).
Qed.
Lemma coord_cfdot phi i : coord (irr G) i phi = '[phi, 'chi_i].
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType)) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
rewrite {2}(coord_basis (irr_basis G) (memvf phi)).
(* Goal: @eq (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType)) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@cfdot gT (@gval gT G) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) true (@GRing.scale (GRing.Field.ringType Algebraics.Implementation.fieldType) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G)))) (@tval (S (@pred_Nirr gT (@gval gT G))) (@Vector.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G))) (@irr gT (@gval gT G))) (@nat_of_ord (S (@pred_Nirr gT (@gval gT G))) i))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
rewrite cfdot_suml (bigD1 i) // cfdotZl /= -tnth_nth cfdot_irr eqxx mulr1.
(* Goal: @eq Algebraics.Implementation.type (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i0 : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i0 (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (negb (@eq_op (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i0 i)) (@cfdot gT (@gval gT G) (@GRing.scale (GRing.Field.ringType Algebraics.Implementation.fieldType) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant Algebraics.Implementation.type) (@cfun_vectType gT (@gval gT G))) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i0 phi) (@nth (@classfun gT (@gval gT G)) (GRing.zero (@Vector.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant Algebraics.Implementation.type) (@cfun_vectType gT (@gval gT G)))) (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))) (@nat_of_ord (S (@pred_Nirr gT (@gval gT G))) i0))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
rewrite big1 ?addr0 // => j neq_ji; rewrite cfdotZl /= -tnth_nth cfdot_irr.
(* Goal: @eq Algebraics.Implementation.type (@GRing.mul Algebraics.Implementation.ringType (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) j phi) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) j i)))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *)
by rewrite (negbTE neq_ji) mulr0.
Qed.
Lemma cfun_sum_cfdot phi : phi = \sum_i '[phi, 'chi_i]_G *: 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) phi (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
rewrite {1}(coord_basis (irr_basis G) (memvf phi)).
(* Goal: @eq (@classfun gT (@gval gT G)) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.base (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.Lmodule.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G)))) (@GRing.Lmodule.class (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))))))) true (@GRing.scale (GRing.Field.ringType Algebraics.Implementation.fieldType) (@Vector.lmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@cfun_vectType gT (@gval gT G))) (@coord Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (S (@pred_Nirr gT (@gval gT G))) (@irr gT (@gval gT G)) i phi) (@nth (GRing.Zmodule.sort (@Vector.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G)))) (GRing.zero (@Vector.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G)))) (@tval (S (@pred_Nirr gT (@gval gT G))) (@Vector.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G))) (@irr gT (@gval gT G))) (@nat_of_ord (S (@pred_Nirr gT (@gval gT G))) i))))) (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) true (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
by apply: eq_bigr => i _; rewrite coord_cfdot -tnth_nth.
Qed.
Lemma cfdot_sum_irr phi psi :
'[phi, psi]_G = \sum_i '[phi, 'chi_i] * '[psi, 'chi_i]^*.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi psi) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) true (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@cfdot gT (@gval gT G) psi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) *)
rewrite {1}[phi]cfun_sum_cfdot cfdot_suml; apply: eq_bigr => i _.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) psi) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@cfdot gT (@gval gT G) psi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
by rewrite cfdotZl -cfdotC.
Qed.
Lemma Cnat_cfdot_char_irr i phi :
phi \is a character -> '[phi, 'chi_i]_G \in Cnat.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by move/forallP/(_ i); rewrite coord_cfdot.
Qed.
Lemma cfdot_char_r phi chi :
chi \is a character -> '[phi, chi]_G = \sum_i '[phi, 'chi_i] * '[chi, 'chi_i].
Lemma Cnat_cfdot_char chi xi :
chi \is a character -> xi \is a character -> '[chi, xi]_G \in Cnat.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))), is_true (@in_mem (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi xi) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
move=> Nchi Nxi; rewrite cfdot_char_r ?rpred_sum // => i _.
(* Goal: is_true (@in_mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@cfdot gT (@gval gT G) xi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@mem (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (predPredType (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)))) (@unkey_pred (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) Cnat (@GRing.Pred.add_key (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) Cnat Cnat_addrPred) Cnat_keyed))) *)
by rewrite rpredM ?Cnat_cfdot_char_irr.
Qed.
Lemma cfdotC_char chi xi :
chi \is a character-> xi \is a character -> '[chi, xi]_G = '[xi, chi].
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi xi) (@cfdot gT (@gval gT G) xi chi) *)
by move=> Nchi Nxi; rewrite cfdotC conj_Cnat ?Cnat_cfdot_char.
Qed.
Lemma irrEchar chi : (chi \in irr G) = (chi \is a character) && ('[chi] == 1).
Proof.
(* Goal: @eq bool (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (andb (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi chi) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)))) *)
apply/irrP/andP=> [[i ->] | [Nchi]]; first by rewrite irr_char cfnorm_irr.
(* Goal: forall _ : is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi chi) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
rewrite cfdot_sum_irr => /eqP/Cnat_sum_eq1[i _| i [_ ci1 cj0]].
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
(* Goal: is_true (@in_mem Algebraics.Implementation.type (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite rpredM // ?conj_Cnat ?Cnat_cfdot_char_irr.
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @eq (@classfun gT (@gval gT G)) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
exists i; rewrite [chi]cfun_sum_cfdot (bigD1 i) //=.
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G)))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@BigOp.bigop (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i0 : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i0 (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (negb (@eq_op (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i0 i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i0)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i0))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) *)
rewrite -(@normr_idP _ _ (@Cnat_ge0 _ (Cnat_cfdot_char_irr i Nchi))).
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G)))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@Num.Def.normr Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@BigOp.bigop (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i0 : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i0 (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (negb (@eq_op (Finite.eqType (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i0 i)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i0)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i0))))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) *)
rewrite normC_def {}ci1 sqrtC1 scale1r big1 ?addr0 // => j neq_ji.
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) *)
by rewrite (('[_] =P 0) _) ?scale0r // -normr_eq0 normC_def cj0 ?sqrtC0.
Qed.
Lemma irrWchar chi : chi \in irr G -> chi \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))), is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
by rewrite irrEchar => /andP[].
Qed.
Lemma irrWnorm chi : chi \in irr G -> '[chi] = 1.
Proof.
(* Goal: forall _ : is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT G))) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi chi) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) *)
by rewrite irrEchar => /andP[_ /eqP].
Qed.
Lemma mul_lin_irr xi chi :
xi \is a linear_char -> chi \in irr G -> xi * chi \in irr G.
Lemma eq_scaled_irr a b i j :
(a *: 'chi[G]_i == b *: 'chi_j) = (a == b) && ((a == 0) || (i == j)).
Lemma eq_signed_irr (s t : bool) i j :
((-1) ^+ s *: 'chi[G]_i == (-1) ^+ t *: 'chi_j) = (s == t) && (i == j).
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.exp Algebraics.Implementation.ringType (@GRing.opp (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) (nat_of_bool s)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.exp Algebraics.Implementation.ringType (@GRing.opp (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType)) (nat_of_bool t)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j))) (andb (@eq_op bool_eqType s t) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j)) *)
by rewrite eq_scaled_irr signr_eq0 (inj_eq signr_inj).
Qed.
Lemma eq_scale_irr a (i j : Iirr G) :
(a *: 'chi_i == a *: 'chi_j) = (a == 0) || (i == j).
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) a (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) a (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j))) (orb (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) a (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j)) *)
by rewrite eq_scaled_irr eqxx.
Qed.
Lemma eq_addZ_irr a b (i j r t : Iirr G) :
(a *: 'chi_i + b *: 'chi_j == a *: 'chi_r + b *: 'chi_t)
= [|| [&& (a == 0) || (i == r) & (b == 0) || (j == t)],
[&& i == t, j == r & a == b] | [&& i == j, r == t & a == - b]].
Lemma eq_subZnat_irr (a b : nat) (i j r t : Iirr G) :
(a%:R *: 'chi_i - b%:R *: 'chi_j == a%:R *: 'chi_r - b%:R *: 'chi_t)
= [|| a == 0%N | i == r] && [|| b == 0%N | j == t]
|| [&& i == j, r == t & a == b].
Proof.
(* Goal: @eq bool (@eq_op (GRing.Zmodule.eqType (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G)))))) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) a) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.opp (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) b) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)))) (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) a) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) r)) (@GRing.opp (@GRing.Zmodule.Pack (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base Algebraics.Implementation.ringType (@GRing.Lmodule.sort Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lmodType gT (@gval gT G))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT G)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) b) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) t))))) (orb (andb (orb (@eq_op nat_eqType a O) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i r)) (orb (@eq_op nat_eqType b O) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) j t))) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) r t) (@eq_op nat_eqType a b)))) *)
rewrite -!scaleNr eq_addZ_irr oppr_eq0 opprK -addr_eq0 -natrD eqr_nat.
(* Goal: @eq bool (orb (andb (orb (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) a) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i r)) (orb (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) b) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) j t))) (orb (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i t) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) j r) (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (addn a b)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))))) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) r t) (@eq_op nat_eqType a b))))) (orb (andb (orb (@eq_op nat_eqType a O) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i r)) (orb (@eq_op nat_eqType b O) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) j t))) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) r t) (@eq_op nat_eqType a b)))) *)
by rewrite !pnatr_eq0 addn_eq0; case: a b => [|a] [|b]; rewrite ?andbF.
Qed.
End InnerProduct.
Section IrrConstt.
Variable (gT : finGroupType) (G H : {group gT}).
Lemma char1_ge_norm (chi : 'CF(G)) x :
chi \is a character -> `|chi x| <= chi 1%g.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) chi x)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))) *)
case/char_reprP=> rG ->; case Gx: (x \in G); last first.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) x)) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT)))) *)
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) x)) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT)))) *)
by rewrite cfunE cfRepr1 Gx normr0 ler0n.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) x)) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT)))) *)
by have [e [_ _ []]] := repr_rsim_diag rG Gx.
Qed.
Lemma max_cfRepr_norm_scalar n (rG : mx_representation algCF G n) x :
x \in G -> `|cfRepr rG x| = cfRepr rG 1%g ->
exists2 c, `|c| = 1 & rG x = c%:M.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) x)) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) (oneg (FinGroup.base gT)))), @ex2 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType c) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG x) (@scalar_mx (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) n c)) *)
move=> Gx; have [e [[B uB def_x] [_ e1] [-> _] _]] := repr_rsim_diag rG Gx.
(* Goal: forall _ : @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) true (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (S O) n e (GRing.zero (Zp_zmodType O)) i)))) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n rG) (oneg (FinGroup.base gT))), @ex2 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType c) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG x) (@scalar_mx (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) n c)) *)
rewrite cfRepr1 -[n in n%:R]card_ord -sumr_const -(eq_bigr _ (in1W e1)).
(* Goal: forall _ : @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType n)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (index_enum (ordinal_finType n)) (fun i : Finite.sort (ordinal_finType n) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType n)) i (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) true (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (S O) n e (GRing.zero (Zp_zmodType O)) i)))) (@BigOp.bigop (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (ordinal n) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType n)) (fun i : ordinal n => @BigBody (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (ordinal n) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (ordinal n) i (@mem (ordinal n) (predPredType (ordinal n)) (@sort_of_simpl_pred (ordinal n) (pred_of_argType (ordinal n))))) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (S O) n e (GRing.zero (Zp_zmodType O)) i)))), @ex2 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType c) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG x) (@scalar_mx (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) n c)) *)
case/normC_sum_eq1=> [i _ | c /eqP norm_c_1 def_e]; first by rewrite e1.
(* Goal: @ex2 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType c) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG x) (@scalar_mx (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) n c)) *)
have{def_e} def_e: e = const_mx c by apply/rowP=> i; rewrite mxE def_e ?andbT.
(* Goal: @ex2 (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (Num.NumDomain.sort Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType c) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (fun c : Num.NumDomain.sort Algebraics.Implementation.numDomainType => @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG x) (@scalar_mx (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) n c)) *)
by exists c => //; rewrite def_x def_e diag_const_mx scalar_mxC mulmxKV.
Qed.
Lemma max_cfRepr_mx1 n (rG : mx_representation algCF G n) x :
x \in G -> cfRepr rG x = cfRepr rG 1%g -> rG x = 1%:M.
Definition irr_constt (B : {set gT}) phi := [pred i | '[phi, 'chi_i]_B != 0].
Lemma irr_consttE i phi : (i \in irr_constt phi) = ('[phi, 'chi_i]_G != 0).
Proof.
(* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) phi))) (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))) *)
by [].
Qed.
Lemma constt_charP (i : Iirr G) chi :
chi \is a character ->
reflect (exists2 chi', chi' \is a character & chi = 'chi_i + chi')
(i \in irr_constt chi).
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), Bool.reflect (@ex2 (@classfun gT (@gval gT G)) (fun chi' : @classfun gT (@gval gT G) => is_true (@in_mem (@classfun gT (@gval gT G)) chi' (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (fun chi' : @classfun gT (@gval gT G) => @eq (@classfun gT (@gval gT G)) chi (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) chi'))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) chi))) *)
move=> Nchi; apply: (iffP idP) => [i_in_chi| [chi' Nchi' ->]]; last first.
(* Goal: @ex2 (@classfun gT (@gval gT G)) (fun chi' : @classfun gT (@gval gT G) => is_true (@in_mem (@classfun gT (@gval gT G)) chi' (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (fun chi' : @classfun gT (@gval gT G) => @eq (@classfun gT (@gval gT G)) chi (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) chi')) *)
(* Goal: is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) chi')))) *)
rewrite inE /= cfdotDl cfdot_irr eqxx -(eqP (Cnat_cfdot_char_irr i Nchi')).
(* Goal: @ex2 (@classfun gT (@gval gT G)) (fun chi' : @classfun gT (@gval gT G) => is_true (@in_mem (@classfun gT (@gval gT G)) chi' (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (fun chi' : @classfun gT (@gval gT G) => @eq (@classfun gT (@gval gT G)) chi (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) chi')) *)
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool true)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (truncC (@cfdot gT (@gval gT G) chi' (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))) *)
by rewrite -natrD pnatr_eq0.
(* Goal: @ex2 (@classfun gT (@gval gT G)) (fun chi' : @classfun gT (@gval gT G) => is_true (@in_mem (@classfun gT (@gval gT G)) chi' (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (fun chi' : @classfun gT (@gval gT G) => @eq (@classfun gT (@gval gT G)) chi (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) chi')) *)
exists (chi - 'chi_i); last by rewrite addrC subrK.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@GRing.add (@cfun_zmodType gT (@gval gT G)) chi (@GRing.opp (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
apply/forallP=> j; rewrite coord_cfdot cfdotBl cfdot_irr.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType)) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i j))))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
have [<- | _] := eqP; last by rewrite subr0 Cnat_cfdot_char_irr.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType)) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool true)))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
have := i_in_chi; rewrite inE /= -(eqP (Cnat_cfdot_char_irr i Nchi)) pnatr_eq0.
(* Goal: forall _ : is_true (negb (@eq_op nat_eqType (truncC (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) O)), is_true (@in_mem Algebraics.Implementation.type (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (truncC (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@GRing.opp (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (S O)))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by case: (truncC _) => // n _; rewrite mulrSr addrK ?isNatC_nat.
Qed.
Lemma cfun_sum_constt (phi : 'CF(G)) :
phi = \sum_(i in irr_constt phi) '[phi, 'chi_i] *: 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) phi (@BigOp.bigop (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (@GRing.Zmodule.Pack (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.base (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.Lmodule.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G))) (@GRing.Lmodule.class (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (Phant (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfun_lmodType gT (@gval gT G)))))) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) phi))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
rewrite {1}[phi]cfun_sum_cfdot (bigID [pred i | '[phi, 'chi_i] == 0]) /=.
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G)))) (@BigOp.bigop (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@BigOp.bigop (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@classfun gT (@gval gT G)) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (@GRing.Zmodule.Pack (@classfun gT (@gval gT G)) (@GRing.Zmodule.Class (@classfun gT (@gval gT G)) (@Choice.Class (@classfun gT (@gval gT G)) (@cfun_eqMixin gT (@gval gT G)) (@cfun_choiceMixin gT (@gval gT G))) (@cfun_zmodMixin gT (@gval gT G))))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) phi))) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
by rewrite big1 ?add0r // => i /eqP->; rewrite scale0r.
Qed.
Lemma neq0_has_constt (phi : 'CF(G)) :
phi != 0 -> exists i, i \in irr_constt phi.
Proof.
(* Goal: forall _ : is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) phi (GRing.zero (@cfun_zmodType gT (@gval gT G))))), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) phi)))) *)
move=> nz_phi; apply/existsP; apply: contra nz_phi => /pred0P phi0.
(* Goal: is_true (@eq_op (@cfun_eqType gT (@gval gT G)) phi (GRing.zero (@cfun_zmodType gT (@gval gT G)))) *)
by rewrite [phi]cfun_sum_constt big_pred0.
Qed.
Lemma constt_irr i : irr_constt 'chi[G]_i =i pred1 i.
Proof.
(* Goal: @eq_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (simplPredType (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))))) (@pred1 (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i)) *)
by move=> j; rewrite !inE cfdot_irr pnatr_eq0 (eq_sym j); case: (i == j).
Qed.
Lemma char1_ge_constt (i : Iirr G) chi :
chi \is a character -> i \in irr_constt chi -> 'chi_i 1%g <= chi 1%g.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) chi)))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))) *)
move=> {chi} _ /constt_charP[// | chi Nchi ->].
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (@fun_of_cfun gT (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) chi) (oneg (FinGroup.base gT)))) *)
by rewrite cfunE addrC -subr_ge0 addrK char1_ge0.
Qed.
Lemma constt_ortho_char (phi psi : 'CF(G)) i j :
phi \is a character -> psi \is a character ->
i \in irr_constt phi -> j \in irr_constt psi ->
'[phi, psi] = 0 -> '['chi_i, 'chi_j] = 0.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) psi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) phi)))) (_ : is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) j (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt (@gval gT G) psi)))) (_ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi psi) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *)
move=> _ _ /constt_charP[//|phi1 Nphi1 ->] /constt_charP[//|psi1 Npsi1 ->].
(* Goal: forall _ : @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) phi1) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) psi1)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *)
rewrite cfdot_irr; case: eqP => // -> /eqP/idPn[].
(* Goal: is_true (negb (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) phi1) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) psi1)) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))))) *)
rewrite cfdotDl !cfdotDr cfnorm_irr -addrA gtr_eqF ?ltr_paddr ?ltr01 //.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) psi1) (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) phi1 (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@cfdot gT (@gval gT G) phi1 psi1)))) *)
by rewrite Cnat_ge0 ?rpredD ?Cnat_cfdot_char ?irr_char.
Qed.
End IrrConstt.
Arguments irr_constt {gT B%g} phi%CF.
Section Kernel.
Variable (gT : finGroupType) (G : {group gT}).
Implicit Types (phi chi xi : 'CF(G)) (H : {group gT}).
Lemma cfker_repr n (rG : mx_representation algCF G n) :
cfker (cfRepr rG) = rker rG.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@cfRepr gT G n rG)) (@rker (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G n rG) *)
apply/esym/setP=> x; rewrite inE mul1mx /=.
(* Goal: @eq bool (andb (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG x) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@cfRepr gT G n rG))))) *)
case Gx: (x \in G); last by rewrite inE Gx.
(* Goal: @eq bool (andb true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) n n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) n rG x) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) n (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))))))) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@cfRepr gT G n rG))))) *)
apply/eqP/idP=> Kx; last by rewrite max_cfRepr_mx1 // cfker1.
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) x (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@cfRepr gT G n rG))))) *)
rewrite inE Gx; apply/forallP=> y; rewrite !cfunE !mulrb groupMl //.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (if @in_mem (FinGroup.arg_sort (FinGroup.base gT)) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) then @mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG (@mulg (FinGroup.base gT) x y)) else GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (if @in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) then @mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n rG y) else GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) *)
by case: ifP => // Gy; rewrite repr_mxM // Kx mul1mx.
Qed.
Lemma cfkerEchar chi :
chi \is a character -> cfker chi = [set x in G | chi x == chi 1%g].
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) chi) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) chi x) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))))) *)
move=> Nchi; apply/setP=> x; apply/idP/setIdP=> [Kx | [Gx /eqP chi_x]].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi)))) *)
(* Goal: and (is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) chi x) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))))) *)
by rewrite (subsetP (cfker_sub chi)) // cfker1.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi)))) *)
case/char_reprP: Nchi => rG -> in chi_x *; rewrite inE Gx; apply/forallP=> y.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (@mulg (FinGroup.base gT) x y)) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) y)) *)
rewrite !cfunE groupMl // !mulrb; case: ifP => // Gy.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mulg (FinGroup.base gT) x y))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) y))) *)
by rewrite repr_mxM // max_cfRepr_mx1 ?mul1mx.
Qed.
Lemma cfker_nzcharE chi :
chi \is a character -> chi != 0 -> cfker chi = [set x | chi x == chi 1%g].
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) chi (GRing.zero (@cfun_zmodType gT (@gval gT G)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) chi) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) chi x) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))))) *)
move=> Nchi nzchi; apply/setP=> x; rewrite cfkerEchar // !inE andb_idl //.
(* Goal: forall _ : is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) chi x) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))), is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by apply: contraLR => /cfun0-> //; rewrite eq_sym char1_eq0.
Qed.
Lemma cfkerEirr i : cfker 'chi[G]_i = [set x | 'chi_i x == 'chi_i 1%g].
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))))) *)
by rewrite cfker_nzcharE ?irr_char ?irr_neq0.
Qed.
Lemma cfker_irr0 : cfker 'chi[G]_0 = G.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))))) (@gval gT G) *)
by rewrite irr0 cfker_cfun1.
Qed.
Lemma cfaithful_reg : cfaithful (cfReg G).
Proof.
(* Goal: is_true (@cfaithful gT (@gval gT G) (@cfReg gT (@gval gT G))) *)
apply/subsetP=> x; rewrite cfkerEchar ?cfReg_char // !inE !cfRegE eqxx.
(* Goal: forall _ : is_true (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op Algebraics.Implementation.eqType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base gT)) x (oneg (FinGroup.base gT))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (nat_of_bool true)))), is_true (@eq_op (Finite.eqType (FinGroup.finType (FinGroup.base gT))) x (oneg (FinGroup.base gT))) *)
by case/andP=> _; apply: contraLR => /negbTE->; rewrite eq_sym neq0CG.
Qed.
Lemma cfkerE chi :
chi \is a character ->
cfker chi = G :&: \bigcap_(i in irr_constt chi) cfker 'chi_i.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) chi) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
move=> Nchi; rewrite cfkerEchar //; apply/setP=> x; rewrite !inE.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) chi x) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))) *)
apply: andb_id2l => Gx; rewrite {1 2}[chi]cfun_sum_constt !sum_cfunE.
(* Goal: @eq bool (@eq_op Algebraics.Implementation.eqType (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) x))) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT)))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) *)
apply/eqP/bigcapP=> [Kx i Ci | Kx]; last first.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
(* Goal: @eq (Equality.sort Algebraics.Implementation.eqType) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) x))) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi))) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT))))) *)
by apply: eq_bigr => i /Kx Kx_i; rewrite !cfunE cfker1.
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
rewrite cfkerEirr inE /= -(inj_eq (mulfI Ci)).
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType)) (@GRing.mul (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) (@GRing.mul (GRing.IntegralDomain.ringType Algebraics.Implementation.idomainType) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))))) *)
have:= (normC_sum_upper _ Kx) i; rewrite !cfunE => -> // {i Ci} i _.
(* Goal: is_true (@Num.Def.ler (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@Num.Def.normr (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) x)) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT)))) *)
have chi_i_ge0: 0 <= '[chi, 'chi_i].
(* Goal: is_true (@Num.Def.ler (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@Num.Def.normr (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) x)) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT)))) *)
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
by rewrite Cnat_ge0 ?Cnat_cfdot_char_irr.
(* Goal: is_true (@Num.Def.ler (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@Num.Def.normr (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) x)) (@fun_of_cfun gT (@gval gT G) (@GRing.scale (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@cfun_lmodType gT (@gval gT G)) (@cfdot gT (@gval gT G) chi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (FinGroup.base gT)))) *)
by rewrite !cfunE normrM (normr_idP _) ?ler_wpmul2l ?char1_ge_norm ?irr_char.
Qed.
Lemma TI_cfker_irr : \bigcap_i cfker 'chi[G]_i = [1].
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.finType (FinGroup.base gT)) (Phant (FinGroup.sort (FinGroup.base gT)))) *)
apply/trivgP; apply: subset_trans cfaithful_reg; rewrite cfkerE ?cfReg_char //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@bigcap_group gT (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (fun _ : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => true) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) (@cfReg gT (@gval gT G))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))) *)
rewrite subsetI (bigcap_min 0) //=; last by rewrite cfker_irr0.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) (@cfReg gT (@gval gT G))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) *)
by apply/bigcapsP=> i _; rewrite bigcap_inf.
Qed.
Lemma cfker_constt i chi :
chi \is a character -> i \in irr_constt chi ->
cfker chi \subset cfker 'chi[G]_i.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) chi)))), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
by move=> Nchi Ci; rewrite cfkerE ?subIset ?(bigcap_min i) ?orbT.
Qed.
Lemma lin_char_der1 : G^`(1)%g \subset cfker xi.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) xi)))) *)
rewrite gen_subG /=; apply/subsetP=> _ /imset2P[x y Gx Gy ->].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@commg gT x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) xi)))) *)
rewrite cfkerEchar // inE groupR //= !lin_charM ?lin_charV ?in_group //.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@GRing.mul Algebraics.Implementation.ringType (@GRing.inv Algebraics.Implementation.unitRingType (@fun_of_cfun gT (@gval gT G) xi x)) (@GRing.mul Algebraics.Implementation.ringType (@GRing.inv Algebraics.Implementation.unitRingType (@fun_of_cfun gT (@gval gT G) xi y)) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) xi x) (@fun_of_cfun gT (@gval gT G) xi y)))) (@fun_of_cfun gT (@gval gT G) xi (oneg (FinGroup.base gT)))) *)
by rewrite mulrCA mulKf ?mulVf ?lin_char_neq0 // lin_char1.
Qed.
Lemma cforder_lin_char : #[xi]%CF = exponent (G / cfker xi)%g.
Proof.
(* Goal: @eq nat (@cforder gT (@gval gT G) xi) (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi))) *)
apply/eqP; rewrite eqn_dvd; apply/andP; split.
(* Goal: is_true (dvdn (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi))) (@cforder gT (@gval gT G) xi)) *)
(* Goal: is_true (dvdn (@cforder gT (@gval gT G) xi) (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi)))) *)
apply/dvdn_cforderP=> x Gx; rewrite -lin_charX // -cfQuoEker ?groupX //.
(* Goal: is_true (dvdn (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi))) (@cforder gT (@gval gT G) xi)) *)
(* Goal: @eq (GRing.Ring.sort Algebraics.Implementation.ringType) (@fun_of_cfun (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi)) (@cfQuo gT G (@cfker gT (@gval gT G) xi) xi) (@coset gT (@cfker gT (@gval gT G) xi) (@expgn (FinGroup.base gT) x (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi)))))) (GRing.one Algebraics.Implementation.ringType) *)
rewrite morphX ?(subsetP (cfker_norm xi)) //= expg_exponent ?mem_quotient //.
(* Goal: is_true (dvdn (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi))) (@cforder gT (@gval gT G) xi)) *)
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi)) (@cfQuo gT G (@cfker gT (@gval gT G) xi) xi) (oneg (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) xi))))) (GRing.one Algebraics.Implementation.ringType) *)
by rewrite cfQuo1 ?cfker_normal ?lin_char1.
(* Goal: is_true (dvdn (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi))) (@cforder gT (@gval gT G) xi)) *)
have abGbar: abelian (G / cfker xi) := sub_der1_abelian lin_char_der1.
(* Goal: is_true (dvdn (@exponent (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) xi))) (@cforder gT (@gval gT G) xi)) *)
have [_ /morphimP[x Nx Gx ->] ->] := exponent_witness (abelian_nil abGbar).
(* Goal: is_true (dvdn (@order (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@mfun gT (@coset_groupType gT (@cfker gT (@gval gT G) xi)) (@normaliser gT (@cfker gT (@gval gT G) xi)) (@coset_morphism gT (@cfker gT (@gval gT G) xi)) x)) (@cforder gT (@gval gT G) xi)) *)
rewrite order_dvdn -morphX //= coset_id cfkerEchar // !inE groupX //=.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) xi (@expgn (FinGroup.base gT) x (@cforder gT (@gval gT G) xi))) (@fun_of_cfun gT (@gval gT G) xi (oneg (FinGroup.base gT)))) *)
by rewrite lin_charX ?lin_char1 // (dvdn_cforderP _ _ _).
Qed.
Lemma cforder_lin_char_dvdG : #[xi]%CF %| #|G|.
Proof.
(* Goal: is_true (dvdn (@cforder gT (@gval gT G) xi) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
by rewrite cforder_lin_char (dvdn_trans (exponent_dvdn _)) ?dvdn_morphim.
Qed.
Lemma cforder_lin_char_gt0 : (0 < #[xi]%CF)%N.
Proof.
(* Goal: is_true (leq (S O) (@cforder gT (@gval gT G) xi)) *)
by rewrite cforder_lin_char exponent_gt0.
Qed.
End KerLin.
End Kernel.
Section Restrict.
Variable (gT : finGroupType) (G H : {group gT}).
Lemma cfRepr_sub n (rG : mx_representation algCF G n) (sHG : H \subset G) :
cfRepr (subg_repr rG sHG) = 'Res[H] (cfRepr rG).
Proof.
(* Goal: @eq (@classfun gT (@gval gT H)) (@cfRepr gT H n (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G H n rG sHG)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfRepr gT G n rG)) *)
by apply/cfun_inP => x Hx; rewrite cfResE // !cfunE Hx (subsetP sHG).
Qed.
Lemma cfRes_char chi : chi \is a character -> 'Res[H, G] chi \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) chi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
have [sHG | not_sHG] := boolP (H \subset G).
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) chi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) chi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
by case/char_reprP=> rG ->; rewrite -(cfRepr_sub rG sHG) cfRepr_char.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) chi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
by move/Cnat_char1=> Nchi1; rewrite cfResEout // rpredZ_Cnat ?rpred1.
Qed.
Lemma cfRes_eq0 phi : phi \is a character -> ('Res[H, G] phi == 0) = (phi == 0).
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq bool (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) phi) (GRing.zero (@cfun_zmodType gT (@gval gT H)))) (@eq_op (@cfun_eqType gT (@gval gT G)) phi (GRing.zero (@cfun_zmodType gT (@gval gT G)))) *)
by move=> Nchi; rewrite -!char1_eq0 ?cfRes_char // cfRes1.
Qed.
Lemma cfRes_lin_char chi :
chi \is a linear_char -> 'Res[H, G] chi \is a linear_char.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) chi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@linear_char gT (@gval gT H))))) *)
by case/andP=> Nchi; rewrite qualifE cfRes_char ?cfRes1.
Qed.
Lemma Res_irr_neq0 i : 'Res[H, G] 'chi_i != 0.
Proof.
(* Goal: is_true (negb (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (GRing.zero (@cfun_zmodType gT (@gval gT H))))) *)
by rewrite cfRes_eq0 ?irr_neq0 ?irr_char.
Qed.
Lemma cfRes_lin_lin (chi : 'CF(G)) :
chi \is a character -> 'Res[H] chi \is a linear_char -> chi \is a linear_char.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) chi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@linear_char gT (@gval gT H)))))), is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by rewrite !qualifE cfRes1 => -> /andP[].
Qed.
Lemma cfRes_irr_irr chi :
chi \is a character -> 'Res[H] chi \in irr H -> chi \in irr G.
Definition Res_Iirr (A B : {set gT}) i := cfIirr ('Res[B, A] 'chi_i).
Lemma Res_Iirr0 : Res_Iirr H (0 : Iirr G) = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT H)))) (@Res_Iirr (@gval gT G) (@gval gT H) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))) : ordinal (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) *)
by rewrite /Res_Iirr irr0 rmorph1 -irr0 irrK.
Qed.
Lemma lin_Res_IirrE i : 'chi[G]_i 1%g = 1 -> 'chi_(Res_Iirr H i) = 'Res 'chi_i.
Proof.
(* Goal: forall _ : @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType), @eq (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) (@Res_Iirr (@gval gT G) (@gval gT H) i)) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
move=> chi1; rewrite cfIirrE ?lin_char_irr ?cfRes_lin_char //.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by rewrite qualifE irr_char /= chi1.
Qed.
End Restrict.
Arguments Res_Iirr {gT A%g} B%g i%R.
Section MoreConstt.
Variables (gT : finGroupType) (G H : {group gT}).
Lemma constt_Ind_Res i j :
i \in irr_constt ('Ind[G] 'chi_j) = (j \in irr_constt ('Res[H] 'chi_i)).
Proof.
(* Goal: @eq bool (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j))))) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) j (@mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@irr_constt gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
by rewrite !irr_consttE cfdotC conjC_eq0 -cfdot_Res_l.
Qed.
Lemma cfdot_Res_ge_constt i j psi :
psi \is a character -> j \in irr_constt psi ->
'['Res[H, G] 'chi_j, 'chi_i] <= '['Res[H] psi, 'chi_i].
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) psi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) j (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psi)))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))) *)
move=> {psi} _ /constt_charP[// | psi Npsi ->].
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) psi)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))) *)
rewrite linearD cfdotDl addrC -subr_ge0 addrK Cnat_ge0 //=.
(* Goal: is_true (@in_mem Algebraics.Implementation.type (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite Cnat_cfdot_char_irr // cfRes_char.
Qed.
Lemma constt_Res_trans j psi :
psi \is a character -> j \in irr_constt psi ->
{subset irr_constt ('Res[H, G] 'chi_j) <= irr_constt ('Res[H] psi)}.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) psi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) j (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) psi)))), @sub_mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@irr_constt gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@irr_constt gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi))) *)
move=> Npsi Cj i; apply: contraNneq; rewrite eqr_le => {1}<-.
(* Goal: is_true (andb (@Num.Def.ler Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) psi) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))) (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))) *)
rewrite cfdot_Res_ge_constt ?Cnat_ge0 ?Cnat_cfdot_char_irr //.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j)) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
by rewrite cfRes_char ?irr_char.
Qed.
End MoreConstt.
Section Morphim.
Variables (aT rT : finGroupType) (G D : {group aT}) (f : {morphism D >-> rT}).
Implicit Type chi : 'CF(f @* G).
Lemma cfRepr_morphim n (rfG : mx_representation algCF (f @* G) n) sGD :
cfRepr (morphim_repr rfG sGD) = cfMorph (cfRepr rfG).
Lemma cfMorph_char chi : chi \is a character -> cfMorph chi \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))), is_true (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G chi) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) *)
have [sGD /char_reprP[rfG ->] | outGD Nchi] := boolP (G \subset D); last first.
(* Goal: is_true (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G (@cfRepr rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG))) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) *)
(* Goal: is_true (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G chi) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) *)
by rewrite cfMorphEout // rpredZ_Cnat ?rpred1 ?Cnat_char1.
(* Goal: is_true (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G (@cfRepr rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG))) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) *)
apply/char_reprP; exists (Representation (morphim_repr rfG sGD)).
(* Goal: @eq (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G (@cfRepr rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG))) (@cfRepr aT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) aT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) aT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@morphim_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT rT G D f (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) sGD))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) aT G (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) aT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@morphim_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT rT G D f (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rfG) sGD)))) *)
by rewrite cfRepr_morphim.
Qed.
Lemma cfMorph_lin_char chi :
chi \is a linear_char -> cfMorph chi \is a linear_char.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@linear_char rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))), is_true (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G chi) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@linear_char aT (@gval aT G))))) *)
by case/andP=> Nchi; rewrite qualifE cfMorph1 cfMorph_char.
Qed.
Lemma cfMorph_charE chi :
G \subset D -> (cfMorph chi \is a character) = (chi \is a character).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq bool (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G chi) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
move=> sGD; apply/idP/idP=> [/char_reprP[[n rG] /=Dfchi] | /cfMorph_char//].
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
pose H := 'ker_G f; have kerH: H \subset rker rG.
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) H)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@rker (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT G n rG)))) *)
by rewrite -cfker_repr -Dfchi cfker_morph // setIS // ker_sub_pre.
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
have nHG: G \subset 'N(H) by rewrite normsI // (subset_trans sGD) ?ker_norm.
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
have [h injh im_h] := first_isom_loc f sGD; rewrite -/H in h injh im_h.
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
have DfG: invm injh @*^-1 (G / H) == (f @* G)%g by rewrite morphpre_invm im_h.
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
pose rfG := eqg_repr (morphpre_repr _ (quo_repr kerH nHG)) DfG.
(* Goal: is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
apply/char_reprP; exists (Representation rfG).
(* Goal: @eq (@classfun rT (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))) chi (@cfRepr rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG))) *)
apply/cfun_inP=> _ /morphimP[x Dx Gx ->]; rewrite -cfMorphE // Dfchi !cfunE Gx.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT (@gval aT G) n rG x)) (nat_of_bool true)) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) rT (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@mfun aT rT (@gval aT D) f x))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mfun aT rT (@gval aT D) f x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))))) *)
pose xH := coset H x; have GxH: xH \in (G / H)%g by apply: mem_quotient.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT (@gval aT G) n rG x)) (nat_of_bool true)) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) rT (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) n rfG)) (@mfun aT rT (@gval aT D) f x))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (@mfun aT rT (@gval aT D) f x) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G))))))) *)
suffices Dfx: f x = h xH by rewrite mem_morphim //= Dfx invmE ?quo_repr_coset.
(* Goal: @eq (FinGroup.sort (FinGroup.base rT)) (@mfun aT rT (@gval aT D) f x) (@mfun (@coset_groupType aT H) rT (@quotient aT (@gval aT G) H) h xH) *)
by apply/set1_inj; rewrite -?morphim_set1 ?im_h ?(subsetP nHG) ?sub1set.
Qed.
Lemma cfMorph_lin_charE chi :
G \subset D -> (cfMorph chi \is a linear_char) = (chi \is a linear_char).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq bool (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G chi) (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@linear_char aT (@gval aT G))))) (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@linear_char rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
by rewrite qualifE cfMorph1 => /cfMorph_charE->.
Qed.
Lemma cfMorph_irr chi :
G \subset D -> (cfMorph chi \in irr G) = (chi \in irr (f @* G)).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT D)))), @eq bool (@in_mem (@classfun aT (@gval aT G)) (@cfMorph aT rT D f G chi) (@mem (Equality.sort (@cfun_eqType aT (@gval aT G))) (tuple_predType (S (@pred_Nirr aT (@gval aT G))) (@cfun_eqType aT (@gval aT G))) (@irr aT (@gval aT G)))) (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) chi (@mem (Equality.sort (@cfun_eqType rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (tuple_predType (S (@pred_Nirr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@cfun_eqType rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@irr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))))) *)
by move=> sGD; rewrite !irrEchar cfMorph_charE // cfMorph_iso.
Qed.
Definition morph_Iirr i := cfIirr (cfMorph 'chi[f @* G]_i).
Lemma morph_Iirr0 : morph_Iirr 0 = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr aT (@gval aT G)))) (morph_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) (GRing.zero (Zp_zmodType (@pred_Nirr aT (@gval aT G)))) *)
by rewrite /morph_Iirr irr0 rmorph1 -irr0 irrK.
Qed.
Hypothesis sGD : G \subset D.
Lemma morph_IirrE i : 'chi_(morph_Iirr i) = cfMorph 'chi_i.
Proof.
(* Goal: @eq (@classfun aT (@gval aT G)) (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) (morph_Iirr i)) (@cfMorph aT rT D f G (@tnth (S (@pred_Nirr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@irr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) i)) *)
by rewrite cfIirrE ?cfMorph_irr ?mem_irr.
Qed.
Lemma morph_Iirr_inj : injective morph_Iirr.
Proof.
(* Goal: @injective (ordinal (S (@pred_Nirr aT (@gval aT G)))) (ordinal (S (@pred_Nirr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))))) morph_Iirr *)
by move=> i j eq_ij; apply/irr_inj/cfMorph_inj; rewrite // -!morph_IirrE eq_ij.
Qed.
Lemma morph_Iirr_eq0 i : (morph_Iirr i == 0) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr aT (@gval aT G)))) (morph_Iirr i) (GRing.zero (Zp_zmodType (@pred_Nirr aT (@gval aT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))))) i (GRing.zero (Zp_zmodType (@pred_Nirr rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))) *)
by rewrite -!irr_eq1 morph_IirrE cfMorph_eq1.
Qed.
End Morphim.
Section Isom.
Variables (aT rT : finGroupType) (G : {group aT}) (f : {morphism G >-> rT}).
Variables (R : {group rT}) (isoGR : isom G R f).
Implicit Type chi : 'CF(G).
Lemma cfIsom_char chi :
(cfIsom isoGR chi \is a character) = (chi \is a character).
Proof.
(* Goal: @eq bool (@in_mem (@classfun rT (@gval rT R)) (@cfIsom aT rT G f R isoGR chi) (@mem (@classfun rT (@gval rT R)) (predPredType (@classfun rT (@gval rT R))) (@has_quality (S O) (@classfun rT (@gval rT R)) (@character rT (@gval rT R))))) (@in_mem (@classfun aT (@gval aT G)) chi (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) *)
rewrite [cfIsom _]locked_withE cfMorph_charE //.
(* Goal: @eq bool (@in_mem (@classfun aT (@morphim rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) (@MorPhantom rT aT (@mfun rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))))) (@gval rT R))) (@cfRes aT (@morphim rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) (@MorPhantom rT aT (@isom_inv aT rT G R f isoGR)) (@gval rT R)) (@gval aT G) chi) (@mem (@classfun aT (@morphim rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) (@MorPhantom rT aT (@mfun rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))))) (@gval rT R))) (predPredType (@classfun aT (@morphim rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) (@MorPhantom rT aT (@mfun rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))))) (@gval rT R)))) (@has_quality (S O) (@classfun aT (@morphim rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) (@MorPhantom rT aT (@mfun rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))))) (@gval rT R))) (@character aT (@morphim rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) (@MorPhantom rT aT (@mfun rT aT (@gval rT R) (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))))) (@gval rT R)))))) (@in_mem (@classfun aT (@gval aT G)) chi (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@character aT (@gval aT G))))) *)
by rewrite (isom_im (isom_sym _)) cfRes_id.
Qed.
Lemma cfIsom_lin_char chi :
(cfIsom isoGR chi \is a linear_char) = (chi \is a linear_char).
Proof.
(* Goal: @eq bool (@in_mem (@classfun rT (@gval rT R)) (@cfIsom aT rT G f R isoGR chi) (@mem (@classfun rT (@gval rT R)) (predPredType (@classfun rT (@gval rT R))) (@has_quality (S O) (@classfun rT (@gval rT R)) (@linear_char rT (@gval rT R))))) (@in_mem (@classfun aT (@gval aT G)) chi (@mem (@classfun aT (@gval aT G)) (predPredType (@classfun aT (@gval aT G))) (@has_quality (S O) (@classfun aT (@gval aT G)) (@linear_char aT (@gval aT G))))) *)
by rewrite qualifE cfIsom_char cfIsom1.
Qed.
Lemma cfIsom_irr chi : (cfIsom isoGR chi \in irr R) = (chi \in irr G).
Proof.
(* Goal: @eq bool (@in_mem (@classfun rT (@gval rT R)) (@cfIsom aT rT G f R isoGR chi) (@mem (Equality.sort (@cfun_eqType rT (@gval rT R))) (tuple_predType (S (@pred_Nirr rT (@gval rT R))) (@cfun_eqType rT (@gval rT R))) (@irr rT (@gval rT R)))) (@in_mem (@classfun aT (@gval aT G)) chi (@mem (Equality.sort (@cfun_eqType aT (@gval aT G))) (tuple_predType (S (@pred_Nirr aT (@gval aT G))) (@cfun_eqType aT (@gval aT G))) (@irr aT (@gval aT G)))) *)
by rewrite !irrEchar cfIsom_char cfIsom_iso.
Qed.
Definition isom_Iirr i := cfIirr (cfIsom isoGR 'chi_i).
Lemma isom_IirrE i : 'chi_(isom_Iirr i) = cfIsom isoGR 'chi_i.
Proof.
(* Goal: @eq (@classfun rT (@gval rT R)) (@tnth (S (@pred_Nirr rT (@gval rT R))) (@classfun rT (@gval rT R)) (@irr rT (@gval rT R)) (isom_Iirr i)) (@cfIsom aT rT G f R isoGR (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i)) *)
by rewrite cfIirrE ?cfIsom_irr ?mem_irr.
Qed.
Lemma isom_Iirr_inj : injective isom_Iirr.
Proof.
(* Goal: @injective (ordinal (S (@pred_Nirr rT (@gval rT R)))) (ordinal (S (@pred_Nirr aT (@gval aT G)))) isom_Iirr *)
by move=> i j eqij; apply/irr_inj/(cfIsom_inj isoGR); rewrite -!isom_IirrE eqij.
Qed.
Lemma isom_Iirr_eq0 i : (isom_Iirr i == 0) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr rT (@gval rT R)))) (isom_Iirr i) (GRing.zero (Zp_zmodType (@pred_Nirr rT (@gval rT R))))) (@eq_op (ordinal_eqType (S (@pred_Nirr aT (@gval aT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr aT (@gval aT G))))) *)
by rewrite -!irr_eq1 isom_IirrE cfIsom_eq1.
Qed.
Lemma isom_Iirr0 : isom_Iirr 0 = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr rT (@gval rT R)))) (isom_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr aT (@gval aT G))))) (GRing.zero (Zp_zmodType (@pred_Nirr rT (@gval rT R)))) *)
by apply/eqP; rewrite isom_Iirr_eq0.
Qed.
End Isom.
Arguments isom_Iirr_inj {aT rT G f R} isoGR [i1 i2] : rename.
Section IsomInv.
Variables (aT rT : finGroupType) (G : {group aT}) (f : {morphism G >-> rT}).
Variables (R : {group rT}) (isoGR : isom G R f).
Lemma isom_IirrK : cancel (isom_Iirr isoGR) (isom_Iirr (isom_sym isoGR)).
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr rT (@gval rT R)))) (ordinal (S (@pred_Nirr aT (@gval aT G)))) (@isom_Iirr aT rT G f R isoGR) (@isom_Iirr rT aT R (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) G (@isom_sym aT rT G R f isoGR)) *)
by move=> i; apply: irr_inj; rewrite !isom_IirrE cfIsomK.
Qed.
Lemma isom_IirrKV : cancel (isom_Iirr (isom_sym isoGR)) (isom_Iirr isoGR).
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr aT (@gval aT G)))) (ordinal (S (@pred_Nirr rT (@gval rT R)))) (@isom_Iirr rT aT R (@restrm_morphism rT aT (@gval rT R) (@morphim aT rT (@gval aT G) f (@MorPhantom aT rT (@mfun aT rT (@gval aT G) f)) (@gval aT G)) (@isom_sub_im aT rT G R f isoGR) (@invm_morphism aT rT G f (@isom_inj aT rT G R f isoGR))) G (@isom_sym aT rT G R f isoGR)) (@isom_Iirr aT rT G f R isoGR) *)
by move=> i; apply: irr_inj; rewrite !isom_IirrE cfIsomKV.
Qed.
Lemma cfSdprod_char chi :
(cfSdprod defG chi \is a character) = (chi \is a character).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfSdprod gT G K H defG chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT H)) chi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
by rewrite unlock cfMorph_charE // cfIsom_char.
Qed.
Lemma cfSdprod_lin_char chi :
(cfSdprod defG chi \is a linear_char) = (chi \is a linear_char).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfSdprod gT G K H defG chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT H)) chi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@linear_char gT (@gval gT H))))) *)
by rewrite qualifE cfSdprod_char cfSdprod1.
Qed.
Lemma cfSdprod_irr chi : (cfSdprod defG chi \in irr G) = (chi \in irr H).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfSdprod gT G K H defG chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (@in_mem (@classfun gT (@gval gT H)) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (tuple_predType (S (@pred_Nirr gT (@gval gT H))) (@cfun_eqType gT (@gval gT H))) (@irr gT (@gval gT H)))) *)
by rewrite !irrEchar cfSdprod_char cfSdprod_iso.
Qed.
Definition sdprod_Iirr j := cfIirr (cfSdprod defG 'chi_j).
Lemma sdprod_IirrE j : 'chi_(sdprod_Iirr j) = cfSdprod defG 'chi_j.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (sdprod_Iirr j)) (@cfSdprod gT G K H defG (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) *)
by rewrite cfIirrE ?cfSdprod_irr ?mem_irr.
Qed.
Lemma sdprod_IirrK : cancel sdprod_Iirr (Res_Iirr H).
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) sdprod_Iirr (@Res_Iirr gT (@gval gT G) (@gval gT H)) *)
by move=> j; rewrite /Res_Iirr sdprod_IirrE cfSdprodK irrK.
Qed.
Lemma sdprod_Iirr_inj : injective sdprod_Iirr.
Proof.
(* Goal: @injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) sdprod_Iirr *)
exact: can_inj sdprod_IirrK.
Qed.
Lemma sdprod_Iirr_eq0 i : (sdprod_Iirr i == 0) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (sdprod_Iirr i) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT H)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))) *)
by rewrite -!irr_eq1 sdprod_IirrE cfSdprod_eq1.
Qed.
Lemma sdprod_Iirr0 : sdprod_Iirr 0 = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (sdprod_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
by apply/eqP; rewrite sdprod_Iirr_eq0.
Qed.
Lemma Res_sdprod_irr phi :
K \subset cfker phi -> phi \in irr G -> 'Res phi \in irr H.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) phi))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G))))), is_true (@in_mem (@classfun gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) phi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (tuple_predType (S (@pred_Nirr gT (@gval gT H))) (@cfun_eqType gT (@gval gT H))) (@irr gT (@gval gT H)))) *)
move=> kerK /irrP[i Dphi]; rewrite irrEchar -(cfSdprod_iso defG).
(* Goal: is_true (andb (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (@cfRes gT (@gval gT H) (@gval gT G) phi) (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@cfSdprod gT G K H defG (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfSdprod gT G K H defG (@cfRes gT (@gval gT H) (@gval gT G) phi))) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)))) *)
by rewrite cfRes_sdprodK // Dphi cfnorm_irr cfRes_char ?irr_char /=.
Qed.
Lemma sdprod_Res_IirrE i :
K \subset cfker 'chi[G]_i -> 'chi_(Res_Iirr H i) = 'Res 'chi_i.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))), @eq (@classfun gT (@gval gT H)) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) (@Res_Iirr gT (@gval gT G) (@gval gT H) i)) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
by move=> kerK; rewrite cfIirrE ?Res_sdprod_irr ?mem_irr.
Qed.
Lemma sdprod_Res_IirrK i :
K \subset cfker 'chi_i -> sdprod_Iirr (Res_Iirr H i) = i.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (sdprod_Iirr (@Res_Iirr gT (@gval gT G) (@gval gT H) i)) i *)
by move=> kerK; rewrite /sdprod_Iirr sdprod_Res_IirrE ?cfRes_sdprodK ?irrK.
Qed.
End Sdprod.
Arguments sdprod_Iirr_inj {gT K H G} defG [i1 i2] : rename.
Section DProd.
Variables (gT : finGroupType) (G K H : {group gT}).
Hypothesis KxH : K \x H = G.
Lemma cfDprodKl_abelian j : abelian H -> cancel ((cfDprod KxH)^~ 'chi_j) 'Res.
Proof.
(* Goal: forall _ : is_true (@abelian gT (@gval gT H)), @cancel (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@classfun gT (@gval gT K)) (fun x : @classfun gT (@gval gT K) => @cfDprod gT G K H KxH x (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (@cfRes gT (@gval gT K) (@gval gT G)) *)
by move=> cHH; apply: cfDprodKl; apply/lin_char1/char_abelianP.
Qed.
Lemma cfDprodKr_abelian i : abelian K -> cancel (cfDprod KxH 'chi_i) 'Res.
Proof.
(* Goal: forall _ : is_true (@abelian gT (@gval gT K)), @cancel (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@classfun gT (@gval gT H)) (@cfDprod gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i)) (@cfRes gT (@gval gT H) (@gval gT G)) *)
by move=> cKK; apply: cfDprodKr; apply/lin_char1/char_abelianP.
Qed.
Lemma cfDprodl_char phi :
(cfDprodl KxH phi \is a character) = (phi \is a character).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfDprodl gT G K H KxH phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT K)) phi (@mem (@classfun gT (@gval gT K)) (predPredType (@classfun gT (@gval gT K))) (@has_quality (S O) (@classfun gT (@gval gT K)) (@character gT (@gval gT K))))) *)
exact: cfSdprod_char.
Qed.
Lemma cfDprodr_char psi :
(cfDprodr KxH psi \is a character) = (psi \is a character).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfDprodr gT G K H KxH psi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT H)) psi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))) *)
exact: cfSdprod_char.
Qed.
Lemma cfDprod_char phi psi :
phi \is a character -> psi \is a character ->
cfDprod KxH phi psi \is a character.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT K)) phi (@mem (@classfun gT (@gval gT K)) (predPredType (@classfun gT (@gval gT K))) (@has_quality (S O) (@classfun gT (@gval gT K)) (@character gT (@gval gT K)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT H)) psi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H)))))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfDprod gT G K H KxH phi psi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
by move=> Nphi Npsi; rewrite rpredM ?cfDprodl_char ?cfDprodr_char.
Qed.
Lemma cfDprod_eq1 phi psi :
phi \is a character -> psi \is a character ->
(cfDprod KxH phi psi == 1) = (phi == 1) && (psi == 1).
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT K)) phi (@mem (@classfun gT (@gval gT K)) (predPredType (@classfun gT (@gval gT K))) (@has_quality (S O) (@classfun gT (@gval gT K)) (@character gT (@gval gT K)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT H)) psi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H)))))), @eq bool (@eq_op (GRing.Ring.eqType (@cfun_ringType gT (@gval gT G))) (@cfDprod gT G K H KxH phi psi) (GRing.one (@cfun_ringType gT (@gval gT G)))) (andb (@eq_op (@cfun_eqType gT (@gval gT K)) phi (GRing.one (@cfun_ringType gT (@gval gT K)))) (@eq_op (@cfun_eqType gT (@gval gT H)) psi (GRing.one (@cfun_ringType gT (@gval gT H))))) *)
move=> /Cnat_char1 Nphi /Cnat_char1 Npsi.
(* Goal: @eq bool (@eq_op (GRing.Ring.eqType (@cfun_ringType gT (@gval gT G))) (@cfDprod gT G K H KxH phi psi) (GRing.one (@cfun_ringType gT (@gval gT G)))) (andb (@eq_op (@cfun_eqType gT (@gval gT K)) phi (GRing.one (@cfun_ringType gT (@gval gT K)))) (@eq_op (@cfun_eqType gT (@gval gT H)) psi (GRing.one (@cfun_ringType gT (@gval gT H))))) *)
apply/eqP/andP=> [phi_psi_1 | [/eqP-> /eqP->]]; last by rewrite cfDprod_cfun1.
(* Goal: and (is_true (@eq_op (@cfun_eqType gT (@gval gT K)) phi (GRing.one (@cfun_ringType gT (@gval gT K))))) (is_true (@eq_op (@cfun_eqType gT (@gval gT H)) psi (GRing.one (@cfun_ringType gT (@gval gT H))))) *)
have /andP[/eqP phi1 /eqP psi1]: (phi 1%g == 1) && (psi 1%g == 1).
(* Goal: and (is_true (@eq_op (@cfun_eqType gT (@gval gT K)) phi (GRing.one (@cfun_ringType gT (@gval gT K))))) (is_true (@eq_op (@cfun_eqType gT (@gval gT H)) psi (GRing.one (@cfun_ringType gT (@gval gT H))))) *)
(* Goal: is_true (andb (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT K) phi (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType)) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) psi (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType))) *)
by rewrite -Cnat_mul_eq1 // -(cfDprod1 KxH) phi_psi_1 cfun11.
(* Goal: and (is_true (@eq_op (@cfun_eqType gT (@gval gT K)) phi (GRing.one (@cfun_ringType gT (@gval gT K))))) (is_true (@eq_op (@cfun_eqType gT (@gval gT H)) psi (GRing.one (@cfun_ringType gT (@gval gT H))))) *)
rewrite -[phi](cfDprodKl KxH psi1) -{2}[psi](cfDprodKr KxH phi1) phi_psi_1.
(* Goal: and (is_true (@eq_op (@cfun_eqType gT (@gval gT K)) (@cfRes gT (@gval gT K) (@gval gT G) (GRing.one (@cfun_ringType gT (@gval gT G)))) (GRing.one (@cfun_ringType gT (@gval gT K))))) (is_true (@eq_op (@cfun_eqType gT (@gval gT H)) (@cfRes gT (@gval gT H) (@gval gT G) (GRing.one (@cfun_ringType gT (@gval gT G)))) (GRing.one (@cfun_ringType gT (@gval gT H))))) *)
by rewrite !rmorph1.
Qed.
Lemma cfDprodl_lin_char phi :
(cfDprodl KxH phi \is a linear_char) = (phi \is a linear_char).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfDprodl gT G K H KxH phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT K)) phi (@mem (@classfun gT (@gval gT K)) (predPredType (@classfun gT (@gval gT K))) (@has_quality (S O) (@classfun gT (@gval gT K)) (@linear_char gT (@gval gT K))))) *)
exact: cfSdprod_lin_char.
Qed.
Lemma cfDprodr_lin_char psi :
(cfDprodr KxH psi \is a linear_char) = (psi \is a linear_char).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfDprodr gT G K H KxH psi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT H)) psi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@linear_char gT (@gval gT H))))) *)
exact: cfSdprod_lin_char.
Qed.
Lemma cfDprod_lin_char phi psi :
phi \is a linear_char -> psi \is a linear_char ->
cfDprod KxH phi psi \is a linear_char.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT K)) phi (@mem (@classfun gT (@gval gT K)) (predPredType (@classfun gT (@gval gT K))) (@has_quality (S O) (@classfun gT (@gval gT K)) (@linear_char gT (@gval gT K)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT H)) psi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@linear_char gT (@gval gT H)))))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfDprod gT G K H KxH phi psi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by move=> Nphi Npsi; rewrite rpredM ?cfSdprod_lin_char.
Qed.
Lemma cfDprodl_irr chi : (cfDprodl KxH chi \in irr G) = (chi \in irr K).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfDprodl gT G K H KxH chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (@in_mem (@classfun gT (@gval gT K)) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT K))) (tuple_predType (S (@pred_Nirr gT (@gval gT K))) (@cfun_eqType gT (@gval gT K))) (@irr gT (@gval gT K)))) *)
exact: cfSdprod_irr.
Qed.
Lemma cfDprodr_irr chi : (cfDprodr KxH chi \in irr G) = (chi \in irr H).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfDprodr gT G K H KxH chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (@in_mem (@classfun gT (@gval gT H)) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT H))) (tuple_predType (S (@pred_Nirr gT (@gval gT H))) (@cfun_eqType gT (@gval gT H))) (@irr gT (@gval gT H)))) *)
exact: cfSdprod_irr.
Qed.
Definition dprodl_Iirr i := cfIirr (cfDprodl KxH 'chi_i).
Lemma dprodl_IirrE i : 'chi_(dprodl_Iirr i) = cfDprodl KxH 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprodl_Iirr i)) (@cfDprodl gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i)) *)
exact: sdprod_IirrE.
Qed.
Lemma dprodl_IirrK : cancel dprodl_Iirr (Res_Iirr K).
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT K)))) dprodl_Iirr (@Res_Iirr gT (@gval gT G) (@gval gT K)) *)
exact: sdprod_IirrK.
Qed.
Lemma dprodl_Iirr_eq0 i : (dprodl_Iirr i == 0) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (dprodl_Iirr i) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) *)
exact: sdprod_Iirr_eq0.
Qed.
Lemma dprodl_Iirr0 : dprodl_Iirr 0 = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprodl_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
exact: sdprod_Iirr0.
Qed.
Definition dprodr_Iirr j := cfIirr (cfDprodr KxH 'chi_j).
Lemma dprodr_IirrE j : 'chi_(dprodr_Iirr j) = cfDprodr KxH 'chi_j.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprodr_Iirr j)) (@cfDprodr gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) *)
exact: sdprod_IirrE.
Qed.
Lemma dprodr_IirrK : cancel dprodr_Iirr (Res_Iirr H).
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) dprodr_Iirr (@Res_Iirr gT (@gval gT G) (@gval gT H)) *)
exact: sdprod_IirrK.
Qed.
Lemma dprodr_Iirr_eq0 j : (dprodr_Iirr j == 0) = (j == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (dprodr_Iirr j) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT H)))) j (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))) *)
exact: sdprod_Iirr_eq0.
Qed.
Lemma dprodr_Iirr0 : dprodr_Iirr 0 = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprodr_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
exact: sdprod_Iirr0.
Qed.
Lemma cfDprod_irr i j : cfDprod KxH 'chi_i 'chi_j \in irr G.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfDprod gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
rewrite irrEchar cfDprod_char ?irr_char //=.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@cfDprod gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) (@cfDprod gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j))) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *)
by rewrite cfdot_dprod !cfdot_irr !eqxx mul1r.
Qed.
Definition dprod_Iirr ij := cfIirr (cfDprod KxH 'chi_ij.1 'chi_ij.2).
Lemma dprod_IirrE i j : 'chi_(dprod_Iirr (i, j)) = cfDprod KxH 'chi_i 'chi_j.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i j))) (@cfDprod gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) *)
by rewrite cfIirrE ?cfDprod_irr.
Qed.
Lemma dprod_IirrEl i : 'chi_(dprod_Iirr (i, 0)) = cfDprodl KxH 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H))))))) (@cfDprodl gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) i)) *)
by rewrite dprod_IirrE /cfDprod irr0 rmorph1 mulr1.
Qed.
Lemma dprod_IirrEr j : 'chi_(dprod_Iirr (0, j)) = cfDprodr KxH 'chi_j.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) j))) (@cfDprodr gT G K H KxH (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) j)) *)
by rewrite dprod_IirrE /cfDprod irr0 rmorph1 mul1r.
Qed.
Lemma dprod_Iirr_inj : injective dprod_Iirr.
Proof.
(* Goal: @injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) dprod_Iirr *)
move=> [i1 j1] [i2 j2] /eqP; rewrite -[_ == _]oddb -(natCK (_ == _)).
(* Goal: forall _ : is_true (odd (truncC (@GRing.natmul (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (GRing.one (Num.NumDomain.ringType Algebraics.Implementation.numDomainType)) (nat_of_bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i1 j1)) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i2 j2))))))), @eq (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i1 j1) (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i2 j2) *)
rewrite -cfdot_irr !dprod_IirrE cfdot_dprod !cfdot_irr -natrM mulnb.
(* Goal: forall _ : is_true (odd (truncC (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT K)))) i1 i2) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT H)))) j1 j2)))))), @eq (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i1 j1) (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i2 j2) *)
by rewrite natCK oddb -xpair_eqE => /eqP.
Qed.
Lemma dprod_Iirr0 : dprod_Iirr (0, 0) = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr (@pair (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
by apply/irr_inj; rewrite dprod_IirrE !irr0 cfDprod_cfun1.
Qed.
Lemma dprod_Iirr0l j : dprod_Iirr (0, j) = dprodr_Iirr j.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr (@pair (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K)))) j)) (dprodr_Iirr j) *)
by apply/irr_inj; rewrite dprod_IirrE irr0 dprodr_IirrE cfDprod_cfun1l.
Qed.
Lemma dprod_Iirr0r i : dprod_Iirr (i, 0) = dprodl_Iirr i.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (GRing.Zmodule.sort (Zp_zmodType (@pred_Nirr gT (@gval gT H)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))))) (dprodl_Iirr i) *)
by apply/irr_inj; rewrite dprod_IirrE irr0 dprodl_IirrE cfDprod_cfun1r.
Qed.
Lemma dprod_Iirr_eq0 i j : (dprod_Iirr (i, j) == 0) = (i == 0) && (j == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i j)) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT K)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT K))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT H)))) j (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT H)))))) *)
by rewrite -xpair_eqE -(inj_eq dprod_Iirr_inj) dprod_Iirr0.
Qed.
Lemma cfdot_dprod_irr i1 i2 j1 j2 :
'['chi_(dprod_Iirr (i1, j1)), 'chi_(dprod_Iirr (i2, j2))]
= ((i1 == i2) && (j1 == j2))%:R.
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i1 j1))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i2 j2)))) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (nat_of_bool (andb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT K)))) i1 i2) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT H)))) j1 j2)))) *)
by rewrite cfdot_irr (inj_eq dprod_Iirr_inj).
Qed.
Lemma dprod_Iirr_onto k : k \in codom dprod_Iirr.
Proof.
(* Goal: is_true (@in_mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) k (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) dprod_Iirr))) *)
set D := codom _; have Df: dprod_Iirr _ \in D := codom_f dprod_Iirr _.
(* Goal: is_true (@in_mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) k (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D)) *)
have: 'chi_k 1%g ^+ 2 != 0 by rewrite mulf_neq0 ?irr1_neq0.
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)))), is_true (@in_mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) k (@mem (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D)) *)
apply: contraR => notDk; move/eqP: (irr_sum_square G).
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
rewrite (bigID (mem D)) (reindex _ (bij_on_codom dprod_Iirr_inj (0, 0))) /=.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (fun j : prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) => @BigBody Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr j) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) dprod_Iirr))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr j)) (oneg (FinGroup.base gT))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (negb (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O)))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
have ->: #|G|%:R = \sum_i \sum_j 'chi_(dprod_Iirr (i, j)) 1%g ^+ 2.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (fun j : prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) => @BigBody Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr j) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) dprod_Iirr))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr j)) (oneg (FinGroup.base gT))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (negb (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) i j))) (oneg (FinGroup.base gT))) (S (S O)))))))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) i j))) (oneg (FinGroup.base gT))) (S (S O))))))) *)
rewrite -(dprod_card KxH) natrM.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (fun j : prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) => @BigBody Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr j) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) dprod_Iirr))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr j)) (oneg (FinGroup.base gT))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (negb (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) i j))) (oneg (FinGroup.base gT))) (S (S O)))))))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.mul Algebraics.Implementation.ringType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT K))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) i j))) (oneg (FinGroup.base gT))) (S (S O))))))) *)
do 2![rewrite -irr_sum_square (mulr_suml, mulr_sumr); apply: eq_bigr => ? _].
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (fun j : prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) => @BigBody Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr j) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) dprod_Iirr))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr j)) (oneg (FinGroup.base gT))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (negb (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) i j))) (oneg (FinGroup.base gT))) (S (S O)))))))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.mul Algebraics.Implementation.ringType (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT K) (@tnth (S (@pred_Nirr gT (@gval gT K))) (@classfun gT (@gval gT K)) (@irr gT (@gval gT K)) _i_) (oneg (FinGroup.base gT))) (S (S O))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) _i1_) (oneg (FinGroup.base gT))) (S (S O)))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) _i_ _i1_))) (oneg (FinGroup.base gT))) (S (S O))) *)
by rewrite dprod_IirrE -exprMn -{3}(mulg1 1%g) cfDprodE.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (fun j : prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) => @BigBody Algebraics.Implementation.type (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (dprod_Iirr j) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) (@codom (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) dprod_Iirr))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr j)) (oneg (FinGroup.base gT))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (negb (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (dprod_Iirr (@pair (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT K))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT H))))) i j))) (oneg (FinGroup.base gT))) (S (S O)))))))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
rewrite (eq_bigl _ _ Df) pair_bigA addrC -subr_eq0 addrK.
(* Goal: forall _ : is_true (@eq_op (GRing.Zmodule.eqType (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (negb (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (seq_predType (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) D))) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT))) (S (S O))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))), is_true (@eq_op (GRing.Ring.eqType Algebraics.Implementation.ringType) (@GRing.exp Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) k) (oneg (FinGroup.base gT))) (S (S O))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType))) *)
by move/eqP/psumr_eq0P=> -> //= i _; rewrite irr1_degree -natrX ler0n.
Qed.
Definition inv_dprod_Iirr i := iinv (dprod_Iirr_onto i).
Lemma dprod_IirrK : cancel dprod_Iirr inv_dprod_Iirr.
Proof.
(* Goal: @cancel (ordinal (S (@pred_Nirr gT (@gval gT G)))) (prod (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H))))) dprod_Iirr inv_dprod_Iirr *)
by move=> p; apply: (iinv_f dprod_Iirr_inj).
Qed.
Lemma inv_dprod_IirrK : cancel inv_dprod_Iirr dprod_Iirr.
Proof.
(* Goal: @cancel (Finite.sort (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (Equality.sort (ordinal_eqType (S (@pred_Nirr gT (@gval gT G))))) inv_dprod_Iirr dprod_Iirr *)
by move=> i; apply: f_iinv.
Qed.
Lemma inv_dprod_Iirr0 : inv_dprod_Iirr 0 = (0, 0).
Proof.
(* Goal: @eq (Finite.sort (prod_finType (ordinal_finType (S (@pred_Nirr gT (@gval gT K)))) (ordinal_finType (S (@pred_Nirr gT (@gval gT H)))))) (inv_dprod_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@pair (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT K))))) (GRing.Zmodule.sort (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT H))))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT K))))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT H)))))) *)
by apply/(canLR dprod_IirrK); rewrite dprod_Iirr0.
Qed.
End DProd.
Arguments dprod_Iirr_inj {gT G K H} KxH [i1 i2] : rename.
Lemma dprod_IirrC (gT : finGroupType) (G K H : {group gT})
(KxH : K \x H = G) (HxK : H \x K = G) i j :
dprod_Iirr KxH (i, j) = dprod_Iirr HxK (j, i).
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@dprod_Iirr gT G K H KxH (@pair (ordinal (S (@pred_Nirr gT (@gval gT K)))) (ordinal (S (@pred_Nirr gT (@gval gT H)))) i j)) (@dprod_Iirr gT G H K HxK (@pair (ordinal (S (@pred_Nirr gT (@gval gT H)))) (ordinal (S (@pred_Nirr gT (@gval gT K)))) j i)) *)
by apply: irr_inj; rewrite !dprod_IirrE; apply: cfDprodC.
Qed.
Section BigDprod.
Variables (gT : finGroupType) (I : finType) (P : pred I).
Variables (A : I -> {group gT}) (G : {group gT}).
Hypothesis defG : \big[dprod/1%g]_(i | P i) A i = G.
Let sAG i : P i -> A i \subset G.
Proof.
(* Goal: forall _ : is_true (P i), is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (A i)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by move=> Pi; rewrite -(bigdprodWY defG) (bigD1 i) ?joing_subl.
Qed.
Lemma cfBigdprodi_char i (phi : 'CF(A i)) :
phi \is a character -> cfBigdprodi defG phi \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT (A i))) phi (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@character gT (@gval gT (A i)))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@cfBigdprodi gT I P A G defG i phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
by move=> Nphi; rewrite cfDprodl_char cfRes_char.
Qed.
Lemma cfBigdprodi_charE i (phi : 'CF(A i)) :
P i -> (cfBigdprodi defG phi \is a character) = (phi \is a character).
Proof.
(* Goal: forall _ : is_true (P i), @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfBigdprodi gT I P A G defG i phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT (A i))) phi (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@character gT (@gval gT (A i)))))) *)
by move=> Pi; rewrite cfDprodl_char Pi cfRes_id.
Qed.
Lemma cfBigdprod_char phi :
(forall i, P i -> phi i \is a character) ->
cfBigdprod defG phi \is a character.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (@classfun gT (@gval gT (A i))) (phi i) (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@character gT (@gval gT (A i)))))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfBigdprod gT I P A G defG phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
by move=> Nphi; apply: rpred_prod => i /Nphi; apply: cfBigdprodi_char.
Qed.
Lemma cfBigdprodi_lin_char i (phi : 'CF(A i)) :
phi \is a linear_char -> cfBigdprodi defG phi \is a linear_char.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT (A i))) phi (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@linear_char gT (@gval gT (A i)))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@cfBigdprodi gT I P A G defG i phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by move=> Lphi; rewrite cfDprodl_lin_char ?cfRes_lin_char.
Qed.
Lemma cfBigdprodi_lin_charE i (phi : 'CF(A i)) :
P i -> (cfBigdprodi defG phi \is a linear_char) = (phi \is a linear_char).
Proof.
(* Goal: forall _ : is_true (P i), @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfBigdprodi gT I P A G defG i phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@in_mem (@classfun gT (@gval gT (A i))) phi (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@linear_char gT (@gval gT (A i)))))) *)
by move=> Pi; rewrite qualifE cfBigdprodi_charE // cfBigdprodi1.
Qed.
Lemma cfBigdprod_lin_char phi :
(forall i, P i -> phi i \is a linear_char) ->
cfBigdprod defG phi \is a linear_char.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (@classfun gT (@gval gT (A i))) (phi i) (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@linear_char gT (@gval gT (A i)))))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfBigdprod gT I P A G defG phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by move=> Lphi; apply/rpred_prod=> i /Lphi; apply: cfBigdprodi_lin_char.
Qed.
Lemma cfBigdprodi_irr i chi :
P i -> (cfBigdprodi defG chi \in irr G) = (chi \in irr (A i)).
Proof.
(* Goal: forall _ : is_true (P i), @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfBigdprodi gT I P A G defG i chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (@in_mem (@classfun gT (@gval gT (A i))) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (tuple_predType (S (@pred_Nirr gT (@gval gT (A i)))) (@cfun_eqType gT (@gval gT (A i)))) (@irr gT (@gval gT (A i))))) *)
by move=> Pi; rewrite !irrEchar cfBigdprodi_charE ?cfBigdprodi_iso.
Qed.
Lemma cfBigdprod_irr chi :
(forall i, P i -> chi i \in irr (A i)) -> cfBigdprod defG chi \in irr G.
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (chi i) (@mem (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (tuple_predType (S (@pred_Nirr gT (@gval gT (A i)))) (@cfun_eqType gT (@gval gT (A i)))) (@irr gT (@gval gT (A i))))), is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfBigdprod gT I P A G defG chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
move=> Nchi; rewrite irrEchar cfBigdprod_char => [|i /Nchi/irrWchar] //=.
(* Goal: is_true (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@cfBigdprod gT I P A G defG chi) (@cfBigdprod gT I P A G defG chi)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *)
by rewrite cfdot_bigdprod big1 // => i /Nchi/irrWnorm.
Qed.
Lemma cfBigdprod_eq1 phi :
(forall i, P i -> phi i \is a character) ->
(cfBigdprod defG phi == 1) = [forall (i | P i), phi i == 1].
Proof.
(* Goal: forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (@classfun gT (@gval gT (A i))) (phi i) (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@character gT (@gval gT (A i)))))), @eq bool (@eq_op (GRing.Ring.eqType (@cfun_ringType gT (@gval gT G))) (@cfBigdprod gT I P A G defG phi) (GRing.one (@cfun_ringType gT (@gval gT G)))) (@FiniteQuant.quant0b I (fun i : Finite.sort I => @FiniteQuant.all_in I (P i) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT (A i))) (phi i) (GRing.one (@cfun_ringType gT (@gval gT (A i)))))) i)) *)
move=> Nphi; set Phi := cfBigdprod defG phi.
(* Goal: @eq bool (@eq_op (GRing.Ring.eqType (@cfun_ringType gT (@gval gT G))) Phi (GRing.one (@cfun_ringType gT (@gval gT G)))) (@FiniteQuant.quant0b I (fun i : Finite.sort I => @FiniteQuant.all_in I (P i) (FiniteQuant.Quantified (@eq_op (@cfun_eqType gT (@gval gT (A i))) (phi i) (GRing.one (@cfun_ringType gT (@gval gT (A i)))))) i)) *)
apply/eqP/eqfun_inP=> [Phi1 i Pi | phi1]; last first.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (phi i) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
(* Goal: @eq (Equality.sort (GRing.Ring.eqType (@cfun_ringType gT (@gval gT G)))) Phi (GRing.one (@cfun_ringType gT (@gval gT G))) *)
by apply: big1 => i /phi1->; rewrite rmorph1.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (phi i) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
have Phi1_1: Phi 1%g = 1 by rewrite Phi1 cfun1E group1.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (phi i) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
have nz_Phi1: Phi 1%g != 0 by rewrite Phi1_1 oner_eq0.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (phi i) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
have [_ <-] := cfBigdprodK nz_Phi1 Pi.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT (A i))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT (A i)) (phi i) (oneg (FinGroup.base gT))) (@GRing.inv Algebraics.Implementation.unitRingType (@fun_of_cfun gT (@gval gT G) (@cfBigdprod gT I P A G defG phi) (oneg (FinGroup.base gT))))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi))) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
rewrite Phi1_1 divr1 -/Phi Phi1 rmorph1.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT (A i))) (@fun_of_cfun gT (@gval gT (A i)) (phi i) (oneg (FinGroup.base gT))) (GRing.one (@cfun_ringType gT (@gval gT (A i))))) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
rewrite prod_cfunE // in Phi1_1; have := Cnat_prod_eq1 _ Phi1_1 Pi.
(* Goal: forall _ : forall _ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfBigdprodi gT I P A G defG i (phi i)) (oneg (FinGroup.base gT))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)), @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfBigdprodi gT I P A G defG i (phi i)) (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType), @eq (Equality.sort (@cfun_eqType gT (@gval gT (A i)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT (A i))) (@fun_of_cfun gT (@gval gT (A i)) (phi i) (oneg (FinGroup.base gT))) (GRing.one (@cfun_ringType gT (@gval gT (A i))))) (GRing.one (@cfun_ringType gT (@gval gT (A i)))) *)
rewrite -(cfRes1 (A i)) cfBigdprodiK // => ->; first by rewrite scale1r.
(* Goal: forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfBigdprodi gT I P A G defG i (phi i)) (oneg (FinGroup.base gT))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by move=> {i Pi} j /Nphi Nphi_j; rewrite Cnat_char1 ?cfBigdprodi_char.
Qed.
Lemma cfBigdprod_Res_lin chi :
chi \is a linear_char -> cfBigdprod defG (fun i => 'Res[A i] chi) = chi.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))), @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfBigdprod gT I P A G defG (fun i : Finite.sort I => @cfRes gT (@gval gT (A i)) (@gval gT G) chi)) chi *)
move=> Lchi; apply/cfun_inP=> _ /(mem_bigdprod defG)[x [Ax -> _]].
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfBigdprod gT I P A G defG (fun i : Finite.sort I => @cfRes gT (@gval gT (A i)) (@gval gT G) chi)) (@BigOp.bigop (FinGroup.sort (FinGroup.base gT)) (Finite.sort I) (oneg (FinGroup.base gT)) (index_enum I) (fun i : Finite.sort I => @BigBody (FinGroup.arg_sort (FinGroup.base gT)) (Finite.sort I) i (@mulg (FinGroup.base gT)) (P i) (x i)))) (@fun_of_cfun gT (@gval gT G) chi (@BigOp.bigop (FinGroup.sort (FinGroup.base gT)) (Finite.sort I) (oneg (FinGroup.base gT)) (index_enum I) (fun i : Finite.sort I => @BigBody (FinGroup.arg_sort (FinGroup.base gT)) (Finite.sort I) i (@mulg (FinGroup.base gT)) (P i) (x i)))) *)
rewrite (lin_char_prod Lchi) ?cfBigdprodE // => [|i Pi]; last first.
(* Goal: @eq Algebraics.Implementation.type (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (@fun_of_cfun gT (@gval gT (A i)) (@cfRes gT (@gval gT (A i)) (@gval gT G) chi) (x i)))) (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (@fun_of_cfun gT (@gval gT G) chi (x i)))) *)
(* Goal: is_true (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) (x i) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite (subsetP (sAG Pi)) ?Ax.
(* Goal: @eq Algebraics.Implementation.type (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (@fun_of_cfun gT (@gval gT (A i)) (@cfRes gT (@gval gT (A i)) (@gval gT G) chi) (x i)))) (@BigOp.bigop (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) (GRing.one Algebraics.Implementation.ringType) (index_enum I) (fun i : Finite.sort I => @BigBody (GRing.Ring.sort Algebraics.Implementation.ringType) (Finite.sort I) i (@GRing.mul Algebraics.Implementation.ringType) (P i) (@fun_of_cfun gT (@gval gT G) chi (x i)))) *)
by apply/eq_bigr=> i Pi; rewrite cfResE ?sAG ?Ax.
Qed.
Lemma cfBigdprodKlin phi :
(forall i, P i -> phi i \is a linear_char) ->
forall i, P i -> 'Res (cfBigdprod defG phi) = phi i.
Proof.
(* Goal: forall (_ : forall (i : Finite.sort I) (_ : is_true (P i)), is_true (@in_mem (@classfun gT (@gval gT (A i))) (phi i) (@mem (@classfun gT (@gval gT (A i))) (predPredType (@classfun gT (@gval gT (A i)))) (@has_quality (S O) (@classfun gT (@gval gT (A i))) (@linear_char gT (@gval gT (A i))))))) (i : Finite.sort I) (_ : is_true (P i)), @eq (@classfun gT (@gval gT (A i))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi)) (phi i) *)
move=> Lphi i Pi; have Lpsi := cfBigdprod_lin_char Lphi.
(* Goal: @eq (@classfun gT (@gval gT (A i))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi)) (phi i) *)
have [_ <-] := cfBigdprodK (lin_char_neq0 Lpsi (group1 G)) Pi.
(* Goal: @eq (@classfun gT (@gval gT (A i))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@gval gT (A i))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT (A i)) (phi i) (oneg (FinGroup.base gT))) (@GRing.inv Algebraics.Implementation.unitRingType (@fun_of_cfun gT (@gval gT G) (@cfBigdprod gT I P A G defG phi) (oneg (FinGroup.base gT))))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi))) *)
by rewrite !lin_char1 ?Lphi // divr1 scale1r.
Qed.
Lemma cfBigdprodKabelian Iphi (phi := fun i => 'chi_(Iphi i)) :
abelian G -> forall i, P i -> 'Res (cfBigdprod defG phi) = 'chi_(Iphi i).
Proof.
(* Goal: forall (_ : is_true (@abelian gT (@gval gT G))) (i : Finite.sort I) (_ : is_true (P i)), @eq (@classfun gT (@gval gT (A i))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi)) (@tnth (S (@pred_Nirr gT (@gval gT (A i)))) (@classfun gT (@gval gT (A i))) (@irr gT (@gval gT (A i))) (Iphi i)) *)
move=> /(abelianS _) cGG.
(* Goal: forall (i : Finite.sort I) (_ : is_true (P i)), @eq (@classfun gT (@gval gT (A i))) (@cfRes gT (@gval gT (A i)) (@gval gT G) (@cfBigdprod gT I P A G defG phi)) (@tnth (S (@pred_Nirr gT (@gval gT (A i)))) (@classfun gT (@gval gT (A i))) (@irr gT (@gval gT (A i))) (Iphi i)) *)
by apply: cfBigdprodKlin => i /sAG/cGG/char_abelianP->.
Qed.
End BigDprod.
Section Aut.
Variables (gT : finGroupType) (G : {group gT}).
Implicit Type u : {rmorphism algC -> algC}.
Lemma conjC_charAut u (chi : 'CF(G)) x :
chi \is a character -> (u (chi x))^* = u (chi x)^*.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@fun_of_cfun gT (@gval gT G) chi x))) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) chi x))) *)
have [Gx | /cfun0->] := boolP (x \in G); last by rewrite !rmorph0.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@fun_of_cfun gT (@gval gT G) chi x))) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) chi x))) *)
case/char_reprP=> rG ->; have [e [_ [en1 _] [-> _] _]] := repr_rsim_diag rG Gx.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (index_enum (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (fun i : Finite.sort (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) i (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) true (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (S O) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) e (GRing.zero (Zp_zmodType O)) i))))) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (GRing.zero (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (index_enum (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (fun i : Finite.sort (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) (Finite.sort (ordinal_finType (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) i (@GRing.add (GRing.Ring.zmodType (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))))) true (@fun_of_matrix (GRing.Ring.sort (GRing.UnitRing.ringType (GRing.ComUnitRing.unitRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (S O) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) e (GRing.zero (Zp_zmodType O)) i))))) *)
by rewrite !rmorph_sum; apply: eq_bigr => i _; apply: aut_unity_rootC (en1 i).
Qed.
Lemma conjC_irrAut u i x : (u ('chi[G]_i x))^* = u ('chi_i x)^*.
Proof.
(* Goal: @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType))) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x))) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x))) *)
exact: conjC_charAut (irr_char i).
Qed.
Lemma cfdot_aut_char u (phi chi : 'CF(G)) :
chi \is a character -> '[cfAut u phi, cfAut u chi] = u '[phi, chi].
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@cfAut gT (@gval gT G) u phi) (@cfAut gT (@gval gT G) u chi)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@cfdot gT (@gval gT G) phi chi)) *)
by move/conjC_charAut=> Nchi; apply: cfdot_cfAut => _ /mapP[x _ ->].
Qed.
Lemma cfdot_aut_irr u phi i :
'[cfAut u phi, cfAut u 'chi[G]_i] = u '[phi, 'chi_i].
Proof.
(* Goal: @eq (GRing.Ring.sort (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) (@cfAut gT (@gval gT G) u phi) (@cfAut gT (@gval gT G) u (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
exact: cfdot_aut_char (irr_char i).
Qed.
Lemma cfAut_irr u chi : (cfAut u chi \in irr G) = (chi \in irr G).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) u chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (@in_mem (@classfun gT (@gval gT G)) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
rewrite !irrEchar cfAut_char; apply/andb_id2l=> /cfdot_aut_char->.
(* Goal: @eq bool (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@GRing.RMorphism.apply Algebraics.Implementation.ringType Algebraics.Implementation.ringType (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) u (@cfdot gT (@gval gT G) chi chi)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@cfdot gT (@gval gT G) chi chi) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType))) *)
exact: fmorph_eq1.
Qed.
Lemma cfConjC_irr i : (('chi_i)^*)%CF \in irr G.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
by rewrite cfAut_irr mem_irr.
Qed.
Lemma irr_aut_closed u : cfAut_closed u (irr G).
Proof.
(* Goal: @cfAut_closed gT (@gval gT G) u (@tval (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G))) *)
by move=> chi; rewrite /= cfAut_irr.
Qed.
Definition aut_Iirr u i := cfIirr (cfAut u 'chi[G]_i).
Lemma aut_IirrE u i : 'chi_(aut_Iirr u i) = cfAut u 'chi_i.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (aut_Iirr u i)) (@cfAut gT (@gval gT G) u (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
by rewrite cfIirrE ?cfAut_irr ?mem_irr.
Qed.
Definition conjC_Iirr := aut_Iirr conjC.
Lemma conjC_IirrE i : 'chi[G]_(conjC_Iirr i) = ('chi_i)^*%CF.
Proof.
(* Goal: @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (conjC_Iirr i)) (@cfAut gT (@gval gT G) (@conjC Algebraics.Implementation.numClosedFieldType) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
exact: aut_IirrE.
Qed.
Lemma conjC_IirrK : involutive conjC_Iirr.
Proof.
(* Goal: @involutive (ordinal (S (@pred_Nirr gT (@gval gT G)))) conjC_Iirr *)
by move=> i; apply: irr_inj; rewrite !conjC_IirrE cfConjCK.
Qed.
Lemma aut_Iirr0 u : aut_Iirr u 0 = 0 :> Iirr G.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (aut_Iirr u (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
by apply/irr_inj; rewrite aut_IirrE irr0 cfAut_cfun1.
Qed.
Lemma conjC_Iirr0 : conjC_Iirr 0 = 0 :> Iirr G.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (conjC_Iirr (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
exact: aut_Iirr0.
Qed.
Lemma aut_Iirr_eq0 u i : (aut_Iirr u i == 0) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (aut_Iirr u i) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) *)
by rewrite -!irr_eq1 aut_IirrE cfAut_eq1.
Qed.
Lemma conjC_Iirr_eq0 i : (conjC_Iirr i == 0 :> Iirr G) = (i == 0).
Proof.
(* Goal: @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (conjC_Iirr i : ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))) : ordinal (S (@pred_Nirr gT (@gval gT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) *)
exact: aut_Iirr_eq0.
Qed.
Lemma aut_Iirr_inj u : injective (aut_Iirr u).
Proof.
(* Goal: @injective (ordinal (S (@pred_Nirr gT (@gval gT G)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (aut_Iirr u) *)
by move=> i j eq_ij; apply/irr_inj/(cfAut_inj u); rewrite -!aut_IirrE eq_ij.
Qed.
End Aut.
Arguments aut_Iirr_inj {gT G} u [i1 i2] : rename.
Arguments conjC_IirrK {gT G} i : rename.
Section Coset.
Variable (gT : finGroupType).
Implicit Types G H : {group gT}.
Lemma cfQuo_char G H (chi : 'CF(G)) :
chi \is a character -> (chi / H)%CF \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
move=> Nchi; without loss kerH: / H \subset cfker chi.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: forall _ : forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi)))), is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))), is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
move/contraNF=> IHchi; apply/wlog_neg=> N'chiH.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
suffices ->: (chi / H)%CF = (chi 1%g)%:A.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: @eq (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@GRing.scale Algebraics.Implementation.ringType (@GRing.Lalgebra.lmod_ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@GRing.scale Algebraics.Implementation.ringType (@GRing.Lalgebra.lmod_ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by rewrite rpredZ_Cnat ?Cnat_char1 ?rpred1.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: @eq (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@GRing.scale Algebraics.Implementation.ringType (@GRing.Lalgebra.lmod_ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by apply/cfunP=> x; rewrite cfunE cfun1E mulr_natr cfunElock IHchi.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
without loss nsHG: G chi Nchi kerH / H <| G.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: forall _ : forall (G : @group_of gT (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (chi : @classfun gT (@gval gT G)) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi))))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))), is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
move=> IHchi; have nsHN := normalSG (subset_trans kerH (cfker_sub chi)).
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by rewrite cfQuoInorm ?(cfRes_char, IHchi) ?sub_cfker_Res // ?normal_sub.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
have [rG Dchi] := char_reprP Nchi; rewrite Dchi cfker_repr in kerH.
(* Goal: is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
apply/char_reprP; exists (Representation (quo_repr kerH (normal_norm nsHG))).
(* Goal: @eq (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@cfQuo gT G (@gval gT H) chi) (@cfRepr (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@quo_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) H kerH (@normal_norm gT (@gval gT H) (@gval gT G) nsHG)))) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) (@Representation (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@quo_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) H kerH (@normal_norm gT (@gval gT H) (@gval gT G) nsHG))))) *)
apply/cfun_inP=> _ /morphimP[x nHx Gx ->]; rewrite Dchi cfQuoE ?cfker_repr //=.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG)) x) (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@cfRepr (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@quo_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) H kerH (@normal_norm gT (@gval gT H) (@gval gT G) nsHG))) (@coset gT (@gval gT H) x)) *)
by rewrite !cfunE Gx quo_repr_coset ?mem_quotient.
Qed.
Lemma cfQuo_lin_char G H (chi : 'CF(G)) :
chi \is a linear_char -> (chi / H)%CF \is a linear_char.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))), is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@linear_char (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by case/andP=> Nchi; rewrite qualifE cfQuo_char ?cfQuo1.
Qed.
Lemma cfMod_char G H (chi : 'CF(G / H)) :
chi \is a character -> (chi %% H)%CF \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) chi (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@cfMod gT G (@gval gT H) chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
exact: cfMorph_char.
Qed.
Lemma cfMod_lin_char G H (chi : 'CF(G / H)) :
chi \is a linear_char -> (chi %% H)%CF \is a linear_char.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) chi (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@linear_char (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@cfMod gT G (@gval gT H) chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
exact: cfMorph_lin_char.
Qed.
Lemma cfMod_charE G H (chi : 'CF(G / H)) :
H <| G -> (chi %% H \is a character)%CF = (chi \is a character).
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfMod gT G (@gval gT H) chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) chi (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by case/andP=> _; apply: cfMorph_charE.
Qed.
Lemma cfMod_lin_charE G H (chi : 'CF(G / H)) :
H <| G -> (chi %% H \is a linear_char)%CF = (chi \is a linear_char).
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfMod gT G (@gval gT H) chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) chi (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@linear_char (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by case/andP=> _; apply: cfMorph_lin_charE.
Qed.
Lemma cfQuo_charE G H (chi : 'CF(G)) :
H <| G -> H \subset cfker chi ->
(chi / H \is a character)%CF = (chi \is a character).
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi))))), @eq bool (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@character (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
by move=> nsHG kerH; rewrite -cfMod_charE ?cfQuoK.
Qed.
Lemma cfQuo_lin_charE G H (chi : 'CF(G)) :
H <| G -> H \subset cfker chi ->
(chi / H \is a linear_char)%CF = (chi \is a linear_char).
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi))))), @eq bool (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (predPredType (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@has_quality (S O) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@linear_char (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by move=> nsHG kerH; rewrite -cfMod_lin_charE ?cfQuoK.
Qed.
Lemma cfMod_irr G H chi :
H <| G -> (chi %% H \in irr G)%CF = (chi \in irr (G / H)).
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq bool (@in_mem (@classfun gT (@gval gT G)) (@cfMod gT G (@gval gT H) chi) (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) chi (@mem (Equality.sort (@cfun_eqType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (tuple_predType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@cfun_eqType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) *)
by case/andP=> _; apply: cfMorph_irr.
Qed.
Definition mod_Iirr G H i := cfIirr ('chi[G / H]_i %% H)%CF.
Lemma mod_Iirr0 G H : mod_Iirr (0 : Iirr (G / H)) = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@mod_Iirr G H (GRing.zero (Zp_zmodType (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G)))) *)
exact: morph_Iirr0.
Qed.
Lemma mod_IirrE G H i : H <| G -> 'chi_(mod_Iirr i) = ('chi[G / H]_i %% H)%CF.
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr G H i)) (@cfMod gT G (@gval gT H) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) i)) *)
by move=> nsHG; rewrite cfIirrE ?cfMod_irr ?mem_irr.
Qed.
Lemma mod_Iirr_eq0 G H i :
H <| G -> (mod_Iirr i == 0) = (i == 0 :> Iirr (G / H)).
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (@mod_Iirr G H i) (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) (@eq_op (ordinal_eqType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (i : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (GRing.zero (Zp_zmodType (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) *)
by case/andP=> _ /morph_Iirr_eq0->.
Qed.
Lemma cfQuo_irr G H chi :
H <| G -> H \subset cfker chi ->
((chi / H)%CF \in irr (G / H)) = (chi \in irr G).
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi))))), @eq bool (@in_mem (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@cfQuo gT G (@gval gT H) chi) (@mem (Equality.sort (@cfun_eqType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (tuple_predType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@cfun_eqType (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (@in_mem (@classfun gT (@gval gT G)) chi (@mem (Equality.sort (@cfun_eqType gT (@gval gT G))) (tuple_predType (S (@pred_Nirr gT (@gval gT G))) (@cfun_eqType gT (@gval gT G))) (@irr gT (@gval gT G)))) *)
by move=> nsHG kerH; rewrite -cfMod_irr ?cfQuoK.
Qed.
Definition quo_Iirr G H i := cfIirr ('chi[G]_i / H)%CF.
Lemma quo_Iirr0 G H : quo_Iirr H (0 : Iirr G) = 0.
Proof.
(* Goal: @eq (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (@quo_Iirr G H (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))) : ordinal (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (Zp_zmodType (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) *)
by rewrite /quo_Iirr irr0 cfQuo_cfun1 -irr0 irrK.
Qed.
Lemma quo_IirrE G H i :
H <| G -> H \subset cfker 'chi[G]_i -> 'chi_(quo_Iirr H i) = ('chi_i / H)%CF.
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))), @eq (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@quo_Iirr G H i)) (@cfQuo gT G (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) *)
by move=> nsHG kerH; rewrite cfIirrE ?cfQuo_irr ?mem_irr.
Qed.
Lemma quo_Iirr_eq0 G H i :
H <| G -> H \subset cfker 'chi[G]_i -> (quo_Iirr H i == 0) = (i == 0).
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))), @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (@quo_Iirr G H i) (GRing.zero (Zp_zmodType (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) *)
by move=> nsHG kerH; rewrite -!irr_eq1 quo_IirrE ?cfQuo_eq1.
Qed.
Lemma mod_IirrK G H : H <| G -> cancel (@mod_Iirr G H) (@quo_Iirr G H).
Lemma quo_IirrK G H i :
H <| G -> H \subset cfker 'chi[G]_i -> mod_Iirr (quo_Iirr H i) = i.
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))), @eq (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@mod_Iirr G H (@quo_Iirr G H i)) i *)
by move=> nsHG kerH; apply: irr_inj; rewrite mod_IirrE ?quo_IirrE ?cfQuoK.
Qed.
Lemma quo_IirrKeq G H :
H <| G ->
forall i, (mod_Iirr (quo_Iirr H i) == i) = (H \subset cfker 'chi[G]_i).
Proof.
(* Goal: forall (_ : is_true (@normal gT (@gval gT H) (@gval gT G))) (i : ordinal (S (@pred_Nirr gT (@gval gT G)))), @eq bool (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) (@mod_Iirr G H (@quo_Iirr G H i)) i) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
move=> nsHG i; apply/eqP/idP=> [<- | ]; last exact: quo_IirrK.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr G H (@quo_Iirr G H i))))))) *)
by rewrite mod_IirrE ?cfker_mod.
Qed.
Lemma mod_Iirr_bij H G :
H <| G -> {on [pred i | H \subset cfker 'chi_i], bijective (@mod_Iirr G H)}.
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @bijective_on (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) (@mod_Iirr G H) *)
by exists (quo_Iirr H) => [i _ | i]; [apply: mod_IirrK | apply: quo_IirrK].
Qed.
Lemma sum_norm_irr_quo H G x :
x \in G -> H <| G ->
\sum_i `|'chi[G / H]_i (coset H x)| ^+ 2
= \sum_(i | H \subset cfker 'chi_i) `|'chi[G]_i x| ^+ 2.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), @eq (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (GRing.zero (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (index_enum (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) i (@GRing.add (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) true (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) i) (@coset gT (@gval gT H) x))) (S (S O))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) (S (S O))))) *)
move=> Gx nsHG; rewrite (reindex _ (mod_Iirr_bij nsHG)) /=.
(* Goal: @eq Algebraics.Implementation.type (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (index_enum (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (fun i : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) i (@GRing.add (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) true (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) i) (@coset gT (@gval gT H) x))) (S (S O))))) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (GRing.zero (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (index_enum (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))))) (fun j : ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) j (@GRing.add (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr G H j)))))) (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) (@mod_Iirr G H j)) x)) (S (S O))))) *)
by apply/esym/eq_big=> [i | i _]; rewrite mod_IirrE ?cfker_mod ?cfModE.
Qed.
Lemma cap_cfker_normal G H :
H <| G -> \bigcap_(i | H \subset cfker 'chi[G]_i) (cfker 'chi_i) = H.
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@gval gT H) *)
move=> nsHG; have [sHG nHG] := andP nsHG; set lhs := \bigcap_(i | _) _.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) lhs (@gval gT H) *)
have nHlhs: lhs \subset 'N(H) by rewrite (bigcap_min 0) ?cfker_irr0.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) lhs (@gval gT H) *)
apply/esym/eqP; rewrite eqEsubset (introT bigcapsP) //= -quotient_sub1 //.
(* Goal: is_true (@subset (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT lhs (@gval gT H)))) (@mem (Finite.sort (FinGroup.finType (@coset_baseGroupType gT (@gval gT H)))) (predPredType (Finite.sort (FinGroup.finType (@coset_baseGroupType gT (@gval gT H))))) (@SetDef.pred_of_set (FinGroup.finType (@coset_baseGroupType gT (@gval gT H))) (oneg (group_set_of_baseGroupType (@coset_baseGroupType gT (@gval gT H))))))) *)
rewrite -(TI_cfker_irr (G / H)); apply/bigcapsP=> i _.
(* Goal: is_true (@subset (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@quotient gT lhs (@gval gT H)))) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@cfker (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))) (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) i))))) *)
rewrite sub_quotient_pre // (bigcap_min (mod_Iirr i)) ?mod_IirrE ?cfker_mod //.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@cfMod gT G (@gval gT H) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (@classfun (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) (@irr (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))) i))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@morphpre gT (@coset_groupType gT (@gval gT H)) (@normaliser gT (@gval gT H)) (@coset_morphism gT (@gval gT H)) (@MorPhantom gT (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H))) (@cfker (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))) (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) i)))))) *)
by rewrite cfker_morph ?subsetIr.
Qed.
Lemma cfker_reg_quo G H : H <| G -> cfker (cfReg (G / H)%g %% H) = H.
Proof.
(* Goal: forall _ : is_true (@normal gT (@gval gT H) (@gval gT G)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@cfMod gT G (@gval gT H) (@cfReg (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (@gval gT H) *)
move=> nsHG; have [sHG nHG] := andP nsHG.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@cfMod gT G (@gval gT H) (@cfReg (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H))))) (@gval gT H) *)
apply/setP=> x; rewrite cfkerEchar ?cfMod_char ?cfReg_char //.
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@cfMod gT G (@gval gT H) (@cfReg (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) x) (@fun_of_cfun gT (@gval gT G) (@cfMod gT G (@gval gT H) (@cfReg (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (oneg (FinGroup.base gT))))))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite -[in RHS in _ = RHS](setIidPr sHG) !inE; apply: andb_id2l => Gx.
(* Goal: @eq bool (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@cfMod gT G (@gval gT H) (@cfReg (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) x) (@fun_of_cfun gT (@gval gT G) (@cfMod gT G (@gval gT H) (@cfReg (@coset_groupType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)))) (oneg (FinGroup.base gT)))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite !cfModE // !cfRegE // morph1 eqxx.
(* Goal: @eq bool (@eq_op Algebraics.Implementation.eqType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (nat_of_bool (@eq_op (FinGroup.arg_eqType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@coset gT (@gval gT H) x) (oneg (FinGroup.base (@coset_groupType gT (@gval gT H))))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (nat_of_bool true))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite (sameP eqP (kerP _ (subsetP nHG x Gx))) ker_coset.
(* Goal: @eq bool (@eq_op Algebraics.Implementation.eqType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (nat_of_bool true))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
by rewrite -!mulrnA eqr_nat eqn_pmul2l ?cardG_gt0 // (can_eq oddb) eqb_id.
Qed.
End Coset.
Section DerivedGroup.
Variable gT : finGroupType.
Implicit Types G H : {group gT}.
Lemma lin_irr_der1 G i :
('chi_i \is a linear_char) = (G^`(1)%g \subset cfker 'chi[G]_i).
Proof.
(* Goal: @eq bool (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
apply/idP/idP=> [|sG'K]; first by apply: lin_char_der1.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
have nsG'G: G^`(1) <| G := der_normal 1 G.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
rewrite qualifE irr_char -[i](quo_IirrK nsG'G) // mod_IirrE //=.
(* Goal: is_true (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@cfMod gT G (@derived_at (S O) gT (@gval gT G)) (@tnth (S (@pred_Nirr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient gT (@gval gT G) (@derived_at (S O) gT (@gval gT G))))) (@classfun (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient gT (@gval gT G) (@derived_at (S O) gT (@gval gT G)))) (@irr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient gT (@gval gT G) (@derived_at (S O) gT (@gval gT G)))) (@quo_Iirr gT G (@derived_at_group gT G (S O)) i))) (oneg (FinGroup.base gT))) (GRing.one Algebraics.Implementation.ringType)) *)
by rewrite cfModE // morph1 lin_char1 //; apply/char_abelianP/der_abelian.
Qed.
Lemma subGcfker G i : (G \subset cfker 'chi[G]_i) = (i == 0).
Proof.
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))) *)
rewrite -irr_eq1; apply/idP/eqP=> [chiG1 | ->]; last by rewrite cfker_cfun1.
(* Goal: @eq (Equality.sort (@cfun_eqType gT (@gval gT G))) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (GRing.one (@cfun_ringType gT (@gval gT G))) *)
apply/cfun_inP=> x Gx; rewrite cfun1E Gx cfker1 ?(subsetP chiG1) ?lin_char1 //.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by rewrite lin_irr_der1 (subset_trans (der_sub 1 G)).
Qed.
Lemma irr_prime_injP G i :
prime #|G| -> reflect {in G &, injective 'chi[G]_i} (i != 0).
Lemma cap_cfker_lin_irr G :
\bigcap_(i | 'chi[G]_i \is a linear_char) (cfker 'chi_i) = G^`(1)%g.
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@derived_at (S O) gT (@gval gT G)) *)
rewrite -(cap_cfker_normal (der_normal 1 G)).
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@derived_at_group gT G (S O))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) *)
by apply: eq_bigl => i; rewrite lin_irr_der1.
Qed.
Lemma card_lin_irr G :
#|[pred i | 'chi[G]_i \is a linear_char]| = #|G : G^`(1)%g|.
Proof.
(* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G)))))))) (@indexg gT (@gval gT G) (@derived_at (S O) gT (@gval gT G))) *)
have nsG'G := der_normal 1 G; rewrite (eq_card (@lin_irr_der1 G)).
(* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@derived_at (S O) gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) (@indexg gT (@gval gT G) (@derived_at (S O) gT (@gval gT G))) *)
rewrite -(on_card_preimset (mod_Iirr_bij nsG'G)).
(* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O)))))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@preimset (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@mod_Iirr gT G (@derived_at_group gT G (S O))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (@pred_of_simpl (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@derived_at_group gT G (S O))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))))))) (@indexg gT (@gval gT G) (@derived_at (S O) gT (@gval gT G))) *)
rewrite -card_quotient ?normal_norm //.
(* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O)))))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@preimset (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@mod_Iirr gT G (@derived_at_group gT G (S O))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (@pred_of_simpl (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@derived_at_group gT G (S O))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))))))) (@card (@coset_finType gT (@gval gT (@derived_at_group gT G (S O)))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@derived_at_group gT G (S O))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@derived_at_group gT G (S O)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) *)
move: (der_abelian 0 G); rewrite card_classes_abelian; move/eqP<-.
(* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O)))))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@preimset (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@mod_Iirr gT G (@derived_at_group gT G (S O))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (@pred_of_simpl (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@derived_at_group gT G (S O))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))))))) (@card (set_of_finType (FinGroup.finType (FinGroup.base (@coset_groupType gT (@derived_at (S O) gT (@gval gT G)))))) (@mem (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))))))) (predPredType (Finite.sort (set_of_finType (FinGroup.finType (FinGroup.base (@coset_groupType gT (@derived_at (S O) gT (@gval gT G)))))))) (@SetDef.pred_of_set (set_of_finType (FinGroup.finType (FinGroup.base (@coset_groupType gT (@derived_at (S O) gT (@gval gT G)))))) (@classes (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@gval (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient_group gT (@derived_at_group gT G O) (@derived_at (S O) gT (@gval gT G)))))))) *)
rewrite -NirrE -[X in _ = X]card_ord.
(* Goal: @eq nat (@card (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O)))))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))))) (@SetDef.pred_of_set (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (@preimset (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT (@derived_at_group gT G (S O)))) (@quotient gT (@gval gT G) (@gval gT (@derived_at_group gT G (S O))))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@mod_Iirr gT G (@derived_at_group gT G (S O))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (@pred_of_simpl (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@derived_at_group gT G (S O))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))))))) (@card (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@gval (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient_group gT (@derived_at_group gT G O) (@derived_at (S O) gT (@gval gT G))))))) (@mem (ordinal (S (@pred_Nirr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@gval (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient_group gT (@derived_at_group gT G O) (@derived_at (S O) gT (@gval gT G))))))) (predPredType (ordinal (S (@pred_Nirr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@gval (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient_group gT (@derived_at_group gT G O) (@derived_at (S O) gT (@gval gT G)))))))) (@sort_of_simpl_pred (ordinal (S (@pred_Nirr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@gval (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient_group gT (@derived_at_group gT G O) (@derived_at (S O) gT (@gval gT G))))))) (pred_of_argType (ordinal (S (@pred_Nirr (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@gval (@coset_groupType gT (@derived_at (S O) gT (@gval gT G))) (@quotient_group gT (@derived_at_group gT G O) (@derived_at (S O) gT (@gval gT G))))))))))) *)
by apply: eq_card => i; rewrite !inE mod_IirrE ?cfker_mod.
Qed.
Lemma solvable_has_lin_char G :
G :!=: 1%g -> solvable G ->
exists2 i, 'chi[G]_i \is a linear_char & 'chi_i != 1.
Proof.
(* Goal: forall (_ : is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT G : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (oneg (group_set_of_baseGroupType (FinGroup.base gT)) : @set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))))))) (_ : is_true (@solvable gT (@gval gT G))), @ex2 (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G)))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (GRing.one (@cfun_ringType gT (@gval gT G)))))) *)
move=> ntG solG.
(* Goal: @ex2 (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G)))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (GRing.one (@cfun_ringType gT (@gval gT G)))))) *)
suff /subsetPn[i]: ~~ ([pred i | 'chi[G]_i \is a linear_char] \subset pred1 0).
(* Goal: is_true (negb (@subset (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))))) (@mem (Equality.sort (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G)))))) (simplPredType (Equality.sort (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))) (@pred1 (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))))) *)
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (@pred_of_simpl (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G)))))))))) (_ : is_true (negb (@in_mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (predPredType (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))))) (@pred_of_simpl (Equality.sort (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G)))))) (@pred1 (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))))))), @ex2 (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G)))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (GRing.one (@cfun_ringType gT (@gval gT G)))))) *)
by rewrite !inE -(inj_eq irr_inj) irr0; exists i.
(* Goal: is_true (negb (@subset (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@SimplPred (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @in_mem (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))))) (@mem (Equality.sort (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G)))))) (simplPredType (Equality.sort (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))) (@pred1 (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))) (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))))) *)
rewrite (contra (@subset_leq_card _ _ _)) // -ltnNge card1 card_lin_irr.
(* Goal: is_true (leq (S (S O)) (@indexg gT (@gval gT G) (@derived_at (S O) gT (@gval gT G)))) *)
by rewrite indexg_gt1 proper_subn // (sol_der1_proper solG).
Qed.
Lemma lin_char_group G :
{linG : finGroupType & {cF : linG -> 'CF(G) |
[/\ injective cF, #|linG| = #|G : G^`(1)|,
forall u, cF u \is a linear_char
& forall phi, phi \is a linear_char -> exists u, phi = cF u]
& [/\ cF 1%g = 1%R,
{morph cF : u v / (u * v)%g >-> (u * v)%R},
forall k, {morph cF : u / (u^+ k)%g >-> u ^+ k},
{morph cF: u / u^-1%g >-> u^-1%CF}
& {mono cF: u / #[u]%g >-> #[u]%CF} ]}}.
Lemma cfExp_prime_transitive G (i j : Iirr G) :
prime #|G| -> i != 0 -> j != 0 ->
exists2 k, coprime k #['chi_i]%CF & 'chi_j = 'chi_i ^+ k.
Proof.
(* Goal: forall (_ : is_true (prime (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (_ : is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) i (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))))) (_ : is_true (negb (@eq_op (ordinal_eqType (S (@pred_Nirr gT (@gval gT G)))) j (GRing.zero (Zp_zmodType (@pred_Nirr gT (@gval gT G))))))), @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
set p := #|G| => pr_p nz_i nz_j; have cycG := prime_cyclic pr_p.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
have [L [h [injh oL Lh h_ontoL]] [h1 hM hX _ o_h]] := lin_char_group G.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
rewrite (derG1P (cyclic_abelian cycG)) indexg1 -/p in oL.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
have /fin_all_exists[h' h'K] := h_ontoL _ (irr_cyclic_lin _ cycG).
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
have o_h' k: k != 0 -> #[h' k] = p.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))) k (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))), @eq nat (@order L (h' k)) p *)
rewrite -cforder_irr_eq1 h'K -o_h => nt_h'k.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
(* Goal: @eq nat (@cforder gT (@gval gT G) (h (h' k))) p *)
by apply/prime_nt_dvdP=> //; rewrite cforder_lin_char_dvdG.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
have{oL} genL k: k != 0 -> generator [set: L] (h' k).
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
(* Goal: forall _ : is_true (negb (@eq_op (GRing.Zmodule.eqType (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))) k (GRing.zero (FinRing.Zmodule.zmodType (Zp_finZmodType (@pred_Nirr gT (@gval gT G))))))), is_true (@generator L (@setTfor (FinGroup.arg_finType (FinGroup.base L)) (Phant (FinGroup.arg_sort (FinGroup.base L)))) (h' k)) *)
move=> /o_h' o_h'k; rewrite /generator eq_sym eqEcard subsetT /=.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
(* Goal: is_true (leq (@card (FinGroup.arg_finType (FinGroup.base L)) (@mem (FinGroup.arg_sort (FinGroup.base L)) (predPredType (FinGroup.arg_sort (FinGroup.base L))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base L)) (@setTfor (FinGroup.arg_finType (FinGroup.base L)) (Phant (FinGroup.arg_sort (FinGroup.base L))))))) (@card (FinGroup.arg_finType (FinGroup.base L)) (@mem (FinGroup.arg_sort (FinGroup.base L)) (predPredType (FinGroup.arg_sort (FinGroup.base L))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base L)) (@cycle L (h' k)))))) *)
by rewrite cardsT oL -o_h'k.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
have [/(_ =P <[_]>)-> gen_j] := (genL i nz_i, genL j nz_j).
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
have /cycleP[k Dj] := cycle_generator gen_j.
(* Goal: @ex2 nat (fun k : nat => is_true (coprime k (@cforder gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (fun k : nat => @eq (@classfun gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) j) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) k)) *)
by rewrite !h'K Dj o_h hX generator_coprime coprime_sym in gen_j *; exists k.
Qed.
Lemma card_subcent1_coset G H x :
x \in G -> H <| G -> (#|'C_(G / H)[coset H x]| <= #|'C_G[x]|)%N.
Proof.
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@normal gT (@gval gT H) (@gval gT G))), is_true (leq (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (@coset_finType gT (@gval gT H)) (@coset gT (@gval gT H) x))))))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x))))))) *)
move=> Gx nsHG; rewrite -leC_nat.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (@coset_finType gT (@gval gT H)) (@coset gT (@gval gT H) x)))))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@normaliser gT (@set1 (FinGroup.arg_finType (FinGroup.base gT)) x)))))))) *)
move: (second_orthogonality_relation x Gx); rewrite mulrb class_refl => <-.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (@coset_finType gT (@gval gT H)) (@coset gT (@gval gT H) x)))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)))))) *)
have GHx: coset H x \in (G / H)%g by apply: mem_quotient.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (@coset_finType gT (@gval gT H)) (@coset gT (@gval gT H) x)))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)))))) *)
move: (second_orthogonality_relation (coset H x) GHx).
(* Goal: forall _ : @eq (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))) (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) i) (@coset gT (@gval gT H) x)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))) (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) i) (@coset gT (@gval gT H) x)))))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@setI (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@coset gT (@gval gT H) x)))))))) (nat_of_bool (@in_mem (FinGroup.arg_sort (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@coset gT (@gval gT H) x) (@mem (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType gT (@gval gT H))))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base (@coset_groupType gT (@gval gT H)))))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base (@coset_groupType gT (@gval gT H)))) (@class (@coset_groupType gT (@gval gT H)) (@coset gT (@gval gT H) x) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))))), is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@card (@coset_finType gT (@gval gT H)) (@mem (Finite.sort (@coset_finType gT (@gval gT H))) (predPredType (Finite.sort (@coset_finType gT (@gval gT H)))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT H)) (@setI (@coset_finType gT (@gval gT H)) (@quotient gT (@gval gT G) (@gval gT H)) (@normaliser (@coset_groupType gT (@gval gT H)) (@set1 (@coset_finType gT (@gval gT H)) (@coset gT (@gval gT H) x)))))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)))))) *)
rewrite mulrb class_refl => <-.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))) (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) i) (@coset gT (@gval gT H) x)) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))) (@tnth (S (@pred_Nirr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H))))) (@classfun (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) (@irr (@coset_groupType gT (@gval gT H)) (@gval (@coset_groupType gT (@gval gT H)) (@quotient_group gT G (@gval gT H)))) i) (@coset gT (@gval gT H) x)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)))))) *)
rewrite -2!(eq_bigr _ (fun _ _ => normCK _)) sum_norm_irr_quo // -subr_ge0.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@GRing.add (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType) (@BigOp.bigop (GRing.Ring.sort (Num.NumDomain.ringType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Ring.sort (Num.NumDomain.ringType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) true (@GRing.exp (Num.NumDomain.ringType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType)) (@Num.Def.normr (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) (S (S O))))) (@GRing.opp (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (GRing.zero (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@GRing.add (GRing.Ring.zmodType (Num.NumDomain.ringType Algebraics.Implementation.numDomainType))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@GRing.exp (Num.NumDomain.ringType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) (S (S O)))))))) *)
rewrite (bigID (fun i => H \subset cfker 'chi[G]_i)) //= addrC addKr.
(* Goal: is_true (@Num.Def.ler Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@BigOp.bigop Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody Algebraics.Implementation.type (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@GRing.add (GRing.Ring.zmodType (Num.NumDomain.ringType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType)))) (negb (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@GRing.exp (Num.NumDomain.ringType (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType)) (@Num.Def.normr (Num.ClosedField.numDomainType Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) (S (S O)))))) *)
by apply: sumr_ge0 => i _; rewrite normCK mul_conjC_ge0.
Qed.
End DerivedGroup.
Arguments irr_prime_injP {gT G i}.
Section DetOrder.
Variables (gT : finGroupType) (G : {group gT}).
Section DetRepr.
Variables (n : nat) (rG : mx_representation [fieldType of algC] G n).
Definition det_repr_mx x : 'M_1 := (\det (rG x))%:M.
Fact det_is_repr : mx_repr G det_repr_mx.
Proof.
(* Goal: @mx_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (S O) det_repr_mx *)
split=> [|g h Gg Gh]; first by rewrite /det_repr_mx repr_mx1 det1.
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O)) (det_repr_mx (@mulg (FinGroup.base gT) g h)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O) (S O) (det_repr_mx g) (det_repr_mx h)) *)
by rewrite /det_repr_mx repr_mxM // det_mulmx !mulmxE scalar_mxM.
Qed.
Canonical det_repr := MxRepresentation det_is_repr.
Definition detRepr := cfRepr det_repr.
Lemma detRepr_lin_char : detRepr \is a linear_char.
Proof.
(* Goal: is_true (@in_mem (@classfun gT (@gval gT G)) detRepr (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by rewrite qualifE cfRepr_char cfunE group1 repr_mx1 mxtrace1 mulr1n /=.
Qed.
End DetRepr.
Definition cfDet phi := \prod_i detRepr 'Chi_i ^+ truncC '[phi, 'chi[G]_i].
Lemma cfDet_lin_char phi : cfDet phi \is a linear_char.
Proof.
(* Goal: is_true (@in_mem (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet phi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))) *)
by apply: rpred_prod => i _; apply: rpredX; apply: detRepr_lin_char.
Qed.
Lemma cfDetD :
{in character &, {morph cfDet : phi psi / phi + psi >-> phi * psi}}.
Proof.
(* Goal: @prop_in2 (@classfun gT (@gval gT G)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))) (fun x y : @classfun gT (@gval gT G) => @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet ((fun phi psi : @classfun gT (@gval gT G) => @GRing.add (@cfun_zmodType gT (@gval gT G)) phi psi) x y)) ((fun phi psi : GRing.Ring.sort (@cfun_ringType gT (@gval gT G)) => @GRing.mul (@cfun_ringType gT (@gval gT G)) phi psi) (cfDet x) (cfDet y))) (inPhantom (@morphism_2 (@classfun gT (@gval gT G)) (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) cfDet (fun phi psi : @classfun gT (@gval gT G) => @GRing.add (@cfun_zmodType gT (@gval gT G)) phi psi) (fun phi psi : GRing.Ring.sort (@cfun_ringType gT (@gval gT G)) => @GRing.mul (@cfun_ringType gT (@gval gT G)) phi psi))) *)
move=> phi psi Nphi Npsi; rewrite /= -big_split; apply: eq_bigr => i _ /=.
(* Goal: @eq (@classfun gT (@gval gT G)) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@detRepr (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@socle_of_Iirr gT G i))) (truncC (@cfdot gT (@gval gT G) (@GRing.add (@cfun_zmodType gT (@gval gT G)) phi psi) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@GRing.mul (GRing.ComRing.ringType (@cfun_comRingType gT (@gval gT G))) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@detRepr (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@socle_of_Iirr gT G i))) (truncC (@cfdot gT (@gval gT G) phi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@detRepr (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G)) (@socle_of_Iirr gT G i))) (truncC (@cfdot gT (@gval gT G) psi (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
by rewrite -exprD cfdotDl truncCD ?nnegrE ?Cnat_ge0 // Cnat_cfdot_char_irr.
Qed.
Lemma cfDet0 : cfDet 0 = 1.
Proof.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet (GRing.zero (@cfun_zmodType gT (@gval gT G)))) (GRing.one (@cfun_ringType gT (@gval gT G))) *)
by rewrite /cfDet big1 // => i _; rewrite cfdot0l truncC0.
Qed.
Lemma cfDetMn k :
{in character, {morph cfDet : phi / phi *+ k >-> phi ^+ k}}.
Proof.
(* Goal: @prop_in1 (@classfun gT (@gval gT G)) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))) (fun x : @classfun gT (@gval gT G) => @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet ((fun phi : @classfun gT (@gval gT G) => @GRing.natmul (@cfun_zmodType gT (@gval gT G)) phi k) x)) ((fun phi : GRing.Ring.sort (@cfun_ringType gT (@gval gT G)) => @GRing.exp (@cfun_ringType gT (@gval gT G)) phi k) (cfDet x))) (inPhantom (@morphism_1 (@classfun gT (@gval gT G)) (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) cfDet (fun phi : @classfun gT (@gval gT G) => @GRing.natmul (@cfun_zmodType gT (@gval gT G)) phi k) (fun phi : GRing.Ring.sort (@cfun_ringType gT (@gval gT G)) => @GRing.exp (@cfun_ringType gT (@gval gT G)) phi k))) *)
move=> phi Nphi; elim: k => [|k IHk]; rewrite ?cfDet0 // mulrS exprS -{}IHk.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet (@GRing.add (@cfun_zmodType gT (@gval gT G)) phi (@GRing.natmul (@cfun_zmodType gT (@gval gT G)) phi k))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (cfDet phi) (cfDet (@GRing.natmul (@cfun_zmodType gT (@gval gT G)) phi k))) *)
by rewrite cfDetD ?rpredMn.
Qed.
Lemma cfDetRepr n rG : cfDet (cfRepr rG) = @detRepr n rG.
Lemma cfDet_id xi : xi \is a linear_char -> cfDet xi = xi.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))), @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet xi) xi *)
move=> lin_xi; have /irrP[i Dxi] := lin_char_irr lin_xi.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (cfDet xi) xi *)
apply/cfun_inP=> x Gx; rewrite Dxi -irrRepr cfDetRepr !cfunE trace_mx11 mxE.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@determinant (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) x)) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S O))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) gT G (@DecSocleType Algebraics.Implementation.decFieldType gT G (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G)) (@socle_of_Iirr gT G i)) x)) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
move: lin_xi (_ x) => /andP[_]; rewrite Dxi irr1_degree pnatr_eq1 => /eqP-> X.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@determinant (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) X) (nat_of_bool (@eq_op (Finite.eqType (ordinal_finType (S O))) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O))))) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) X) (nat_of_bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))))) *)
by rewrite {1}[X]mx11_scalar det_scalar1 trace_mx11.
Qed.
Definition cfDet_order phi := #[cfDet phi]%CF.
Definition cfDet_order_lin xi :
xi \is a linear_char -> cfDet_order xi = #[xi]%CF.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) xi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G))))), @eq nat (cfDet_order xi) (@cforder gT (@gval gT G) xi) *)
by rewrite /cfDet_order => /cfDet_id->.
Qed.
Definition cfDet_order_dvdG phi : cfDet_order phi %| #|G|.
Proof.
(* Goal: is_true (dvdn (cfDet_order phi) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) *)
by rewrite cforder_lin_char_dvdG ?cfDet_lin_char.
Qed.
End DetOrder.
Notation "''o' ( phi )" := (cfDet_order phi)
(at level 8, format "''o' ( phi )") : cfun_scope.
Section CfDetOps.
Implicit Types gT aT rT : finGroupType.
Lemma cfDetRes gT (G H : {group gT}) phi :
phi \is a character -> cfDet ('Res[H, G] phi) = 'Res (cfDet phi).
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))), @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
move=> Nphi; have [sGH | not_sHG] := boolP (H \subset G); last first.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
have /CnatP[n Dphi1] := Cnat_char1 Nphi.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
rewrite !cfResEout // Dphi1 lin_char1 ?cfDet_lin_char // scale1r.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@GRing.scale Algebraics.Implementation.ringType (@GRing.Lalgebra.lmod_ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType gT (@gval gT H))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType gT (@gval gT H)))))) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType gT (@gval gT H)))) *)
by rewrite scaler_nat cfDetMn ?cfDet_id ?rpred1 // expr1n.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@cfDet gT H (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@cfRes gT (@gval gT H) (@gval gT G) (@cfDet gT G phi)) *)
have [rG ->] := char_reprP Nphi; rewrite !(=^~ cfRepr_sub, cfDetRepr) //.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT H))) (@detRepr gT H (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G H (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) sGH)) (@cfRepr gT H (S O) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G H (S O) (@det_repr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) sGH)) *)
apply: cfRepr_sim; exists 1%:M; rewrite ?row_free_unit ?unitmx1 // => x Hx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (S O) (S O)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT H) (S O) (@det_repr gT H (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G H (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) sGH)) x) (@scalar_mx (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (S O) (GRing.one (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (@mulmx (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (S O) (S O) (S O) (@scalar_mx (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (S O) (GRing.one (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT H) (S O) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G H (S O) (@det_repr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) sGH) x)) *)
by rewrite mulmx1 mul1mx.
Qed.
Lemma cfDetMorph aT rT (D G : {group aT}) (f : {morphism D >-> rT})
(phi : 'CF(f @* G)) :
phi \is a character -> cfDet (cfMorph phi) = cfMorph (cfDet phi).
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) phi (@mem (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (predPredType (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))) (@has_quality (S O) (@classfun rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G))) (@character rT (@morphim aT rT (@gval aT D) f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) (@gval aT G)))))), @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
move=> Nphi; have [sGD | not_sGD] := boolP (G \subset D); last first.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
have /CnatP[n Dphi1] := Cnat_char1 Nphi.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
rewrite !cfMorphEout // Dphi1 lin_char1 ?cfDet_lin_char // scale1r.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@GRing.scale Algebraics.Implementation.ringType (@GRing.Lalgebra.lmod_ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType aT (@gval aT G))) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) n) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType aT (@gval aT G)))))) (GRing.one (@GRing.Lalgebra.ringType Algebraics.Implementation.ringType (Phant (GRing.Ring.sort Algebraics.Implementation.ringType)) (@cfun_lalgType aT (@gval aT G)))) *)
by rewrite scaler_nat cfDetMn ?cfDet_id ?rpred1 // expr1n.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@cfDet aT G (@cfMorph aT rT D f G phi)) (@cfMorph aT rT D f G (@cfDet rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) phi)) *)
have [rG ->] := char_reprP Nphi; rewrite !(=^~ cfRepr_morphim, cfDetRepr) //.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType aT (@gval aT G))) (@detRepr aT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) (@morphim_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT rT G D f (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) sGD)) (@cfRepr aT G (S O) (@morphim_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT rT G D f (S O) (@det_repr rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG)) sGD)) *)
apply: cfRepr_sim; exists 1%:M; rewrite ?row_free_unit ?unitmx1 // => x Hx.
(* Goal: @eq (matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (S O) (S O)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT (@gval aT G) (S O) (@det_repr aT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) (@morphim_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT rT G D f (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) sGD)) x) (@scalar_mx (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (S O) (GRing.one (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))) (@mulmx (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (S O) (S O) (S O) (@scalar_mx (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) (S O) (GRing.one (GRing.Field.ringType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT (@gval aT G) (S O) (@morphim_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT rT G D f (S O) (@det_repr rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) rT (@morphim_group aT rT D f (@MorPhantom aT rT (@mfun aT rT (@gval aT D) f)) G) rG)) sGD) x)) *)
by rewrite mulmx1 mul1mx.
Qed.
Lemma cfDetIsom aT rT (G : {group aT}) (R : {group rT})
(f : {morphism G >-> rT}) (isoGR : isom G R f) phi :
cfDet (cfIsom isoGR phi) = cfIsom isoGR (cfDet phi).
Proof.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (@cfDet rT R (@cfIsom aT rT G f R isoGR phi)) (@cfIsom aT rT G f R isoGR (@cfDet aT G phi)) *)
rewrite rmorph_prod /cfDet (reindex (isom_Iirr isoGR)); last first.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (@BigOp.bigop (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (GRing.one (@cfun_ringType rT (@gval rT R))) (index_enum (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G)))) => @BigBody (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) j (@Monoid.operator (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (GRing.one (@cfun_ringType rT (@gval rT R))) (@Monoid.com_operator (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (GRing.one (@cfun_ringType rT (@gval rT R))) (GRing.mul_comoid (@cfun_comRingType rT (@gval rT R))))) true (@GRing.exp (@cfun_ringType rT (@gval rT R)) (@detRepr rT R (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) rT R (@DecSocleType Algebraics.Implementation.decFieldType rT R (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) rT R)) (@socle_of_Iirr rT R (@isom_Iirr aT rT G f R isoGR j))) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) rT R (@DecSocleType Algebraics.Implementation.decFieldType rT R (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) rT R)) (@socle_of_Iirr rT R (@isom_Iirr aT rT G f R isoGR j)))) (truncC (@cfdot rT (@gval rT R) (@cfIsom aT rT G f R isoGR phi) (@tnth (S (@pred_Nirr rT (@gval rT R))) (@classfun rT (@gval rT R)) (@irr rT (@gval rT R)) (@isom_Iirr aT rT G f R isoGR j))))))) (@BigOp.bigop (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (GRing.one (@cfun_ringType rT (@gval rT R))) (index_enum (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G)))) => @BigBody (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) i (@GRing.mul (@cfun_ringType rT (@gval rT R))) true (@GRing.RMorphism.apply (@cfun_ringType aT (@gval aT G)) (@cfun_ringType rT (@gval rT R)) (Phant (forall _ : GRing.Ring.sort (@cfun_ringType aT (@gval aT G)), GRing.Ring.sort (@cfun_ringType rT (@gval rT R)))) (@cfIsom_rmorphism aT rT G f R isoGR) (@GRing.exp (@cfun_ringType aT (@gval aT G)) (@detRepr aT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) aT G (@DecSocleType Algebraics.Implementation.decFieldType aT G (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT G)) (@socle_of_Iirr aT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) aT G (@DecSocleType Algebraics.Implementation.decFieldType aT G (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT G)) (@socle_of_Iirr aT G i))) (truncC (@cfdot aT (@gval aT G) phi (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i))))))) *)
(* Goal: @bijective_on (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (Finite.sort (ordinal_finType (S (@pred_Nirr rT (@gval rT R))))) (@mem (Finite.sort (ordinal_finType (S (@pred_Nirr rT (@gval rT R))))) (simplPredType (Finite.sort (ordinal_finType (S (@pred_Nirr rT (@gval rT R)))))) (@SimplPred (Finite.sort (ordinal_finType (S (@pred_Nirr rT (@gval rT R))))) (fun _ : Finite.sort (ordinal_finType (S (@pred_Nirr rT (@gval rT R)))) => true))) (@isom_Iirr aT rT G f R isoGR) *)
by exists (isom_Iirr (isom_sym isoGR)) => i; rewrite ?isom_IirrK ?isom_IirrKV.
(* Goal: @eq (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (@BigOp.bigop (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (GRing.one (@cfun_ringType rT (@gval rT R))) (index_enum (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (fun j : Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G)))) => @BigBody (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) j (@Monoid.operator (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (GRing.one (@cfun_ringType rT (@gval rT R))) (@Monoid.com_operator (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (GRing.one (@cfun_ringType rT (@gval rT R))) (GRing.mul_comoid (@cfun_comRingType rT (@gval rT R))))) true (@GRing.exp (@cfun_ringType rT (@gval rT R)) (@detRepr rT R (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) rT R (@DecSocleType Algebraics.Implementation.decFieldType rT R (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) rT R)) (@socle_of_Iirr rT R (@isom_Iirr aT rT G f R isoGR j))) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) rT R (@DecSocleType Algebraics.Implementation.decFieldType rT R (@card (FinGroup.arg_finType (FinGroup.base rT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base rT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base rT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base rT)) (@gval rT R)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) rT R)) (@socle_of_Iirr rT R (@isom_Iirr aT rT G f R isoGR j)))) (truncC (@cfdot rT (@gval rT R) (@cfIsom aT rT G f R isoGR phi) (@tnth (S (@pred_Nirr rT (@gval rT R))) (@classfun rT (@gval rT R)) (@irr rT (@gval rT R)) (@isom_Iirr aT rT G f R isoGR j))))))) (@BigOp.bigop (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (GRing.one (@cfun_ringType rT (@gval rT R))) (index_enum (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G)))) => @BigBody (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (Finite.sort (ordinal_finType (S (@pred_Nirr aT (@gval aT G))))) i (@GRing.mul (@cfun_ringType rT (@gval rT R))) true (@GRing.RMorphism.apply (@cfun_ringType aT (@gval aT G)) (@cfun_ringType rT (@gval rT R)) (Phant (forall _ : GRing.Ring.sort (@cfun_ringType aT (@gval aT G)), GRing.Ring.sort (@cfun_ringType rT (@gval rT R)))) (@cfIsom_rmorphism aT rT G f R isoGR) (@GRing.exp (@cfun_ringType aT (@gval aT G)) (@detRepr aT G (@irr_degree (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) aT G (@DecSocleType Algebraics.Implementation.decFieldType aT G (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT G)) (@socle_of_Iirr aT G i)) (@irr_repr (GRing.DecidableField.fieldType Algebraics.Implementation.decFieldType) aT G (@DecSocleType Algebraics.Implementation.decFieldType aT G (@card (FinGroup.arg_finType (FinGroup.base aT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base aT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base aT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base aT)) (@gval aT G)))) (@regular_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) aT G)) (@socle_of_Iirr aT G i))) (truncC (@cfdot aT (@gval aT G) phi (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i))))))) *)
apply: eq_bigr => i; rewrite -!cfDetRepr !irrRepr isom_IirrE rmorphX cfIsom_iso.
(* Goal: forall _ : is_true true, @eq (GRing.Ring.sort (@cfun_ringType rT (@gval rT R))) (@GRing.exp (@cfun_ringType rT (@gval rT R)) (@cfDet rT R (@cfIsom aT rT G f R isoGR (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i))) (truncC (@cfdot aT (@gval aT G) phi (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i)))) (@GRing.exp (@cfun_ringType rT (@gval rT R)) (@GRing.RMorphism.apply (@cfun_ringType aT (@gval aT G)) (@cfun_ringType rT (@gval rT R)) (Phant (forall _ : GRing.Ring.sort (@cfun_ringType aT (@gval aT G)), GRing.Ring.sort (@cfun_ringType rT (@gval rT R)))) (@cfIsom_rmorphism aT rT G f R isoGR) (@cfDet aT G (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i))) (truncC (@cfdot aT (@gval aT G) phi (@tnth (S (@pred_Nirr aT (@gval aT G))) (@classfun aT (@gval aT G)) (@irr aT (@gval aT G)) i)))) *)
by rewrite /= ![in cfIsom _]unlock cfDetMorph ?cfRes_char ?cfDetRes ?irr_char.
Qed.
Lemma cfDet_mul_lin gT (G : {group gT}) (lambda phi : 'CF(G)) :
lambda \is a linear_char -> phi \is a character ->
cfDet (lambda * phi) = lambda ^+ truncC (phi 1%g) * cfDet phi.
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) lambda (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@linear_char gT (@gval gT G)))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))), @eq (GRing.Ring.sort (@cfun_ringType gT (@gval gT G))) (@cfDet gT G (@GRing.mul (@cfun_ringType gT (@gval gT G)) lambda phi)) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@GRing.exp (@cfun_ringType gT (@gval gT G)) lambda (truncC (@fun_of_cfun gT (@gval gT G) phi (oneg (FinGroup.base gT))))) (@cfDet gT G phi)) *)
case/andP=> /char_reprP[[n1 rG1] ->] /= n1_1 /char_reprP[[n2 rG2] ->] /=.
(* Goal: @eq (@classfun gT (@gval gT G)) (@cfDet gT G (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G n1 rG1) (@cfRepr gT G n2 rG2))) (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G n1 rG1) (truncC (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G n2 rG2) (oneg (FinGroup.base gT))))) (@cfDet gT G (@cfRepr gT G n2 rG2))) *)
do [rewrite !cfRepr1 pnatr_eq1 natCK; move/eqP] in n1_1 *.
rewrite {n1}n1_1 in rG1 *; rewrite cfRepr_prod cfDetRepr.
apply/cfun_inP=> x Gx; rewrite !cfunE cfDetRepr cfunE Gx !mulrb !trace_mx11.
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT G) (@cfDet gT G (@GRing.mul (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G n1 rG1) (@cfRepr gT G n2 rG2))) x) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) (@GRing.exp (@cfun_ringType gT (@gval gT G)) (@cfRepr gT G n1 rG1) (truncC (if @in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (oneg (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))) then @mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) n2 (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) n2 rG2 (oneg (FinGroup.base gT))) else GRing.zero (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))))))) x) (@fun_of_matrix (GRing.Ring.sort (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (S O) (S O) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (S O) (@det_repr gT G n2 rG2) x) (GRing.zero (Zp_zmodType O)) (GRing.zero (Zp_zmodType O)))) *)
rewrite !mxE prod_repr_lin ?mulrb //=; case: _ / (esym _); rewrite detZ.
congr (_ * _); case: {rG2}n2 => [|n2]; first by rewrite cfun1E Gx.
by rewrite expS_cfunE //= cfunE Gx trace_mx11.
Qed.
Qed.
End CfDetOps.
Definition cfcenter (gT : finGroupType) (G : {set gT}) (phi : 'CF(G)) :=
if phi \is a character then [set g in G | `|phi g| == phi 1%g] else cfker phi.
Notation "''Z' ( phi )" := (cfcenter phi) : cfun_scope.
Section Center.
Variable (gT : finGroupType) (G : {group gT}).
Implicit Types (phi chi : 'CF(G)) (H : {group gT}).
Lemma cfcenter_repr n (rG : mx_representation algCF G n) :
'Z(cfRepr rG)%CF = rcenter rG.
Fact cfcenter_group_set phi : group_set ('Z(phi))%CF.
Proof.
(* Goal: is_true (@group_set gT (@cfcenter gT (@gval gT G) phi)) *)
have [[rG ->] | /negbTE notNphi] := altP (@char_reprP _ G phi).
(* Goal: is_true (@group_set gT (@cfcenter gT (@gval gT G) phi)) *)
(* Goal: is_true (@group_set gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) *)
by rewrite cfcenter_repr groupP.
(* Goal: is_true (@group_set gT (@cfcenter gT (@gval gT G) phi)) *)
by rewrite /cfcenter notNphi groupP.
Qed.
Canonical cfcenter_group f := Group (cfcenter_group_set f).
Lemma char_cfcenterE chi x :
chi \is a character -> x \in G ->
(x \in ('Z(chi))%CF) = (`|chi x| == chi 1%g).
Proof.
(* Goal: forall (_ : is_true (@in_mem (@classfun gT (@gval gT G)) chi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))), @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfcenter gT (@gval gT G) chi)))) (@eq_op (Num.NumDomain.eqType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) chi x)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT)))) *)
by move=> Nchi Gx; rewrite /cfcenter Nchi inE Gx.
Qed.
Lemma irr_cfcenterE i x :
x \in G -> (x \in 'Z('chi[G]_i)%CF) = (`|'chi_i x| == 'chi_i 1%g).
Proof.
(* Goal: forall _ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (@eq_op (Num.NumDomain.eqType Algebraics.Implementation.numDomainType) (@Num.Def.normr Algebraics.Implementation.numDomainType (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) x)) (@fun_of_cfun gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i) (oneg (FinGroup.base gT)))) *)
by move/char_cfcenterE->; rewrite ?irr_char.
Qed.
Lemma cfcenter_sub phi : ('Z(phi))%CF \subset G.
Proof.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfcenter gT (@gval gT G) phi))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) *)
by rewrite /cfcenter /cfker !setIdE -fun_if subsetIl.
Qed.
Lemma cfker_center_normal phi : cfker phi <| 'Z(phi)%CF.
Lemma cfcenter_normal phi : 'Z(phi)%CF <| G.
Proof.
(* Goal: is_true (@normal gT (@cfcenter gT (@gval gT G) phi) (@gval gT G)) *)
have [[rG ->] | /negbTE notNphi] := altP (@char_reprP _ _ phi).
(* Goal: is_true (@normal gT (@cfcenter gT (@gval gT G) phi) (@gval gT G)) *)
(* Goal: is_true (@normal gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@gval gT G)) *)
by rewrite cfcenter_repr rcenter_normal.
(* Goal: is_true (@normal gT (@cfcenter gT (@gval gT G) phi) (@gval gT G)) *)
by rewrite /cfcenter notNphi cfker_normal.
Qed.
Lemma cfcenter_Res chi :
exists2 chi1, chi1 \is a linear_char & 'Res['Z(chi)%CF] chi = chi 1%g *: chi1.
Proof.
(* Goal: @ex2 (@classfun gT (@cfcenter gT (@gval gT G) chi)) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) chi) => is_true (@in_mem (@classfun gT (@cfcenter gT (@gval gT G) chi)) chi1 (@mem (@classfun gT (@cfcenter gT (@gval gT G) chi)) (predPredType (@classfun gT (@cfcenter gT (@gval gT G) chi))) (@has_quality (S O) (@classfun gT (@cfcenter gT (@gval gT G) chi)) (@linear_char gT (@cfcenter gT (@gval gT G) chi)))))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) chi) => @eq (@classfun gT (@cfcenter gT (@gval gT G) chi)) (@cfRes gT (@cfcenter gT (@gval gT G) chi) (@gval gT G) chi) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) chi)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) chi1)) *)
have [[rG ->] | /negbTE notNphi] := altP (@char_reprP _ _ chi); last first.
(* Goal: @ex2 (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => is_true (@in_mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) chi1 (@mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (predPredType (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))))) (@has_quality (S O) (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@linear_char gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))))))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => @eq (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@cfRes gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT))) chi1)) *)
(* Goal: @ex2 (@classfun gT (@cfcenter gT (@gval gT G) chi)) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) chi) => is_true (@in_mem (@classfun gT (@cfcenter gT (@gval gT G) chi)) chi1 (@mem (@classfun gT (@cfcenter gT (@gval gT G) chi)) (predPredType (@classfun gT (@cfcenter gT (@gval gT G) chi))) (@has_quality (S O) (@classfun gT (@cfcenter gT (@gval gT G) chi)) (@linear_char gT (@cfcenter gT (@gval gT G) chi)))))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) chi) => @eq (@classfun gT (@cfcenter gT (@gval gT G) chi)) (@cfRes gT (@cfcenter gT (@gval gT G) chi) (@gval gT G) chi) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) chi)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) chi1)) *)
exists 1; first exact: cfun1_lin_char.
(* Goal: @ex2 (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => is_true (@in_mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) chi1 (@mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (predPredType (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))))) (@has_quality (S O) (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@linear_char gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))))))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => @eq (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@cfRes gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT))) chi1)) *)
(* Goal: @eq (@classfun gT (@cfcenter gT (@gval gT G) chi)) (@cfRes gT (@cfcenter gT (@gval gT G) chi) (@gval gT G) chi) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) chi)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (GRing.one (@cfun_ringType gT (@cfcenter gT (@gval gT G) chi)))) *)
rewrite /cfcenter notNphi; apply/cfun_inP=> x Kx.
(* Goal: @ex2 (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => is_true (@in_mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) chi1 (@mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (predPredType (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))))) (@has_quality (S O) (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@linear_char gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))))))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => @eq (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@cfRes gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT))) chi1)) *)
(* Goal: @eq Algebraics.Implementation.type (@fun_of_cfun gT (@gval gT (@cfker_group gT G chi)) (@cfRes gT (@cfker gT (@gval gT G) chi) (@gval gT G) chi) x) (@fun_of_cfun gT (@gval gT (@cfker_group gT G chi)) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfker gT (@gval gT G) chi)) (@fun_of_cfun gT (@gval gT G) chi (oneg (FinGroup.base gT))) (GRing.one (@cfun_ringType gT (@cfker gT (@gval gT G) chi)))) x) *)
by rewrite cfunE cfun1E Kx mulr1 cfResE ?cfker_sub // cfker1.
(* Goal: @ex2 (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => is_true (@in_mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) chi1 (@mem (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (predPredType (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))))) (@has_quality (S O) (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@linear_char gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))))))) (fun chi1 : @classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) => @eq (@classfun gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@cfRes gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@cfcenter gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT))) chi1)) *)
rewrite cfcenter_repr -(cfRepr_sub _ (normal_sub (rcenter_normal _))).
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG))) (@fun_of_cfun gT (@gval gT G) (@cfRepr gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (oneg (FinGroup.base gT))) chi1)) *)
case: rG => [[|n] rG] /=; rewrite cfRepr1.
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) O (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) O rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) O) chi1)) *)
exists 1; first exact: cfun1_lin_char.
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
(* Goal: @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) O (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) O rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) O) (GRing.one (@cfun_ringType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G O rG)))) *)
by apply/cfun_inP=> x Zx; rewrite scale0r !cfunE flatmx0 raddf0 Zx.
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
pose rZmx x := ((rG x 0 0)%:M : 'M_(1,1)).
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
have rZmxP: mx_repr [group of rcenter rG] rZmx.
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
(* Goal: @mx_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG)))) (S O) rZmx *)
split=> [|x y]; first by rewrite /rZmx repr_mx1 mxE eqxx.
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
(* Goal: forall (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG)))))))) (_ : is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG)))))))), @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O)) (rZmx (@mulg (FinGroup.base gT) x y)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O) (S O) (rZmx x) (rZmx y)) *)
move=> /setIdP[Gx /is_scalar_mxP[a rGx]] /setIdP[Gy /is_scalar_mxP[b rGy]].
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
(* Goal: @eq (matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O)) (rZmx (@mulg (FinGroup.base gT) x y)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (S O) (S O) (rZmx x) (rZmx y)) *)
by rewrite /rZmx repr_mxM // rGx rGy -!scalar_mxM !mxE.
(* Goal: @ex2 (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) chi1 (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))))) (fun chi1 : @classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) => @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) chi1)) *)
exists (cfRepr (MxRepresentation rZmxP)).
(* Goal: @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) (@cfRepr gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG))) (S O) (@MxRepresentation (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG)))) (S O) rZmx rZmxP))) *)
(* Goal: is_true (@in_mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG))) (S O) (@MxRepresentation (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG)))) (S O) rZmx rZmxP)) (@mem (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (predPredType (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))) (@has_quality (S O) (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@linear_char gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG))))) *)
by rewrite qualifE cfRepr_char cfRepr1 eqxx.
(* Goal: @eq (@classfun gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@cfRepr gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) (@subg_repr (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (S n) rG (@normal_sub gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG) (@gval gT G) (@rcenter_normal (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)))) (@GRing.scale Algebraics.Implementation.ringType (@cfun_lmodType gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT G (S n) rG)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (S n)) (@cfRepr gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG))) (S O) (@MxRepresentation (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT (@clone_group gT (@rcenter_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG) (@group gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (S n) rG)))) (S O) rZmx rZmxP))) *)
apply/cfun_inP=> x Zx; rewrite !cfunE Zx /= /rZmx mulr_natl.
(* Goal: @eq Algebraics.Implementation.type (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (S n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) (S n) rG x)) (S O)) (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@GRing.natmul (GRing.Ring.zmodType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (@mxtrace (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (S O) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S O) (@fun_of_matrix (GRing.ComUnitRing.sort (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)))) (S n) (S n) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (S n) rG x) (GRing.zero (Zp_zmodType n)) (GRing.zero (Zp_zmodType n))))) (S O)) (S n)) *)
by case/setIdP: Zx => Gx /is_scalar_mxP[a ->]; rewrite mxE !mxtrace_scalar.
Qed.
Lemma cfcenter_cyclic chi : cyclic ('Z(chi)%CF / cfker chi)%g.
Lemma cfcenter_subset_center chi :
('Z(chi)%CF / cfker chi)%g \subset 'Z(G / cfker chi)%g.
Proof.
(* Goal: is_true (@subset (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@mem (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi))) (predPredType (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi)))) (@SetDef.pred_of_set (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@cfcenter gT (@gval gT G) chi) (@cfker gT (@gval gT G) chi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))) (@center (@coset_groupType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) chi)))))) *)
case Nchi: (chi \is a character); last first.
(* Goal: is_true (@subset (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@mem (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi))) (predPredType (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi)))) (@SetDef.pred_of_set (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@cfcenter gT (@gval gT G) chi) (@cfker gT (@gval gT G) chi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))) (@center (@coset_groupType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) chi)))))) *)
(* Goal: is_true (@subset (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@mem (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi))) (predPredType (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi)))) (@SetDef.pred_of_set (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@cfcenter gT (@gval gT G) chi) (@cfker gT (@gval gT G) chi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))) (@center (@coset_groupType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) chi)))))) *)
by rewrite /cfcenter Nchi trivg_quotient sub1G.
(* Goal: is_true (@subset (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@mem (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi))) (predPredType (Finite.sort (@coset_finType gT (@cfker gT (@gval gT G) chi)))) (@SetDef.pred_of_set (@coset_finType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@cfcenter gT (@gval gT G) chi) (@cfker gT (@gval gT G) chi)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@cfker gT (@gval gT G) chi)))) (@center (@coset_groupType gT (@cfker gT (@gval gT G) chi)) (@quotient gT (@gval gT G) (@cfker gT (@gval gT G) chi)))))) *)
rewrite subsetI quotientS ?cfcenter_sub // quotient_cents2r //=.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commutator gT (@cfcenter gT (@gval gT G) chi) (@gval gT G)))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) chi)))) *)
case/char_reprP: Nchi => rG ->{chi}; rewrite cfker_repr cfcenter_repr gen_subG.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@commg_set gT (@rcenter (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)) (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@rker_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))))) *)
apply/subsetP=> _ /imset2P[x y /setIdP[Gx /is_scalar_mxP[c rGx]] Gy ->].
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (@commg gT x y) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@rker_group (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT G (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG)))))) *)
rewrite inE groupR //= !repr_mxM ?groupM ?groupV // rGx -(scalar_mxC c) -rGx.
(* Goal: is_true (@eq_op (matrix_eqType (GRing.Ring.eqType (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))))) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@invg (FinGroup.base gT) x)) (@mulmx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@invg (FinGroup.base gT) y)) (@mulmx (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))) gT (@gval gT G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) y) (@repr_mx (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x))) gT (@gval gT G) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) (@mx_repr_of_repr (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (GRing.Field.class Algebraics.Implementation.fieldType) (fun x : phantom (GRing.Field.class_of (GRing.Field.sort Algebraics.Implementation.fieldType)) (GRing.Field.class Algebraics.Implementation.fieldType) => x)) gT G rG) x))))) (@scalar_mx (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)))) (@rdegree (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x)) gT G rG) (GRing.one (GRing.ComUnitRing.ringType (GRing.Field.comUnitRingType (@GRing.Field.clone Algebraics.Implementation.type Algebraics.Implementation.fieldType (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) (fun x : phantom (GRing.Field.class_of Algebraics.Implementation.type) (@GRing.Field.Class Algebraics.Implementation.type (@GRing.IntegralDomain.Class Algebraics.Implementation.type (@GRing.ComUnitRing.Class Algebraics.Implementation.type (@GRing.ComRing.Class Algebraics.Implementation.type (@GRing.Ring.Class Algebraics.Implementation.type (@GRing.Zmodule.Class Algebraics.Implementation.type (@Choice.Class Algebraics.Implementation.type Algebraics.Implementation.eqMixin Algebraics.Implementation.choiceMixin) Algebraics.Implementation.zmodMixin) Algebraics.Implementation.ringMixin) Algebraics.Implementation.mulC) Algebraics.Implementation.unitRingMixin) Algebraics.Implementation.idomainAxiom) Algebraics.Implementation.fieldMixin) => x))))))) *)
by rewrite !mulmxA !repr_mxKV.
Qed.
Lemma cfcenter_eq_center (i : Iirr G) :
('Z('chi_i)%CF / cfker 'chi_i)%g = 'Z(G / cfker 'chi_i)%g.
Lemma cap_cfcenter_irr : \bigcap_i 'Z('chi[G]_i)%CF = 'Z(G).
Proof.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@center gT (@gval gT G)) *)
apply/esym/eqP; rewrite eqEsubset (introT bigcapsP) /= => [|i _]; last first.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
rewrite -(quotientSGK _ (normal_sub (cfker_center_normal _))).
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) *)
(* Goal: is_true (@subset (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@quotient gT (@center gT (@gval gT G)) (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@quotient gT (@gval gT (cfcenter_group (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) *)
by rewrite cfcenter_eq_center morphim_center.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@normaliser gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) *)
by rewrite subIset // normal_norm // cfker_normal.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (FinGroup.arg_sort (FinGroup.base gT)))) (ordinal (S (@pred_Nirr gT (@gval gT G)))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
set Z := \bigcap_i _.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Z)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
have sZG: Z \subset G by rewrite (bigcap_min 0) ?cfcenter_sub.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Z)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@center gT (@gval gT G))))) *)
rewrite subsetI sZG (sameP commG1P trivgP) -(TI_cfker_irr G).
(* Goal: is_true (andb true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@commutator_group gT Z (@gval gT G))))) (@mem (Finite.sort (FinGroup.finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.finType (FinGroup.base gT)) (@BigOp.bigop (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (@setTfor (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (index_enum (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) (fun i : Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G)))) => @BigBody (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (Finite.sort (ordinal_finType (S (@pred_Nirr gT (@gval gT G))))) i (@setI (FinGroup.arg_finType (FinGroup.base gT))) true (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))) *)
apply/bigcapsP=> i _; have nKiG := normal_norm (cfker_normal 'chi_i).
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT (@commutator_group gT Z (@gval gT G))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
rewrite -quotient_cents2 ?(subset_trans sZG) //.
(* Goal: is_true (@subset (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@quotient gT Z (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@centraliser (@coset_groupType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@quotient gT (@gval gT G) (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))) *)
rewrite (subset_trans (quotientS _ (bigcap_inf i _))) //.
(* Goal: is_true (@subset (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@SetDef.pred_of_set (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@quotient gT (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@mem (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) (predPredType (Finite.sort (@coset_finType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base (@coset_groupType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) (@centraliser (@coset_groupType gT (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))) (@quotient gT (@gval gT G) (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))))) *)
by rewrite cfcenter_eq_center subsetIr.
Qed.
Lemma cfnorm_Res_lerif H phi :
H \subset G ->
'['Res[H] phi] <= #|G : H|%:R * '[phi] ?= iff (phi \in 'CF(G, H)).
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @Num.Def.lerif Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@GRing.mul (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@indexg gT (@gval gT G) (@gval gT H))) (@cfdot gT (@gval gT G) phi phi)) (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@Vector.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G))) (predPredType (@Vector.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G)))) (@pred_of_vspace Algebraics.Implementation.fieldType (@cfun_vectType gT (@gval gT G)) (Phant (@Vector.sort (GRing.Field.ringType Algebraics.Implementation.fieldType) (Phant (GRing.Field.sort Algebraics.Implementation.fieldType)) (@cfun_vectType gT (@gval gT G)))) (@classfun_on gT (@gval gT G) (@gval gT H))))) *)
move=> sHG; rewrite cfun_onE mulrCA natf_indexg // -mulrA mulKf ?neq0CG //.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType Algebraics.Implementation.comUnitRingType)) (@GRing.inv (Num.NumField.unitRingType Algebraics.Implementation.numFieldType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.NumField.unitRingType Algebraics.Implementation.numFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.NumField.unitRingType Algebraics.Implementation.numFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi x)))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (simplPredType (FinGroup.arg_sort (FinGroup.base gT))) (@support_for (FinGroup.arg_sort (FinGroup.base gT)) (GRing.Zmodule.eqType Algebraics.Implementation.zmodType) (GRing.zero Algebraics.Implementation.zmodType) (@fun_of_cfun gT (@gval gT G) phi))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite (big_setID H) (setIidPr sHG) /= addrC.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (@cfdot gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@GRing.mul (GRing.ComRing.ringType (GRing.ComUnitRing.comRingType Algebraics.Implementation.comUnitRingType)) (@GRing.inv (Num.NumField.unitRingType Algebraics.Implementation.numFieldType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType (Num.NumField.unitRingType Algebraics.Implementation.numFieldType))) (GRing.one (GRing.UnitRing.ringType (Num.NumField.unitRingType Algebraics.Implementation.numFieldType))) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))))) (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (simplPredType (FinGroup.arg_sort (FinGroup.base gT))) (@support_for (FinGroup.arg_sort (FinGroup.base gT)) (GRing.Zmodule.eqType Algebraics.Implementation.zmodType) (GRing.zero Algebraics.Implementation.zmodType) (@fun_of_cfun gT (@gval gT G) phi))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite (mono_lerif (ler_pmul2l _)) ?invr_gt0 ?gt0CG // -lerif_subLR -sumrB.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (@BigOp.bigop (GRing.Zmodule.sort (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@GRing.add (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType, Num.ClosedField.sort Algebraics.Implementation.numClosedFieldType)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) i))) (@GRing.opp (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))))) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (simplPredType (FinGroup.arg_sort (FinGroup.base gT))) (@support_for (FinGroup.arg_sort (FinGroup.base gT)) (GRing.Zmodule.eqType Algebraics.Implementation.zmodType) (GRing.zero Algebraics.Implementation.zmodType) (@fun_of_cfun gT (@gval gT G) phi))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
rewrite big1 => [|x Hx]; last by rewrite !cfResE ?subrr.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (simplPredType (FinGroup.arg_sort (FinGroup.base gT))) (@support_for (FinGroup.arg_sort (FinGroup.base gT)) (GRing.Zmodule.eqType Algebraics.Implementation.zmodType) (GRing.zero Algebraics.Implementation.zmodType) (@fun_of_cfun gT (@gval gT G) phi))) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) *)
have ->: (support phi \subset H) = (G :\: H \subset [set x | phi x == 0]).
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (GRing.zero Algebraics.Implementation.zmodType)))))) *)
(* Goal: @eq bool (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (FinGroup.arg_sort (FinGroup.base gT)) (simplPredType (FinGroup.arg_sort (FinGroup.base gT))) (@support_for (FinGroup.arg_sort (FinGroup.base gT)) (GRing.Zmodule.eqType Algebraics.Implementation.zmodType) (GRing.zero Algebraics.Implementation.zmodType) (@fun_of_cfun gT (@gval gT G) phi))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (GRing.zero Algebraics.Implementation.zmodType)))))) *)
rewrite subDset setUC -subDset; apply: eq_subset => x.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (GRing.zero Algebraics.Implementation.zmodType)))))) *)
(* Goal: @eq bool (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@pred_of_simpl (FinGroup.arg_sort (FinGroup.base gT)) (@support_for (FinGroup.arg_sort (FinGroup.base gT)) (GRing.Zmodule.eqType Algebraics.Implementation.zmodType) (GRing.zero Algebraics.Implementation.zmodType) (@fun_of_cfun gT (@gval gT G) phi))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (GRing.zero Algebraics.Implementation.zmodType))))))) *)
by rewrite !inE (andb_idr (contraR _)) // => /cfun0->.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@BigOp.bigop Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) (GRing.zero (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : FinGroup.arg_sort (FinGroup.base gT) => @BigBody Algebraics.Implementation.type (FinGroup.arg_sort (FinGroup.base gT)) i (@GRing.add (GRing.Ring.zmodType Algebraics.Implementation.ringType)) (@in_mem (FinGroup.arg_sort (FinGroup.base gT)) i (@mem (FinGroup.arg_sort (FinGroup.base gT)) (predPredType (FinGroup.arg_sort (FinGroup.base gT))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H))))) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi i) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi i))))) (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@setD (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G) (@gval gT H)))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (GRing.zero Algebraics.Implementation.zmodType)))))) *)
rewrite (sameP subsetP forall_inP); apply: lerif_0_sum => x _.
(* Goal: @Num.Def.lerif Algebraics.Implementation.numDomainType (GRing.zero (Num.NumDomain.zmodType Algebraics.Implementation.numDomainType)) (@GRing.mul Algebraics.Implementation.ringType (@fun_of_cfun gT (@gval gT G) phi x) (@GRing.RMorphism.apply (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Num.ClosedField.ringType Algebraics.Implementation.numClosedFieldType) (Phant (forall _ : Algebraics.Implementation.type, Algebraics.Implementation.type)) (@conjC Algebraics.Implementation.numClosedFieldType) (@fun_of_cfun gT (@gval gT G) phi x))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (GRing.zero Algebraics.Implementation.zmodType)))))) *)
by rewrite !inE /<?=%R mul_conjC_ge0 eq_sym mul_conjC_eq0.
Qed.
Lemma irr1_bound (i : Iirr G) :
('chi_i 1%g) ^+ 2 <= #|G : 'Z('chi_i)%CF|%:R
?= iff ('chi_i \in 'CF(G, 'Z('chi_i)%CF)).
Lemma irr1_abelian_bound (i : Iirr G) :
abelian (G / 'Z('chi_i)%CF) -> ('chi_i 1%g) ^+ 2 = #|G : 'Z('chi_i)%CF|%:R.
Lemma irr_faithful_center i : cfaithful 'chi[G]_i -> cyclic 'Z(G).
Proof.
(* Goal: forall _ : is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)), is_true (@cyclic gT (@center gT (@gval gT G))) *)
rewrite (isog_cyclic (isog_center (quotient1_isog G))) /=.
(* Goal: forall _ : is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)), is_true (@cyclic (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@center (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@quotient gT (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) *)
by move/trivgP <-; rewrite -cfcenter_eq_center cfcenter_cyclic.
Qed.
Lemma cfcenter_fful_irr i : cfaithful 'chi[G]_i -> 'Z('chi_i)%CF = 'Z(G).
Proof.
(* Goal: forall _ : is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@center gT (@gval gT G)) *)
move/trivgP=> Ki1; have:= cfcenter_eq_center i; rewrite {}Ki1.
(* Goal: forall _ : @eq (@set_of (@coset_finType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (Phant (@coset_of gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (@quotient gT (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@center (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@quotient gT (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@center gT (@gval gT G)) *)
have inj1: 'injm (@coset gT 1%g) by rewrite ker_coset.
(* Goal: forall _ : @eq (@set_of (@coset_finType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (Phant (@coset_of gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))))) (@quotient gT (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@center (@coset_groupType gT (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) (@quotient gT (@gval gT G) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfcenter gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)) (@center gT (@gval gT G)) *)
by rewrite -injm_center; first apply: injm_morphim_inj; rewrite ?norms1.
Qed.
Lemma pgroup_cyclic_faithful (p : nat) :
p.-group G -> cyclic 'Z(G) -> exists i, cfaithful 'chi[G]_i.
Proof.
(* Goal: forall (_ : is_true (@pgroup gT (nat_pred_of_nat p) (@gval gT G))) (_ : is_true (@cyclic gT (@center gT (@gval gT G)))), @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
pose Z := 'Ohm_1('Z(G)) => pG cycZG; have nilG := pgroup_nil pG.
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
have [-> | ntG] := eqsVneq G [1]; first by exists 0; apply: cfker_sub.
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
have{pG} [[p_pr _ _] pZ] := (pgroup_pdiv pG ntG, pgroupS (center_sub G) pG).
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
have ntZ: 'Z(G) != [1] by rewrite center_nil_eq1.
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
have{pZ} oZ: #|Z| = p by apply: Ohm1_cyclic_pgroup_prime.
(* Goal: @ex (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun i : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@cfaithful gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) *)
apply/existsP; apply: contraR ntZ; rewrite negb_exists => /forallP-not_ffulG.
(* Goal: is_true (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@center gT (@gval gT G)) (oneg (group_set_of_baseGroupType (FinGroup.base gT)))) *)
rewrite -Ohm1_eq1 -subG1 /= -/Z -(TI_cfker_irr G); apply/bigcapsP=> i _.
(* Goal: is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) Z)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@cfker gT (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))))) *)
rewrite prime_meetG ?oZ // setIC meet_Ohm1 // meet_center_nil ?cfker_normal //.
(* Goal: is_true (negb (@eq_op (set_of_eqType (FinGroup.arg_finType (FinGroup.base gT))) (@gval gT (@cfker_group gT G (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (oneg (group_set_of_baseGroupType (FinGroup.base gT))))) *)
by rewrite -subG1 not_ffulG.
Qed.
End Center.
Section Induced.
Variables (gT : finGroupType) (G H : {group gT}).
Implicit Types (phi : 'CF(G)) (chi : 'CF(H)).
Lemma cfInd_char chi : chi \is a character -> 'Ind[G] chi \is a character.
Proof.
(* Goal: forall _ : is_true (@in_mem (@classfun gT (@gval gT H)) chi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H))))), is_true (@in_mem (@classfun gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT H) chi) (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G))))) *)
move=> Nchi; apply/forallP=> i; rewrite coord_cfdot -Frobenius_reciprocity //.
(* Goal: is_true (@in_mem (GRing.Ring.sort (GRing.Field.ringType Algebraics.Implementation.fieldType)) (@cfdot gT (@gval gT H) chi (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i))) (@mem Algebraics.Implementation.type (predPredType Algebraics.Implementation.type) Cnat)) *)
by rewrite Cnat_cfdot_char ?cfRes_char ?irr_char.
Qed.
Lemma cfInd_eq0 chi :
H \subset G -> chi \is a character -> ('Ind[G] chi == 0) = (chi == 0).
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (@classfun gT (@gval gT H)) chi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H)))))), @eq bool (@eq_op (@cfun_eqType gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT H) chi) (GRing.zero (@cfun_zmodType gT (@gval gT G)))) (@eq_op (@cfun_eqType gT (@gval gT H)) chi (GRing.zero (@cfun_zmodType gT (@gval gT H)))) *)
move=> sHG Nchi; rewrite -!(char1_eq0) ?cfInd_char // cfInd1 //.
(* Goal: @eq bool (@eq_op Algebraics.Implementation.eqType (@GRing.mul Algebraics.Implementation.ringType (@GRing.natmul (GRing.Ring.zmodType Algebraics.Implementation.ringType) (GRing.one Algebraics.Implementation.ringType) (@indexg gT (@gval gT G) (@gval gT H))) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT)))) (GRing.zero Algebraics.Implementation.zmodType)) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType)) *)
by rewrite (mulrI_eq0 _ (mulfI _)) ?neq0CiG.
Qed.
Lemma Ind_irr_neq0 i : H \subset G -> 'Ind[G, H] 'chi_i != 0.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), is_true (negb (@eq_op (@cfun_eqType gT (@gval gT G)) (@cfInd gT (@gval gT G) (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (GRing.zero (@cfun_zmodType gT (@gval gT G))))) *)
by move/cfInd_eq0->; rewrite ?irr_neq0 ?irr_char.
Qed.
Definition Ind_Iirr (A B : {set gT}) i := cfIirr ('Ind[B, A] 'chi_i).
Lemma constt_cfRes_irr i : {j | j \in irr_constt ('Res[H, G] 'chi_i)}.
Proof.
(* Goal: @sig (ordinal (S (@pred_Nirr gT (@gval gT H)))) (fun j : ordinal (S (@pred_Nirr gT (@gval gT H))) => is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) j (@mem (ordinal (S (@pred_Nirr gT (@gval gT H)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT H))))) (@irr_constt gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) (@tnth (S (@pred_Nirr gT (@gval gT G))) (@classfun gT (@gval gT G)) (@irr gT (@gval gT G)) i)))))) *)
apply/sigW/neq0_has_constt/Res_irr_neq0.
Qed.
Lemma constt_cfInd_irr i :
H \subset G -> {j | j \in irr_constt ('Ind[G, H] 'chi_i)}.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @sig (ordinal (S (@pred_Nirr gT (@gval gT G)))) (fun j : ordinal (S (@pred_Nirr gT (@gval gT G))) => is_true (@in_mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) j (@mem (ordinal (S (@pred_Nirr gT (@gval gT G)))) (simplPredType (ordinal (S (@pred_Nirr gT (@gval gT G))))) (@irr_constt gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)))))) *)
by move=> sHG; apply/sigW/neq0_has_constt/Ind_irr_neq0.
Qed.
Lemma cfker_Res phi :
H \subset G -> phi \is a character -> cfker ('Res[H] phi) = H :&: cfker phi.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (@classfun gT (@gval gT G)) phi (@mem (@classfun gT (@gval gT G)) (predPredType (@classfun gT (@gval gT G))) (@has_quality (S O) (@classfun gT (@gval gT G)) (@character gT (@gval gT G)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi)) (@setI (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H) (@cfker gT (@gval gT G) phi)) *)
move=> sHG Nphi; apply/setP=> x; rewrite !cfkerEchar ?cfRes_char // !inE.
(* Goal: @eq bool (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) x) (@fun_of_cfun gT (@gval gT H) (@cfRes gT (@gval gT H) (@gval gT G) phi) (oneg (FinGroup.base gT))))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H)))) (andb (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) phi x) (@fun_of_cfun gT (@gval gT G) phi (oneg (FinGroup.base gT)))))) *)
by apply/andb_id2l=> Hx; rewrite (subsetP sHG) ?cfResE.
Qed.
Lemma cfker_Ind chi :
H \subset G -> chi \is a character -> chi != 0 ->
cfker ('Ind[G, H] chi) = gcore (cfker chi) G.
Proof.
(* Goal: forall (_ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G))))) (_ : is_true (@in_mem (@classfun gT (@gval gT H)) chi (@mem (@classfun gT (@gval gT H)) (predPredType (@classfun gT (@gval gT H))) (@has_quality (S O) (@classfun gT (@gval gT H)) (@character gT (@gval gT H)))))) (_ : is_true (negb (@eq_op (@cfun_eqType gT (@gval gT H)) chi (GRing.zero (@cfun_zmodType gT (@gval gT H)))))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) chi)) (@gcore gT (@cfker gT (@gval gT H) chi) (@gval gT G)) *)
move=> sHG Nchi nzchi; rewrite !cfker_nzcharE ?cfInd_char ?cfInd_eq0 //.
(* Goal: @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) chi) x) (@fun_of_cfun gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) chi) (oneg (FinGroup.base gT))))) (@gcore gT (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) chi x) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))))) (@gval gT G)) *)
apply/setP=> x; rewrite inE cfIndE // (can2_eq (mulVKf _) (mulKf _)) ?neq0CG //.
(* Goal: @eq bool (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType))) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (@conjg gT x y)))) (@GRing.mul (GRing.Field.ringType Algebraics.Implementation.fieldType) (@GRing.natmul (GRing.Ring.zmodType (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (GRing.one (GRing.UnitRing.ringType Algebraics.Implementation.unitRingType)) (@card (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))))) (@fun_of_cfun gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) chi) (oneg (FinGroup.base gT))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gcore gT (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) chi x) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))))) (@gval gT G))))) *)
rewrite cfInd1 // mulrA -natrM Lagrange // mulr_natl -sumr_const.
(* Goal: @eq bool (@eq_op (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType))) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (@conjg gT x y)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT)))))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gcore gT (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) chi x) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))))) (@gval gT G))))) *)
apply/eqP/bigcapP=> [/normC_sum_upper ker_chiG_x y Gy | ker_chiG_x].
(* Goal: @eq (Equality.sort (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType)))) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (@conjg gT x y)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))))) *)
(* Goal: is_true (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) x (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@conjugate gT (@SetDef.finset (FinGroup.arg_finType (FinGroup.base gT)) (fun x : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @eq_op Algebraics.Implementation.eqType (@fun_of_cfun gT (@gval gT H) chi x) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))))) y)))) *)
by rewrite mem_conjg inE ker_chiG_x ?groupV // => z _; apply: char1_ge_norm.
(* Goal: @eq (Equality.sort (GRing.Ring.eqType (GRing.UnitRing.ringType (GRing.Field.unitRingType Algebraics.Implementation.fieldType)))) (@BigOp.bigop (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero Algebraics.Implementation.zmodType) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun y : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort Algebraics.Implementation.zmodType) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@GRing.add Algebraics.Implementation.zmodType) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) y (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (@conjg gT x y)))) (@BigOp.bigop (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (GRing.zero (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (index_enum (FinGroup.arg_finType (FinGroup.base gT))) (fun i : Finite.sort (FinGroup.arg_finType (FinGroup.base gT)) => @BigBody (GRing.Zmodule.sort (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@GRing.add (GRing.Ring.zmodType (GRing.Field.ringType Algebraics.Implementation.fieldType))) (@in_mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) i (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))) (@fun_of_cfun gT (@gval gT H) chi (oneg (FinGroup.base gT))))) *)
by apply: eq_bigr => y /groupVr/ker_chiG_x; rewrite mem_conjgV inE => /eqP.
Qed.
Lemma cfker_Ind_irr i :
H \subset G -> cfker ('Ind[G, H] 'chi_i) = gcore (cfker 'chi_i) G.
Proof.
(* Goal: forall _ : is_true (@subset (FinGroup.arg_finType (FinGroup.base gT)) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT H))) (@mem (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))) (predPredType (Finite.sort (FinGroup.arg_finType (FinGroup.base gT)))) (@SetDef.pred_of_set (FinGroup.arg_finType (FinGroup.base gT)) (@gval gT G)))), @eq (@set_of (FinGroup.arg_finType (FinGroup.base gT)) (Phant (Finite.sort (FinGroup.arg_finType (FinGroup.base gT))))) (@cfker gT (@gval gT G) (@cfInd gT (@gval gT G) (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i))) (@gcore gT (@cfker gT (@gval gT H) (@tnth (S (@pred_Nirr gT (@gval gT H))) (@classfun gT (@gval gT H)) (@irr gT (@gval gT H)) i)) (@gval gT G)) *)
by move/cfker_Ind->; rewrite ?irr_neq0 ?irr_char.
Qed.
End Induced.
Arguments Ind_Iirr {gT A%g} B%g i%R.
|
Require Export GeoCoq.Elements.OriginalProofs.lemma_ray3.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma lemma_equalangleshelper :
forall A B C a b c p q,
CongA A B C a b c -> Out b a p -> Out b c q ->
CongA A B C p b q.
Proof.
(* Goal: forall (A B C a b c p q : @Point Ax0) (_ : @CongA Ax0 A B C a b c) (_ : @Out Ax0 b a p) (_ : @Out Ax0 b c q), @CongA Ax0 A B C p b q *)
intros.
(* Goal: @CongA Ax0 A B C p b q *)
let Tf:=fresh in assert (Tf:exists U V u v, (Out B A U /\ Out B C V /\ Out b a u /\ Out b c v /\ Cong B U b u /\ Cong B V b v /\ Cong U V u v /\ nCol A B C)) by (conclude_def CongA );destruct Tf as [U[V[u[v]]]];spliter.
(* Goal: @CongA Ax0 A B C p b q *)
assert (Out b p u) by (conclude lemma_ray3).
(* Goal: @CongA Ax0 A B C p b q *)
assert (Out b q v) by (conclude lemma_ray3).
(* Goal: @CongA Ax0 A B C p b q *)
assert (CongA A B C p b q) by (conclude_def CongA ).
(* Goal: @CongA Ax0 A B C p b q *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Elements.OriginalProofs.proposition_31.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_31short :
forall A B C D,
BetS B D C -> nCol B C A ->
exists X Y Z, BetS X A Y /\ CongA X A D A D C /\ Par X Y B C /\ BetS X Z C /\ BetS A Z D.
Proof.
(* Goal: forall (A B C D : @Point Ax0) (_ : @BetS Ax0 B D C) (_ : @nCol Ax0 B C A), @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => and (@BetS Ax0 X A Y) (and (@CongA Ax0 X A D A D C) (and (@Par Ax0 X Y B C) (and (@BetS Ax0 X Z C) (@BetS Ax0 A Z D))))))) *)
intros.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => and (@BetS Ax0 X A Y) (and (@CongA Ax0 X A D A D C) (and (@Par Ax0 X Y B C) (and (@BetS Ax0 X Z C) (@BetS Ax0 A Z D))))))) *)
let Tf:=fresh in assert (Tf:exists E F S, (BetS E A F /\ CongA F A D A D B /\ CongA F A D B D A /\ CongA D A F B D A /\ CongA E A D A D C /\ CongA E A D C D A /\ CongA D A E C D A /\ Par E F B C /\ Cong E A D C /\ Cong A F B D /\ Cong A S S D /\ Cong E S S C /\ Cong B S S F /\ BetS E S C /\ BetS B S F /\ BetS A S D)) by (conclude proposition_31);destruct Tf as [E[F[S]]];spliter.
(* Goal: @ex (@Point Ax0) (fun X : @Point Ax0 => @ex (@Point Ax0) (fun Y : @Point Ax0 => @ex (@Point Ax0) (fun Z : @Point Ax0 => and (@BetS Ax0 X A Y) (and (@CongA Ax0 X A D A D C) (and (@Par Ax0 X Y B C) (and (@BetS Ax0 X Z C) (@BetS Ax0 A Z D))))))) *)
close.
Qed.
End Euclid.
|
Require Export GeoCoq.Tarski_dev.Annexes.tangency.
Require Export GeoCoq.Tarski_dev.Annexes.inscribed_angle.
Section Book_3.
Context `{TE:Tarski_2D}.
Lemma prop_2 : forall O P U V X,
X <> U -> X <> V ->
Bet U X V ->
OnCircle U O P ->
OnCircle V O P ->
InCircleS X O P.
Proof.
(* Goal: forall (O P U V X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) X U)) (_ : not (@eq (@Tpoint Tn) X V)) (_ : @Bet Tn U X V) (_ : @OnCircle Tn U O P) (_ : @OnCircle Tn V O P), @InCircleS Tn X O P *)
intros O P U V X; intros.
(* Goal: @InCircleS Tn X O P *)
apply bet_inc2__incs with U V; Circle.
Qed.
Lemma prop_3_1 : forall O P A B X,
O <> X -> A <> B ->
OnCircle A O P ->
OnCircle B O P ->
Midpoint X A B ->
Perp O X A B.
Proof.
(* Goal: forall (O P A B X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O X)) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @OnCircle Tn A O P) (_ : @OnCircle Tn B O P) (_ : @Midpoint Tn X A B), @Perp Tn O X A B *)
exact mid_onc2__perp.
Qed.
Lemma prop_3_2 : forall O P A B X,
O<>X -> A<>B ->
Col A B X ->
OnCircle A O P ->
OnCircle B O P ->
Perp O X A B ->
Midpoint X A B.
Proof.
(* Goal: forall (O P A B X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O X)) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @Col Tn A B X) (_ : @OnCircle Tn A O P) (_ : @OnCircle Tn B O P) (_ : @Perp Tn O X A B), @Midpoint Tn X A B *)
exact col_onc2_perp__mid.
Qed.
Lemma prop_4 : forall O P A B C D X, B <> C -> A <> B ->
OnCircle A O P ->
OnCircle B O P ->
OnCircle C O P ->
OnCircle D O P ->
Midpoint X A C ->
Midpoint X B D ->
X = O.
Proof.
(* Goal: forall (O P A B C D X : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) B C)) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @OnCircle Tn A O P) (_ : @OnCircle Tn B O P) (_ : @OnCircle Tn C O P) (_ : @OnCircle Tn D O P) (_ : @Midpoint Tn X A C) (_ : @Midpoint Tn X B D), @eq (@Tpoint Tn) X O *)
exact mid2_onc4__eq.
Qed.
Lemma prop_5 : forall A B C D,
InterCC A B C D ->
A <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : @InterCC Tn A B C D), not (@eq (@Tpoint Tn) A C) *)
exact intercc__neq.
Qed.
Lemma prop_6: forall A B C D,
A <> B ->
TangentCC A B C D ->
A <> C.
Proof.
(* Goal: forall (A B C D : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : @TangentCC Tn A B C D), not (@eq (@Tpoint Tn) A C) *)
exact tangentcc__neq.
Qed.
Lemma prop_9 : forall O P X A B C, A <> B -> A <> C -> B <> C ->
OnCircle A O P ->
OnCircle B O P ->
OnCircle C O P ->
Cong X A X B ->
Cong X A X C ->
X = O.
Proof.
(* Goal: forall (O P X A B C : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) A B)) (_ : not (@eq (@Tpoint Tn) A C)) (_ : not (@eq (@Tpoint Tn) B C)) (_ : @OnCircle Tn A O P) (_ : @OnCircle Tn B O P) (_ : @OnCircle Tn C O P) (_ : @Cong Tn X A X B) (_ : @Cong Tn X A X C), @eq (@Tpoint Tn) X O *)
exact cong2_onc3__eq.
Qed.
Lemma prop_11_12 : forall A B C D X,
TangentCC A B C D ->
OnCircle X A B ->
OnCircle X C D ->
Col X A C.
Proof.
(* Goal: forall (A B C D X : @Tpoint Tn) (_ : @TangentCC Tn A B C D) (_ : @OnCircle Tn X A B) (_ : @OnCircle Tn X C D), @Col Tn X A C *)
exact TangentCC_Col.
Qed.
Lemma prop_18 :
forall A B O P T,
O <> P ->
TangentAt A B O P T ->
Perp A B O T.
Proof.
(* Goal: forall (A B O P T : @Tpoint Tn) (_ : not (@eq (@Tpoint Tn) O P)) (_ : @TangentAt Tn A B O P T), @Perp Tn A B O T *)
exact tangentat_perp.
Qed.
End Book_3. |
Require Export GeoCoq.Elements.OriginalProofs.proposition_16.
Require Export GeoCoq.Elements.OriginalProofs.proposition_05.
Require Export GeoCoq.Elements.OriginalProofs.lemma_angleordertransitive.
Section Euclid.
Context `{Ax:euclidean_neutral_ruler_compass}.
Lemma proposition_18 :
forall A B C,
Triangle A B C -> Lt A B A C ->
LtA B C A A B C.
Proof.
(* Goal: forall (A B C : @Point Ax0) (_ : @Triangle Ax0 A B C) (_ : @Lt Ax0 A B A C), @LtA Ax0 B C A A B C *)
intros.
(* Goal: @LtA Ax0 B C A A B C *)
assert (nCol A B C) by (conclude_def Triangle ).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ eq A B).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@eq Ax0 A B) *)
{
(* Goal: not (@eq Ax0 A B) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (neq B A) by (conclude lemma_inequalitysymmetric).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ eq A C).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@eq Ax0 A C) *)
{
(* Goal: not (@eq Ax0 A C) *)
intro.
(* Goal: False *)
assert (Col A B C) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (neq C A) by (conclude lemma_inequalitysymmetric).
(* Goal: @LtA Ax0 B C A A B C *)
assert (Cong A C A C) by (conclude cn_congruencereflexive).
(* Goal: @LtA Ax0 B C A A B C *)
let Tf:=fresh in assert (Tf:exists D, (BetS A D C /\ Cong A D A B)) by (conclude proposition_03);destruct Tf as [D];spliter.
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ Col B C D).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@Col Ax0 B C D) *)
{
(* Goal: not (@Col Ax0 B C D) *)
intro.
(* Goal: False *)
assert (Col D C B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col A D C) by (conclude_def Col ).
(* Goal: False *)
assert (Col D C A) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq D C) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (Col C B A) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (Triangle B C D) by (conclude_def Triangle ).
(* Goal: @LtA Ax0 B C A A B C *)
assert (BetS C D A) by (conclude axiom_betweennesssymmetry).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA D C B B D A) by (conclude proposition_16).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ eq B C).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@eq Ax0 B C) *)
{
(* Goal: not (@eq Ax0 B C) *)
intro.
(* Goal: False *)
assert (Col B C D) by (conclude_def Col ).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (neq C B) by (conclude lemma_inequalitysymmetric).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ Col A D B).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@Col Ax0 A D B) *)
{
(* Goal: not (@Col Ax0 A D B) *)
intro.
(* Goal: False *)
assert (Col A D C) by (conclude_def Col ).
(* Goal: False *)
assert (Col D A C) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (Col D A B) by (forward_using lemma_collinearorder).
(* Goal: False *)
assert (neq A D) by (forward_using lemma_betweennotequal).
(* Goal: False *)
assert (neq D A) by (conclude lemma_inequalitysymmetric).
(* Goal: False *)
assert (Col A C B) by (conclude lemma_collinear4).
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (Triangle A D B) by (conclude_def Triangle ).
(* Goal: @LtA Ax0 B C A A B C *)
assert (isosceles A D B) by (conclude_def isosceles ).
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA A D B A B D) by (conclude proposition_05).
(* Goal: @LtA Ax0 B C A A B C *)
assert (Out C A D) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 B C A A B C *)
assert (eq B B) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 B C A A B C *)
assert (Out C B B) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ Col A C B).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@Col Ax0 A C B) *)
{
(* Goal: not (@Col Ax0 A C B) *)
intro.
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA A C B A C B) by (conclude lemma_equalanglesreflexive).
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA A C B D C B) by (conclude lemma_equalangleshelper).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA A C B B D A) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA A D B B D A) by (conclude lemma_ABCequalsCBA).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA A C B A D B) by (conclude lemma_angleorderrespectscongruence).
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA A B D A D B) by (conclude lemma_equalanglessymmetric).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA A C B A B D) by (conclude lemma_angleorderrespectscongruence).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ Col B C A).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@Col Ax0 B C A) *)
{
(* Goal: not (@Col Ax0 B C A) *)
intro.
(* Goal: False *)
assert (Col A B C) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA B C A A C B) by (conclude lemma_ABCequalsCBA).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA B C A A B D) by (conclude lemma_angleorderrespectscongruence2).
(* Goal: @LtA Ax0 B C A A B C *)
assert (eq C C) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 B C A A B C *)
assert (eq A A) by (conclude cn_equalityreflexive).
(* Goal: @LtA Ax0 B C A A B C *)
assert (Out B C C) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 B C A A B C *)
assert (Out B A A) by (conclude lemma_ray4).
(* Goal: @LtA Ax0 B C A A B C *)
assert (~ Col A B D).
(* Goal: @LtA Ax0 B C A A B C *)
(* Goal: not (@Col Ax0 A B D) *)
{
(* Goal: not (@Col Ax0 A B D) *)
intro.
(* Goal: False *)
assert (Col A D B) by (forward_using lemma_collinearorder).
(* Goal: False *)
contradict.
(* BG Goal: @LtA Ax0 B C A A B C *)
}
(* Goal: @LtA Ax0 B C A A B C *)
assert (CongA A B D A B D) by (conclude lemma_equalanglesreflexive).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA A B D A B C) by (conclude_def LtA ).
(* Goal: @LtA Ax0 B C A A B C *)
assert (LtA B C A A B C) by (conclude lemma_angleordertransitive).
(* Goal: @LtA Ax0 B C A A B C *)
close.
Qed.
End Euclid.
|
Subsets and Splits